Browse Source

接口对接

renmy 3 years ago
parent
commit
d25cf67847

+ 1 - 2
src/api/device/allocation.js

@@ -12,7 +12,7 @@ export function transferList(data) {
 //调拨查看详情
 export function detailList(data) {
     return request({
-        url: '/api/v1/app/device/log/transfer/pageQuery',
+        url: '/api/v1/app/device/log/transfer/detialQuery',
         method: 'post',
         data
     })
@@ -54,7 +54,6 @@ export function transferBackHandle(data) {
     })
 }
 
-
 //设备调拨
 export function transfer(data) {
     return request({

+ 9 - 0
src/api/device/delivery.js

@@ -18,6 +18,15 @@ export function batchStorageOutList(data) {
     })
 }
 
+//出库查看详情
+export function storageOutDetailList(data) {
+    return request({
+        url: '/api/v1/app/device/log/outstorage/detialQuery',
+        method: 'post',
+        data
+    })
+}
+
 //出库列表
 export function deliveryDefualtList(data) {
     return request({

+ 4 - 4
src/views/device/allocation/allocationAdd.vue

@@ -42,7 +42,7 @@
 
 					<el-table-column label="客户" prop="vin">
 						<template slot-scope="scope">
-							{{ scope.row.total || '-' }}
+							{{ scope.row.status === 2?'北京骑享':'-' }}
 						</template>
 					</el-table-column>
 
@@ -54,7 +54,7 @@
 
 					<el-table-column align="center" label="操作" width="180">
 						<template slot-scope="scope">
-							<el-button v-if="scope.row.status !== 2" @click="cerateHandle(scope.row)" type="text">调拨</el-button>
+							<el-button v-if="scope.row.status === 1" @click="cerateHandle(scope.row)" type="text">调拨</el-button>
 						</template>
 					</el-table-column>
 				</el-table>
@@ -104,7 +104,7 @@
 
 					<el-table-column label="未调拨" prop="plateNumber">
 						<template slot-scope="scope">
-							{{ scope.row.in_storage }}
+							{{ scope.row.total - scope.row.handle - scope.row.out_storage - scope.row.transfer  }}
 						</template>
 					</el-table-column>
 
@@ -116,7 +116,7 @@
 
 					<el-table-column label="不可调拨" prop="vin">
 						<template slot-scope="scope">
-							{{ scope.row.transfer + scope.row.out_storage }}
+							{{ scope.row.transfer + scope.row.out_storage + scope.row.handle }}
 						</template>
 					</el-table-column>
 

+ 8 - 8
src/views/device/allocation/details.vue

@@ -34,7 +34,7 @@
       fit
       highlight-current-row
     >
-			<el-table-column label="设备SN" sortable="custom">
+			<el-table-column label="设备SN">
         <template slot-scope="scope">
           {{ scope.row.sn || '-' }}
         </template>
@@ -72,7 +72,7 @@
 
       <el-table-column align="center" label="入库时间">
         <template slot-scope="scope">
-          <span>{{ scope.row.statusTitle || '-' }}</span>
+          <span>{{ scope.row.instorage_time || '-' }}</span>
         </template>
       </el-table-column>
     </el-table>
@@ -102,17 +102,17 @@ export default {
         index: 1,
         length: 20,
         importance: undefined,
-        batchNum: '',/**批次Id */
         imei: '',
         status: null,
         sn: '',
-        sort: ''
+        sort: '',
+        operateID: null
       }
     }
   },
   created() {
-    if (this.$route.query.batchId !== undefined) {
-      this.listQuery.batchNum = this.$route.query.batchId
+    if (this.$route.query.operateId !== undefined) {
+      this.listQuery.operateID = this.$route.query.operateId
     }
     
     this.getDataList()
@@ -129,11 +129,11 @@ export default {
         index: 1,
         length: 20,
         importance: undefined,
-        batchNum: this.listQuery.batchNum,/**批次Id */
         imei: '',
         status: null,
         sn: '',
-        sort: ''
+        sort: '',
+        operateID: this.listQuery.operateID
       }
       this.getDataList()
     },

+ 7 - 3
src/views/device/allocation/index.vue

@@ -70,7 +70,7 @@
 
           <el-table-column label="调拨数量" prop="plateNumber">
             <template slot-scope="scope">
-              {{ scope.row.total || '-' }}
+              {{ scope.row.total || 0 }}
             </template>
           </el-table-column>
 
@@ -451,7 +451,7 @@ export default {
     infoHandle(row) {
       this.$router.push({path: '/device/allocation/details',
         query: {
-          batchId: row.batch_num
+          operateId: row.operate_id
         }
       })
     },
@@ -476,6 +476,8 @@ export default {
         return '动力电池'
       } else if (value === 2 || value === '2') {
         return '储能电池'
+      } else {
+        return '-'
       }
     },
     TFUserdStr(value) {
@@ -486,8 +488,10 @@ export default {
         } else if(arr[0] === '2') {
           return '智慧运维'
         }
-      } else {
+      } else if(arr.length > 1) {
         return '智慧运营,智慧运维'
+      } else {
+        return '-'
       }
     }
   }

+ 6 - 5
src/views/device/delivery/details.vue

@@ -66,7 +66,7 @@
 
       <el-table-column label="出库时间">
         <template slot-scope="scope">
-          {{ scope.row.updateTime || '-' }}
+          {{ scope.row.addTime || '-' }}
         </template>
       </el-table-column>
 
@@ -85,7 +85,7 @@
 </template>
 
 <script>
-import { deliveryList } from '@/api/device/delivery'
+import { storageOutDetailList } from '@/api/device/delivery'
 
 export default {
   components: {  },
@@ -104,7 +104,8 @@ export default {
         sn: '',
         type: null,
         sort: '',
-        batchNum: ''
+        batchNum: '',
+        operateID: null
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
@@ -119,7 +120,7 @@ export default {
   },
   created() {
     if (this.$route.query.batchId !== undefined) {
-      this.listQuery.batchNum = this.$route.query.batchId
+      this.listQuery.operateID = this.$route.query.batchId
     }
     this.getDataList()
   },
@@ -146,7 +147,7 @@ export default {
     //获取列表数据
     getDataList() {
       this.loading = true
-      deliveryList(this.listQuery).then(res => {
+      storageOutDetailList(this.listQuery).then(res => {
         if (res.code === 200) {
           this.data = res.data
           this.total = res.total

+ 2 - 2
src/views/device/delivery/index.vue

@@ -108,7 +108,7 @@
 
           <el-table-column align="center" label="操作" width="180">
             <template slot-scope="scope">
-              <el-button @click="gotoDetailHandle(scope.row.batch_num)" type="text">查看详情</el-button>
+              <el-button @click="gotoDetailHandle(scope.row.operate_id)" type="text">查看详情</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -376,7 +376,7 @@ export default {
         length: 20,
         sn: '',
         type: null,
-        sort: '+id',
+        sort: '',
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,

+ 1 - 1
src/views/device/handle/index.vue

@@ -63,7 +63,7 @@
 
           <el-table-column label="入库SN">
             <template slot-scope="scope">
-              {{ scope.row.dt || '-' }}
+              {{ scope.row.sn || '-' }}
             </template>
           </el-table-column>
 

+ 2 - 1
src/views/device/info/details.vue

@@ -137,6 +137,7 @@ export default {
         sn: '',
         sort: '',
         statusStr: null,
+        operateID: null
       },
       //状态选项
       statusOptins: [
@@ -155,7 +156,7 @@ export default {
   },
   created() {
     if (this.$route.query.batchId !== undefined) {
-      this.listQuery.batchNum = this.$route.query.batchId
+      this.listQuery.operateID = this.$route.query.batchId
     }
 		if (this.$route.query.inTime !== undefined) {
       this.inTime = this.$route.query.inTime

+ 4 - 4
src/views/device/info/index.vue

@@ -67,7 +67,7 @@
             </template>
           </el-table-column>
 
-          <el-table-column label="设备数量" prop="plateNumber">
+          <el-table-column label="设备数量">
             <template slot-scope="scope">
               {{ scope.row.total || '-' }}
             </template>
@@ -85,9 +85,9 @@
             </template>
           </el-table-column>
 
-          <el-table-column label="已入库" width="80">
+          <el-table-column label="已入库">
             <template slot-scope="scope">
-              {{ scope.row.in_storage || '-' }}
+              {{ scope.row.in_storage || 0 }}
             </template>
           </el-table-column>
 
@@ -494,7 +494,7 @@ export default {
       this.$router.push({
         path: '/device/info/details',
         query: {
-          batchId: row.batch_num,
+          batchId: row.operate_id,
           inTime: row.add_time,
           total: row.total,
           storage: row.total-row.in_storage