浏览代码

fix: 仓库认证提货人调整

zh 2 年之前
父节点
当前提交
37d2c1e520
共有 1 个文件被更改,包括 30 次插入13 次删除
  1. 30 13
      src/views/supply/pickup/check.vue

+ 30 - 13
src/views/supply/pickup/check.vue

@@ -98,7 +98,8 @@
                     <el-option
                       v-for="item in userList"
                       :key="item.id"
-                      :label="`${item.takerName} - ${item.customerName}`"
+                      :disabled="setDisabled(item)"
+                      :label="setLabel(item)"
                       :value="item.id"
                     />
                   </el-select>
@@ -521,8 +522,24 @@ export default {
         logisticsId: this.screenForm.logisticsId,
         invoiceId: this.screenForm.invoiceId
       }
-    }
-  },
+    },
+    setLabel() {
+      return (item) => {
+        const flag = +item.flag === 1 ? '有效' : +item.flag === 2 ? '停用' : '失效'
+        const del = +item.del === 1 ? '删除' : '正常'
+        const expireTime = new Date(item.expireTime).getTime() > new Date().getTime() ? '有效' : '失效'
+
+        return `${item.takerName} - ${item.customerName} - ${item.phone} - ${flag} - ${del} - ${expireTime}`
+      }
+    },
+    setDisabled() {
+      return (item) => {
+        const flag = +item.flag === 1
+        const del = +item.del !== 1
+        const expireTime = new Date(item.expireTime).getTime() > new Date().getTime()
+        return !!((flag || del || expireTime))
+      }
+    } },
   watch: {
     'screenForm.warehouse'() {
       if (this.check == 1) {
@@ -634,12 +651,12 @@ export default {
         mobile: this.screenForm.phone,
         code: this.screenForm.code
       }).then(res => {
-        this.$successMsg('验证成功')
-        this.screenForm.name = `${res.data[0].takerName} - ${res.data[0].customerName}`
-        this.screenForm.idCard = res.data[0].identity
-        this.screenForm.manId = res.data[0].id
-        this.screenForm.customerName = res.data[0].customerName
-        this.screenForm.customerId = res.data[0].customerId
+        this.$successMsg('验证成功,请选择提货人信息')
+        // this.screenForm.name = `${res.data[0].takerName} - ${res.data[0].customerName}`
+        // this.screenForm.idCard = res.data[0].identity
+        // this.screenForm.manId = res.data[0].id
+        // this.screenForm.customerName = res.data[0].customerName
+        // this.screenForm.customerId = res.data[0].customerId
         this.userList = res.data
         this.getListCustomer()
       })
@@ -759,13 +776,13 @@ export default {
           for (let i = 0; i < ids.length; i++) {
             console.log(this.dataList.some(e => e.id === ids[i]))
             if (!this.dataList.some(e => e.id === ids[i])) {
-              this.tableSelection= []
+              this.tableSelection = []
               this.$errorMsg(`单被商家取消预约,重新选择`)
               return
             }
           }
         } else {
-          this.tableSelection= []
+          this.tableSelection = []
           this.$errorMsg(`单被商家取消预约,重新选择`)
           return
         }
@@ -794,9 +811,9 @@ export default {
       })
     },
     refreshTableSelection() {
-     this.$refs.table.clearSelection()
+      this.$refs.table.clearSelection()
       this.tableSelection = []
-      console.log(333,'清空');
+      console.log(333, '清空')
     },
     async getNewDetailPrintDisString() {
       const params = []