zouzhd 3 년 전
부모
커밋
bb0ca212c9

+ 2 - 2
build/utils.js

@@ -16,8 +16,8 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
 
-let devModules = ['all']
-// let devModules = ['index','appoint','sale','RMS'];
+// let devModules = ['all']
+let devModules = ['index','appoint','sale','RMS'];
 // let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','appoint','WMS'];
 // let devModules = ['index','inward','SporadicManage']
 // let devModules = ['index','inward','SporadicManage']
 // let devModules = ['index','sale','RMS']
 // let devModules = ['index','sale','RMS']

+ 1 - 1
config/index.js

@@ -65,7 +65,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   // 所有数据的请求域名地址
   "/api/v1": {
   "/api/v1": {
     target: "http://172.16.33.166:8080",
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.105:8019",
+    // target: "http://192.168.1.114:8019",
     ws: true,
     ws: true,
     pathRewrite: {
     pathRewrite: {
       "^/api/v1": "/api/v1"
       "^/api/v1": "/api/v1"

+ 8 - 2
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -460,7 +460,7 @@
 </template>
 </template>
 <script>
 <script>
 import PageTitle from "@/components/Page/Title";
 import PageTitle from "@/components/Page/Title";
-import { sjTime } from "@/utils/sharedJsFile";
+import { sjTime,isIntegerNumber } from "@/utils/sharedJsFile";
 export default {
 export default {
   components: { PageTitle },
   components: { PageTitle },
   data() {
   data() {
@@ -899,8 +899,10 @@ export default {
       }else if(!this.saleShipperAddressName&&this.values=='no'){
       }else if(!this.saleShipperAddressName&&this.values=='no'){
         this.$message.warning("收货地址未填写!");
         this.$message.warning("收货地址未填写!");
       }else if(this.materialList.length==1&&this.materialList[0].carNumber!=null){
       }else if(this.materialList.length==1&&this.materialList[0].carNumber!=null){
+          if(this.materialList[0].orderPlanWeight/this.materialList[0].carNumber)
           var eachOrderPlanWeight = this.materialList[0].orderPlanWeight/this.materialList[0].carNumber;
           var eachOrderPlanWeight = this.materialList[0].orderPlanWeight/this.materialList[0].carNumber;
-          var e = this.materialList[0];
+          if(isIntegerNumber(eachOrderPlanWeight)){
+            var e = this.materialList[0];
           for(var i=0;i<this.materialList[0].carNumber;i++){
           for(var i=0;i<this.materialList[0].carNumber;i++){
             var addmap = {
             var addmap = {
             cxh: this.maxCxh,
             cxh: this.maxCxh,
@@ -926,6 +928,10 @@ export default {
           this.materialList = [];
           this.materialList = [];
           //调用记录每一行的合并数的方法
           //调用记录每一行的合并数的方法
           this.getSpanArr(this.selectionList);
           this.getSpanArr(this.selectionList);
+          }else{
+            this.$message.warning("分配件数不是整数!");
+          }
+          
       }else{
       }else{
           this.materialList.forEach((e) => {
           this.materialList.forEach((e) => {
             var addmap = {
             var addmap = {

+ 6 - 8
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -272,6 +272,7 @@ export default {
               this.$message({ type: "info", message: "取消!",});
               this.$message({ type: "info", message: "取消!",});
             });
             });
         }
         }
+        console.log("res.data.data",res.data.data)
         //赋值派车表格
         //赋值派车表格
         res.data.data.forEach((e,i) => {
         res.data.data.forEach((e,i) => {
           if(e.saleOrderConsignee=="null"){
           if(e.saleOrderConsignee=="null"){
@@ -285,7 +286,7 @@ export default {
                 truckNo: e.truckNo,
                 truckNo: e.truckNo,
                 saleOrderMaterialId: e.saleOrderMaterialId,
                 saleOrderMaterialId: e.saleOrderMaterialId,
                 capacityNumber: null,
                 capacityNumber: null,
-                carrierName: e.carrierId,
+                carrierName: e.carrierName,
                 carrierId: e.carrierId,
                 carrierId: e.carrierId,
                 materialId: e.materialId,
                 materialId: e.materialId,
                 materialName: e.materialName,
                 materialName: e.materialName,
@@ -430,16 +431,13 @@ export default {
       //是否可发送请求
       //是否可发送请求
       var canSend = 1;
       var canSend = 1;
       this.selectionList.forEach((e)=>{
       this.selectionList.forEach((e)=>{
-          if(e.carrierName==null){
+          if(e.capacityNumber==null){
               canSend = 0;
               canSend = 0;
           }
           }
-          if(isIntegerNumber(e.carrierName)){
-              e.carrierId = e.carrierName;
-          }
-        });
+      });
       if(canSend==0){
       if(canSend==0){
-          //还有车序号未授权承运商
-          this.$message.warning('还有车序号未授权承运商!')
+          //还有车牌号未填写
+          this.$message.warning('还有车牌号未填写!')
       }else{
       }else{
           this.$confirm("是否确定进行钢材派单!", "提示", {
           this.$confirm("是否确定进行钢材派单!", "提示", {
               confirmButtonText: "确定",
               confirmButtonText: "确定",

+ 27 - 5
src/views/sale/components/saleSelfMachine/printLading.vue

@@ -70,12 +70,17 @@
         </table>
         </table>
       </div>
       </div>
       </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)
         <i class="el-icon-download"></i>导出(pdf)
-      </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>
+      </el-button> -->
+      <div class="button-box">
+        <el-button type="primary" v-print="'#pdfDom'" @click="backScan()">
+          <i class="el-icon-printer"></i>打印
+        </el-button>
+        <el-button type="primary" @click="backScan()">
+          <i class="el-icon-back"></i>返回
+        </el-button>
+      </div>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -107,6 +112,15 @@ export default {
   created(){
   created(){
       this.getBillOrder();
       this.getBillOrder();
   },
   },
+  mounted() {
+    //三十秒不操作,自动返回扫码页面
+    const timer = setInterval(()=>{
+        this.backScan();
+    },30000)
+    this.$once('hook:beforeDestroy', ()=>{
+        clearInterval(timer)
+    })
+  },
   methods: {
   methods: {
       getBillOrder(){
       getBillOrder(){
         let orderNumber = this.$route.query.orderNumber;
         let orderNumber = this.$route.query.orderNumber;
@@ -157,4 +171,12 @@ export default {
   width: 100%;
   width: 100%;
   height: 50px;
   height: 50px;
 }
 }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 </style>
 </style>

+ 27 - 5
src/views/sale/components/saleSelfMachine/printReceipt.vue

@@ -86,12 +86,17 @@
         </table>
         </table>
       </div>
       </div>
       </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)
         <i class="el-icon-download"></i>导出(pdf)
-      </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>
+      </el-button> -->
+      <div class="button-box">
+        <el-button type="primary" v-print="'#pdfDom'" @click="backScan()">
+          <i class="el-icon-printer"></i>打印
+        </el-button>
+        <el-button type="primary" @click="backScan()">
+          <i class="el-icon-back"></i>返回
+        </el-button>
+      </div>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -136,6 +141,15 @@ export default {
   created(){
   created(){
       this.getDeliveryOrder();
       this.getDeliveryOrder();
   },
   },
+  mounted() {
+    //三十秒不操作,自动返回扫码页面
+    const timer = setInterval(()=>{
+        this.backScan();
+    },30000)
+    this.$once('hook:beforeDestroy', ()=>{
+        clearInterval(timer)
+    })
+  },
   methods: {
   methods: {
       getDeliveryOrder(){
       getDeliveryOrder(){
         let orderNumber = this.$route.query.orderNumber;
         let orderNumber = this.$route.query.orderNumber;
@@ -192,4 +206,12 @@ export default {
   width: 100%;
   width: 100%;
   height: 50px;
   height: 50px;
 }
 }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 </style>
 </style>

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

@@ -76,13 +76,12 @@ export default {
             overflow: hidden;
             overflow: hidden;
         }
         }
         .orderNumberData{
         .orderNumberData{
-            width: 20%;height: 30%;
+            width: 100%;
             color: #fff;
             color: #fff;
             position: absolute;
             position: absolute;
             display: flex;
             display: flex;
             justify-content: center;
             justify-content: center;
             align-items: center;
             align-items: center;
-            margin-left: 27rem;
         }
         }
     }
     }
 </style>
 </style>

+ 37 - 13
src/views/sale/components/saleSelfMachine/printWarranty.vue

@@ -6,10 +6,14 @@
        style="width: 100%">
        style="width: 100%">
       </el-table>
       </el-table>
      </div>  -->
      </div>  -->
-     <div class="loading"  v-if="urls.length==0"></div>
+     <div class="loading"  v-if="urls.length==0&&status==0"></div>
+     <div v-if="status==-2">
+       <h1>该车还未装货!</h1>
+     </div>
+     <div v-if="status==-1">
+       <h1>质保书正在紧张制作中,请耐心等待!</h1>
+     </div>
       <div id="pdfDom">
       <div id="pdfDom">
-      <div class="blank">
-      </div>
     <div class="demo-image__lazy" v-for="(img,index) in urls" :key="index">
     <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 v-for="(img,index) in urls" :key="index" :src="img" lazy></el-image> -->
        <el-image   style='width: 100%; height: 100%; justify-content: center;
        <el-image   style='width: 100%; height: 100%; justify-content: center;
@@ -19,9 +23,14 @@
       <!-- <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)
         <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>
+      <div class="button-box">
+        <el-button v-if="urls.length>0&&status==0" type="primary" v-print="'#pdfDom'" @click="backScan()">
+          <i class="el-icon-printer"></i>打印
+        </el-button>
+        <el-button type="primary" @click="backScan()">
+          <i class="el-icon-back"></i>返回
+        </el-button>
+      </div>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -33,11 +42,20 @@ export default {
   data() {
   data() {
     return {
     return {
       urls:[],
       urls:[],
+      //定义质保书正在紧张制作中、未装货和打印中的状态
+      status:0,
       name: 'Loading'
       name: 'Loading'
     };
     };
   }, 
   }, 
   mounted() {
   mounted() {
     this.information();
     this.information();
+    //三十秒不操作,自动返回扫码页面
+    const timer = setInterval(()=>{
+        this.backScan();
+    },30000)
+    this.$once('hook:beforeDestroy', ()=>{
+        clearInterval(timer)
+    })
   },
   },
   methods: {
   methods: {
      information() {
      information() {
@@ -48,15 +66,17 @@ export default {
           "/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber 
           "/api/v1/uc/getWarranty?orderNumber="+this.$route.query.orderNumber 
         )
         )
         .then((res) => {
         .then((res) => {
-          console.log("res.data.data",res.data.data)
-          console.log("res.data.code",res.data.code)  
+          // console.log("res.data.data",res.data.data)
+          // console.log("res.data.code",res.data.code)  
           if(res.data.data==-1){
           if(res.data.data==-1){
             this.$message("质保书正在紧张制作中,请耐心等待!")
             this.$message("质保书正在紧张制作中,请耐心等待!")
+            this.status = -1;
           }else if(res.data.data==-2) {
           }else if(res.data.data==-2) {
             this.$message("该车还未装货")
             this.$message("该车还未装货")
+            this.status = -2;
           }else{
           }else{
             res.data.data.forEach((e) => {
             res.data.data.forEach((e) => {
-              console.log(e)
+              // console.log(e)
               this.urls.push(e)
               this.urls.push(e)
           
           
             })
             })
@@ -103,10 +123,6 @@ export default {
     border-top: 0px
     border-top: 0px
   }
   }
 }
 }
-.blank{
-  width: 100%;
-  height: 50px;
-}
 .loading {
 .loading {
   position: fixed;
   position: fixed;
   left: 0;
   left: 0;
@@ -116,4 +132,12 @@ export default {
   height: 100vh;
   height: 100vh;
   z-index: 1000;
   z-index: 1000;
 }
 }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
 </style>
 </style>

+ 21 - 11
src/views/sale/components/saleSelfMachine/saleSelfMachine.vue

@@ -3,9 +3,9 @@
         <div class="background">
         <div class="background">
             <img :src="backgroundImgURL" width="100%" height="100%"/>
             <img :src="backgroundImgURL" width="100%" height="100%"/>
         </div>
         </div>
-        <div class="time">
+        <!-- <div class="time">
             <span>{{nowTime}}</span>
             <span>{{nowTime}}</span>
-        </div>
+        </div> -->
         <div class="loginForm">
         <div class="loginForm">
             <div class="menu" v-for="(item,index) in menuList" :key="index" @click="onClick(item.url)">
             <div class="menu" v-for="(item,index) in menuList" :key="index" @click="onClick(item.url)">
                 <img :src="item.img" width="100%" height="100%"/>
                 <img :src="item.img" width="100%" height="100%"/>
@@ -40,20 +40,30 @@ export default {
             this.$router.push({
             this.$router.push({
                 path:url+"?orderNumber="+this.orderNumber,
                 path:url+"?orderNumber="+this.orderNumber,
             })
             })
-        }
+        },
+        backScan(){
+        this.$router.go(-1);
+    }
     },
     },
     mounted() {
     mounted() {
         this.orderNumber=this.$route.query.orderNumber;
         this.orderNumber=this.$route.query.orderNumber;
         let _this = this; // 声明一个变量指向Vue实例this,保证作用域一致
         let _this = this; // 声明一个变量指向Vue实例this,保证作用域一致
-        this.timer = setInterval(() => {
-        _this.nowTime = renderTime(new Date()); // 修改数据date
-        }, 1000)
+        //三十秒不操作,自动返回扫码页面
+        const timer = setInterval(()=>{
+            this.backScan();
+        },30000)
+        this.$once('hook:beforeDestroy', ()=>{
+            clearInterval(timer)
+        })
+        // this.timer = setInterval(() => {
+        // _this.nowTime = renderTime(new Date()); // 修改数据date
+        // }, 1000)
     },
     },
-    beforeDestroy() {
-        if (this.timer) {
-        clearInterval(this.timer); // 在Vue实例销毁前,清除我们的定时器
-        }
-    }
+    // beforeDestroy() {
+    //     if (this.timer) {
+    //     clearInterval(this.timer); // 在Vue实例销毁前,清除我们的定时器
+    //     }
+    // }
 }
 }
 </script>
 </script>
 <style lang="scss">
 <style lang="scss">