Pārlūkot izejas kodu

fix:仓库认证

zh 2 gadi atpakaļ
vecāks
revīzija
a5fe43e149
1 mainītis faili ar 34 papildinājumiem un 55 dzēšanām
  1. 34 55
      src/views/supply/pickup/check.vue

+ 34 - 55
src/views/supply/pickup/check.vue

@@ -60,12 +60,8 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="3" :lg="3">
-                <el-button
-                  size="mini"
-                  type="primary"
-                  :disabled="!screenForm.phone || countDown != 60"
-                  @click="getCode"
-                >{{ countDown == 60 ? getCodeText : '重新获取(' + countDown + 's)' }}
+                <el-button size="mini" type="primary" :disabled="!screenForm.phone || countDown != 60" @click="getCode"
+                  >{{ countDown == 60 ? getCodeText : '重新获取(' + countDown + 's)' }}
                 </el-button>
               </el-col>
               <el-col :xs="24" :sm="8" :lg="8">
@@ -79,7 +75,7 @@
                   type="primary"
                   :disabled="!screenForm.phone || !screenForm.code"
                   @click="getPickupManInfo"
-                >确 认
+                  >确 认
                 </el-button>
               </el-col>
             </el-row>
@@ -144,11 +140,8 @@
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item prop="status" label-width="0">
                 <el-radio-group v-model="screenForm.status" size="mini" @change="getList()">
-                  <el-radio-button
-                    v-for="(item, index) in statusList"
-                    :key="index"
-                    :label="item.value"
-                  >{{ item.label }}
+                  <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value"
+                    >{{ item.label }}
                   </el-radio-button>
                 </el-radio-group>
               </el-form-item>
@@ -251,18 +244,18 @@
                 <CopyButton
                   :copy-text="
                     scope.row.orderType === 'TRADE' ||
-                      scope.row.orderType === 'HOME' ||
-                      scope.row.orderType === 'REQUISITION_TRADE' ||
-                      scope.row.orderType === 'REQUISITION_HOME'
+                    scope.row.orderType === 'HOME' ||
+                    scope.row.orderType === 'REQUISITION_TRADE' ||
+                    scope.row.orderType === 'REQUISITION_HOME'
                       ? scope.row.enginOrderNo
                       : scope.row.mainOrderId
                   "
                 />
                 <span>{{
                   scope.row.orderType === 'TRADE' ||
-                    scope.row.orderType === 'HOME' ||
-                    scope.row.orderType === 'REQUISITION_TRADE' ||
-                    scope.row.orderType === 'REQUISITION_HOME'
+                  scope.row.orderType === 'HOME' ||
+                  scope.row.orderType === 'REQUISITION_TRADE' ||
+                  scope.row.orderType === 'REQUISITION_HOME'
                     ? scope.row.enginOrderNo
                     : scope.row.mainOrderId
                 }}</span>
@@ -274,13 +267,7 @@
                 <span>{{ scope.row.invoiceId }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="销售类型"
-              prop="saleTypeName"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip />
             <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <CopyButton :copy-text="scope.row.materialCode" />
@@ -311,31 +298,13 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column
-              align="left"
-              label="单位"
-              prop="unit"
-              min-width="100"
-              show-overflow-tooltip
-            />
-            <el-table-column
-              align="left"
-              label="数量"
-              prop="refundableQty"
-              min-width="100"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="单位" prop="unit" min-width="100" show-overflow-tooltip />
+            <el-table-column align="left" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip />
             <!-- <el-table-column align="left" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column> -->
-            <el-table-column
-              align="left"
-              label="仓库"
-              prop="correspondName"
-              min-width="160"
-              show-overflow-tooltip
-            />
+            <el-table-column align="left" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip />
             <el-table-column align="left" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
                 {{ scope.row.pickType == '1' ? '自提' : '物流快递' }}
@@ -376,7 +345,7 @@
             type="primary"
             :disabled="tableSelection.length < 1"
             @click="toPrint"
-          >打印发货单
+            >打印发货单
           </el-button>
         </div>
       </div>
@@ -420,7 +389,15 @@
         <el-button type="primary" @click="submitDialogForm">确 定</el-button>
       </div>
     </el-dialog>
-    <print-preview ref="preView" :add-print="addPrint" :get-oval-dateil="getOvalDateil" :get-new-detail-print-dis-string="getNewDetailPrintDisString" @refreshTableSelection="refreshTableSelection" @initPrint="handleInitPrint" @refreshList="handleRefreshList" />
+    <print-preview
+      ref="preView"
+      :add-print="addPrint"
+      :get-oval-dateil="getOvalDateil"
+      :get-new-detail-print-dis-string="getNewDetailPrintDisString"
+      @refreshTableSelection="refreshTableSelection"
+      @initPrint="handleInitPrint"
+      @refreshList="handleRefreshList"
+    />
 
     <!-- <PickupPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" /> -->
   </div>
@@ -524,22 +501,24 @@ export default {
       }
     },
     setLabel() {
-      return (item) => {
+      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() ? '未过期' : '过期'
+        const expireTime =
+          new Date(item.expireTime).getTime() >= new Date().getTime() * 24 * 3600 * 1000 ? '未过期' : '过期'
 
         return `${item.takerName} - ${item.customerName} - ${item.phone} - ${flag} - ${del} - ${expireTime}`
       }
     },
     setDisabled() {
-      return (item) => {
+      return item => {
         const flag = +item.flag === 1
         const del = +item.del !== 1
-        const expireTime = new Date(item.expireTime).getTime() >= new Date().getTime()
+        const expireTime = new Date(item.expireTime).getTime() >= new Date().getTime() * 24 * 3600 * 1000
         return !(flag && del && expireTime)
       }
-    } },
+    }
+  },
   watch: {
     'screenForm.warehouse'() {
       if (this.check == 1) {
@@ -760,7 +739,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 {
@@ -788,7 +767,7 @@ export default {
         }
         const { data } = await this.getNewDetailPrintDisString()
         if (data) {
-          this.$confirm(<p class='text'>{data}</p>, '提示', {
+          this.$confirm(<p class="text">{data}</p>, '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
             customClass: 'text'