Explorar o código

使用手册、防拆标签图片

qianduan hai 1 ano
pai
achega
56a41c613f

BIN=BIN
src/assets/images/manual.png


+ 19 - 6
src/components/forms.vue

@@ -99,8 +99,8 @@
             <div class="card_purple">
               <el-form-item ref="headimgUpload" :class="item.crosswise ? '' : 'card_fuel_gas'" class="margin-l-50"
                 :label="item.label" :prop="item.field" :rules="detail ? item.rules : {}">
-                <el-upload action="#" list-type="picture-card" :file-list="ruleForm.fileList" :disabled="item.disabled"
-                  :http-request="UploadImage" v-if="operationType != 'logs'">
+                <el-upload style="display: flex;" action="#" list-type="picture-card" :file-list="ruleForm.fileList"
+                  :disabled="item.disabled" :http-request="UploadImage" v-if="operationType != 'logs'">
                   <i slot="default" class="el-icon-plus"></i>
                   <div slot="file" slot-scope="{file}">
                     <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
@@ -137,9 +137,9 @@
 </template>
 
 <script>
-  // import {
-  //   getFileToken,
-  // } from '@/api/user'
+  import {
+    getFileToken,
+  } from '@/api/login'
   export default {
     name: "forms",
     props: {
@@ -238,7 +238,7 @@
               uid: this.file.uid,
               url: '',
             }
-            arr1.url = this.$baseUrl + res.data
+            arr1.url = res.data
             this.ruleForm.fileList.push(arr1)
           }
           loading.close();
@@ -331,6 +331,19 @@
 </script>
 
 <style lang="scss" scoped>
+  .card_purple ::v-deep .el-upload-list__item {
+    width: 120px !important;
+    height: 120px !important;
+  }
+
+  .card_purple ::v-deep .el-upload--picture-card {
+    width: 120px !important;
+    height: 120px !important;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
   .card_employee {
     max-height: 600px;
     overflow-y: auto;

+ 1 - 1
src/components/logisticsTracking.vue

@@ -9,7 +9,7 @@
         </el-timeline-item>
       </el-timeline>
     </div>
-    <el-empty v-else description="暂无物流信息"></el-empty>
+    <el-empty :image-size="100" v-else description="暂无物流信息"></el-empty>
   </div>
 </template>
 

+ 1 - 1
src/components/mobileHumiture.vue

@@ -21,7 +21,7 @@
         <el-pagination layout="prev, pager, next" :total="Total" @current-change="currentChange"></el-pagination>
       </div>
     </div>
-    <el-empty description="暂无数据" v-else></el-empty>
+    <el-empty :image-size="100" description="暂无数据" v-else></el-empty>
   </div>
 </template>
 

+ 2 - 2
src/components/orderDetails.vue

@@ -27,8 +27,8 @@
                 <div class="describe1">{{item.title}}</div>
                 <div class="card_item_image" v-for="(item1,index1) in getReceipt(waybillData[`${item.field}`])"
                   :key="index1" v-if="waybillData[`${item.field}`]">
-                  <el-image style="width: 100px; height: 100px" :src="item1" :preview-src-list="[item1]"
-                    v-if="item1"></el-image>
+                  <el-image style="width: 120px; height: 120px;border-radius: 4px;" :src="item1"
+                    :preview-src-list="[item1]" v-if="item1"></el-image>
                 </div>
               </div>
               <div class="grid-content bg-purple" v-else>

+ 1 - 1
src/components/pagination.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="card_input">
-    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+    <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
       :page-sizes="pageSizes" :pager-count="pagerCountnum" :layout="layout" :total="total">
     </el-pagination>
   </div>

+ 6 - 1
src/components/tables.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- tables -->
   <div class="tables_grid">
-    <el-table ref="tableRef" class="table-style" :data="tableData" style="width: 100%" :border="border"
+    <el-table ref="tableRef" :show-header="showHeader" class="table-style" :data="tableData" style="width: 100%" :border="border"
       :row-key="(val) => rowKey(val)" @cell-click="cellClick" @selection-change="handleSelectionChange">
       <template v-for="(item,index) in tableList">
         <el-table-column :fixed="suspension ? 'right' : false" :label="item.label" :width="item.colWidth" align="center"
@@ -69,6 +69,11 @@
         type: Boolean,
         default: () => false,
       },
+      // 是否显示表头
+      showHeader: {
+        type: Boolean,
+        default: () => true,
+      },
       // 表格数据
       tableList: {
         type: Array,

+ 1 - 1
src/components/waybillInformation.vue

@@ -15,7 +15,7 @@
         <el-image class="img_antidismantle" :src="item" fit="fill"></el-image>
       </div>
     </div>
-    <div class="sign_img">
+    <div class="sign_img" v-if="![3,4,5].includes(list.status)">
       <div class="title_sign">签收 / 拒收图片</div>
       <el-upload class="sign_image_card" action="#" list-type="picture-card" :file-list="ruleForm.fileList"
         :http-request="(params) => singleUpload(params,'fileList')">

+ 4 - 2
src/views/newInquiry.vue

@@ -28,7 +28,7 @@
                 </mobileHumiture>
               </div>
             </div>
-            <el-empty description="暂无数据" v-else></el-empty>
+            <el-empty :image-size="100" description="暂无数据" v-else></el-empty>
           </el-tab-pane>
           <el-tab-pane label="轨迹查询">
             <div class="track_waybill">
@@ -118,7 +118,9 @@
       const waybillNo = this.$route.query.waybillNo
       //解密方法
       let waybillNum = decryptData(waybillNo)
-      this.waybillNo = waybillNum
+
+      this.waybillNo = waybillNum.replace(/\x0E/g, "")
+      // this.waybillNo = arr.substring(0,18)
       this.getInformation()
     },
     methods: {

+ 24 - 0
src/views/page/Home.vue

@@ -12,6 +12,10 @@
           <el-image :src="require('@/assets/images/transport1.svg')"></el-image>
         </div>
       </div>
+      <div class="operationManual" @click="goTickets">
+        <el-image style="width: 30px;height: 30px;" :src="require('@/assets/images/manual.png')"></el-image>
+        <span>冷链送药追溯平台使用手册</span>
+      </div>
     </div>
     <div class="card_head_statistics">
       <div class="item_statistics">
@@ -243,6 +247,10 @@
         };
         that.myChart.setOption(option);
       },
+      // 使用手册
+      goTickets() {
+        window.open('https://kdocs.cn/l/ctKAOZ59Kdqn', "_blank")
+      },
     }
   }
 </script>
@@ -254,6 +262,7 @@
   }
 
   .card_head_home {
+    position: relative;
     display: flex;
     align-items: center;
     background-color: #c8f4fa;
@@ -262,6 +271,21 @@
     flex: none;
   }
 
+  .operationManual {
+    position: absolute;
+    right: 10px;
+    bottom: 10px;
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+
+    span {
+      color: #909399;
+      font-size: 18px;
+      margin-left: 5px;
+    }
+  }
+
   .card_image_flex {
     display: flex;
     align-items: center;

+ 21 - 7
src/views/system/IncubatorManagement.vue

@@ -23,11 +23,15 @@
     </el-dialog>
     <div class="management_card">
       <el-dialog :visible.sync="importDialogVisible" width="500px" :close-on-click-modal="false" @close="closeDialogil">
-        <div class="card_search_input">
-          <div class="title_search">名称:</div>
-          <el-input v-model="nameTitle" placeholder="请输入内容" @input="incubatorInput"></el-input>
-        </div>
         <div class="card_import">
+          <div class="card_incubat">
+            <forms ref="incubatorRules" labelPosition="left" :formNewList="stateRuleList" :ruleForm="stateRuleForm"
+              labelWidth="80px"></forms>
+          </div>
+          <div class="card_search_input">
+            <div class="title_search">名称:</div>
+            <el-input v-model="nameTitle" placeholder="请输入内容" @input="incubatorInput"></el-input>
+          </div>
           <!-- 表单 -->
           <tables ref="refIncubator" :tableList="incubatorList" :tableData="incubatorData"></tables>
           <!-- 分页 -->
@@ -37,8 +41,6 @@
             </pagination>
           </div>
         </div>
-        <forms ref="incubatorRules" labelPosition="left" :formNewList="stateRuleList" :ruleForm="stateRuleForm"
-          labelWidth="80px"></forms>
         <span slot="footer" class="dialog-footer">
           <el-button plain @click="importDialogVisible = false">取 消</el-button>
           <el-button type="primary" :loading="incubatorLoading" @click="incubatorAdd">导 入</el-button>
@@ -315,6 +317,8 @@
               }
               this.incubatorLoading = false
             })
+          } else {
+            this.$message.warning('请选择需要导入的保温箱');
           }
         } else {
           this.$message.error('表单信息不完整,请继续填写完整');
@@ -384,18 +388,28 @@
   }
 
   .card_import {
+    margin-top: 15px;
     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
     margin-bottom: 20px;
+    border-radius: 10px;
   }
 
   .management_card ::v-deep .el-dialog__body {
     padding: 0px 20px !important;
   }
 
+  .card_incubat {
+    padding-left: 15px;
+    border-bottom: 1px solid #EBEEF5;
+    padding-top: 15px;
+    margin-bottom: 15px;
+  }
+
   .card_search_input {
     display: flex;
     align-items: center;
-    margin: 20px 0px 15px 0px;
+    padding: 15px 20px 15px 20px;
+    border-bottom: 1px solid #EBEEF5;
   }
 
   .title_search {

+ 28 - 2
src/views/system/WaybillManagement.vue

@@ -203,7 +203,8 @@
           }]
         },
         ruleForm: {
-          TamperProofLabel: '',
+          tamperProofLabel: '',
+          tamperProofLabelImg: '',
           remark: '',
         },
         formRuleList: [],
@@ -284,6 +285,8 @@
             consigneeAddressDetails: this.recipientsForm.address,
             ...this.ruleForm
           }
+          var fileImage = this.picture(this.ruleForm.fileList)
+          params.tamperProofLabelImg = fileImage
           if (this.operationType == 'add') {
             await addWaybill(params).then(res => {
               if (res.code == 200) {
@@ -320,6 +323,15 @@
         // console.log(this.ruleForm,86)
         // console.log(this.senderForm, this.recipientsForm, 665)
       },
+      picture(arr) {
+        var imgList = JSON.parse(JSON.stringify(arr))
+        var imgArr = []
+        imgList.forEach((item, index) => {
+          imgArr.push(item.url)
+        })
+        var imgString = imgArr.join()
+        return imgString
+      },
       // 添加寄件人
       getSender(value) {
         return new Promise((resolve, reject) => {
@@ -390,7 +402,20 @@
               this.recipientsForm.name = row.consigneeAddressName
               this.recipientsForm.phone = row.consigneeAddressPhone
               this.recipientsForm.address = row.consigneeAddressDetails
-              this.ruleForm.TamperProofLabel = row.tamperProofLabel
+              this.ruleForm.tamperProofLabel = row.tamperProofLabel
+              if (row.tamperProofLabelImg) {
+                var arr = row.tamperProofLabelImg.split(',')
+                var arr3 = []
+                arr.forEach((item, index) => {
+                  var arr1 = {
+                    url: '',
+                  }
+                  arr1.url = item
+                  arr3.push(arr1)
+                })
+                this.ruleForm.fileList = arr3
+                this.ruleForm.tamperProofLabelImg = row.tamperProofLabelImg
+              }
               this.ruleForm.remark = row.remark
             })
           })
@@ -710,6 +735,7 @@
       },
       // 关闭清空表单
       closePopup() {
+        this.ruleForm.fileList = []
         this.$refs.sender.resetForm()
         this.$refs.recipients.resetForm()
         this.$refs.childRules.resetCheck()

+ 15 - 2
src/views/system/waybill.js

@@ -41,6 +41,7 @@ export const employee = () => {
     field: 'coolerBox.name',
     label: '保温箱',
     align: 'center',
+    colWidth: '180px',
   }, {
     field: 'action',
     label: '操作',
@@ -76,13 +77,25 @@ export const employee = () => {
 }
 export const formRules = () => {
   return [{
-    field: 'TamperProofLabel',
+    field: 'tamperProofLabelImg',
+    label: '防拆标签图片',
+    placeholder: '请上传防拆标签图片',
+    type: 'upload',
+    colWidth: 24,
+    crosswise: true,
+    rules: [{
+      required: false,
+      message: '请上传防拆标签图片',
+      trigger: 'blur,change'
+    }]
+  }, {
+    field: 'tamperProofLabel',
     label: '区块链防拆标签码',
     placeholder: '请输入区块链防拆标签码',
     type: 'input',
     colWidth: 24,
     rules: [{
-      required: true,
+      required: false,
       message: '请输入区块链防拆标签码',
       trigger: 'blur'
     }]