Browse Source

Merge tag 'Hotfix-39' into develop

Finish Hotfix-39
chen 3 years ago
parent
commit
73b16767b0
1 changed files with 72 additions and 74 deletions
  1. 72 74
      src/views/supply/pickup/check.vue

+ 72 - 74
src/views/supply/pickup/check.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    
+
     <div v-show="!isShowPrint">
       <div class="main-title">
         <div class="title">仓库提货确认</div>
@@ -87,7 +87,7 @@
             </el-table-column>
             <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip>
               <template slot-scope="scope">
-                {{ scope.row.orderType == 'HOME' ? scope.row.mainOrderId : scope.row.enginOrderNo }}
+                {{ scope.row.orderType == 'HOME' ? scope.row.enginOrderNo: scope.row.mainOrderId }}
               </template>
             </el-table-column>
             <el-table-column align="center" label="发货申请单号" prop="invoiceId" min-width="180" show-overflow-tooltip></el-table-column>
@@ -154,13 +154,7 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="12" style="height: 51px;">
             <el-form-item label="操作日期" prop="createDate">
-              <el-date-picker
-                v-model="dialogForm.createDate"
-                readonly
-                type="date"
-                value-format="yyyy-MM-dd"
-                style="width: 100%;"
-                placeholder="选择日期">
+              <el-date-picker v-model="dialogForm.createDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 100%;" placeholder="选择日期">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -178,12 +172,17 @@
 </template>
 
 <script>
-import { getPickupList, getCode, getPickupManInfo, checkPassword } from "@/api/supply/pickup";
+import {
+  getPickupList,
+  getCode,
+  getPickupManInfo,
+  checkPassword,
+} from "@/api/supply/pickup";
 import PickupPrint from "@/views/supply/pickup/components/pickup_print";
 
 export default {
   components: {
-    PickupPrint
+    PickupPrint,
   },
   data() {
     return {
@@ -192,22 +191,23 @@ export default {
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        phone: '',
-        code: '',
-        name: '',
-        idCard: '',
-        manId: '',
+      screenForm: {
+        // 筛选表单数据
+        phone: "",
+        code: "",
+        name: "",
+        idCard: "",
+        manId: "",
         status: 0,
       },
       statusList: [
-        { label: '未打单', value: 0 },
-        { label: '已打单', value: 1 },
+        { label: "未打单", value: 0 },
+        { label: "已打单", value: 1 },
       ],
 
-      getCodeText: '获取验证码',
+      getCodeText: "获取验证码",
       countDown: 60,
-			timer: null,
+      timer: null,
 
       tableSelection: [],
 
@@ -216,16 +216,14 @@ export default {
 
       isShowDialog: false,
       dialogForm: {
-        password: '',
-        createMan: '',
-        createDate: '',
+        password: "",
+        createMan: "",
+        createDate: "",
       },
       dialogFormRules: {
-        password: [
-          { required: true, message: '请输入密码', trigger: 'blur' }
-        ],
+        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
       },
-    }
+    };
   },
 
   computed: {
@@ -233,13 +231,11 @@ export default {
       return {
         takerId: this.screenForm.manId,
         status: this.screenForm.status,
-      }
+      };
     },
   },
 
-  created() {
-    
-  },
+  created() {},
 
   methods: {
     getDate() {
@@ -249,10 +245,10 @@ export default {
       var month = date.getMonth() + 1;
       var strDate = date.getDate();
       if (month >= 1 && month <= 9) {
-          month = "0" + month;
+        month = "0" + month;
       }
       if (strDate >= 0 && strDate <= 9) {
-          strDate = "0" + strDate;
+        strDate = "0" + strDate;
       }
       var currentdate = year + seperator1 + month + seperator1 + strDate;
       return currentdate;
@@ -260,18 +256,18 @@ export default {
 
     // 获取短信验证码
     getCode() {
-      getCode({mobile: this.screenForm.phone}).then(res => {
-        this.$successMsg('短信已发送');
+      getCode({ mobile: this.screenForm.phone }).then((res) => {
+        this.$successMsg("短信已发送");
         this.countDown--;
         this.timer = setInterval(() => {
           this.countDown--;
           if (this.countDown == 0) {
             this.countDown = 60;
-            this.getCodeText = '重新获取';
-            clearInterval(this.timer)
+            this.getCodeText = "重新获取";
+            clearInterval(this.timer);
           }
-        }, 1000)
-      })
+        }, 1000);
+      });
     },
 
     // 获取提货人信息
@@ -279,18 +275,18 @@ export default {
       getPickupManInfo({
         mobile: this.screenForm.phone,
         code: this.screenForm.code,
-      }).then(res => {
-        this.$successMsg('验证成功');
+      }).then((res) => {
+        this.$successMsg("验证成功");
         this.screenForm.name = res.data.takerName;
         this.screenForm.idCard = res.data.identity;
         this.screenForm.manId = res.data.id;
-      })
+      });
     },
 
     // 查询列表
     getList() {
-      if(!this.screenForm.manId) {
-        return this.$errorMsg('请先查询提货人信息');
+      if (!this.screenForm.manId) {
+        return this.$errorMsg("请先查询提货人信息");
       }
 
       this.listLoading = true;
@@ -305,7 +301,7 @@ export default {
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
-      })
+      });
     },
 
     // 更改每页数量
@@ -328,11 +324,11 @@ export default {
 
     handleSelect(selection, row) {
       this.$refs.table.toggleRowSelection(row);
-      this.dataList.forEach(item => {
+      this.dataList.forEach((item) => {
         if (item.informationKey === row.informationKey) {
           this.$refs.table.toggleRowSelection(item);
         }
-      })
+      });
       this.tableSelection = this.$refs.table.selection;
     },
 
@@ -343,7 +339,7 @@ export default {
     // 检查是否一致
     isAllEqual(array) {
       if (array.length > 0) {
-        return !array.some(function(item, index) {
+        return !array.some(function (item, index) {
           return item.informationKey !== array[0].informationKey;
         });
       } else {
@@ -353,16 +349,18 @@ export default {
 
     // 点击打印
     toPrint() {
-      if(!this.isAllEqual(this.tableSelection)) {
-        return this.$errorMsg('只能选择同一个提货订单');
+      if (!this.isAllEqual(this.tableSelection)) {
+        return this.$errorMsg("只能选择同一个提货订单");
       }
 
-      if(!this.tableSelection[0].printNum) {
+      if (!this.tableSelection[0].printNum) {
         this.queryItem = this.tableSelection;
         this.isShowPrint = true;
-      }else {
+      } else {
         this.queryItem = this.tableSelection;
-        this.dialogForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
+        this.dialogForm.createMan = JSON.parse(
+          localStorage.getItem("supply_user")
+        ).nickName;
         this.dialogForm.createDate = this.getDate();
         this.isShowDialog = true;
       }
@@ -382,7 +380,7 @@ export default {
     // },
 
     // 关闭弹窗
-    cancelDialogForm(){
+    cancelDialogForm() {
       this.isShowDialog = false;
       this.$refs.dialogForm.resetFields();
     },
@@ -393,31 +391,31 @@ export default {
         if (valid) {
           let params = {
             shipId: this.queryItem[0].invoiceId,
-            password: this.dialogForm.password
-          }
-          checkPassword(params).then(res => {
+            password: this.dialogForm.password,
+          };
+          checkPassword(params).then((res) => {
             this.cancelDialogForm();
             this.isShowPrint = true;
-          })
+          });
         }
-      })
+      });
     },
-  }
-}
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .main-title {
-    display: flex;
-    justify-content: space-between;
-    align-items: center;
-    height: 60px;
-    border-bottom: 1px solid #DCDFE6;
-    margin-bottom: 20px;
-    .title {
-      font-size: 16px;
-      font-weight: 600;
-      padding-left: 10px;
-    }
+.main-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  height: 60px;
+  border-bottom: 1px solid #dcdfe6;
+  margin-bottom: 20px;
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+    padding-left: 10px;
   }
+}
 </style>