Browse Source

接口对接

renmy 3 years ago
parent
commit
07e91b8426

+ 8 - 8
src/api/device/allocation.js

@@ -1,7 +1,7 @@
 import request from '@/utils/request'
 
 //列表
-export function deliveryList(data) {
+export function transferList(data) {
     return request({
         url: '/api/v1/app/device/log/batchNum/transfer/pageQuery',
         method: 'post',
@@ -28,10 +28,10 @@ export function transfer(data) {
 }
 
 //设备调拨
-export function transferBatch(data) {
-    return request({
-        url: '/api/v1/appdevice/batchNum/pageQuery',
-        method: 'post',
-        data
-    })
-}
+// export function transferBatch(data) {
+//     return request({
+//         url: '/api/v1/appdevice/batchNum/pageQuery',
+//         method: 'post',
+//         data
+//     })
+// }

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

@@ -2,7 +2,6 @@ import request from '@/utils/request'
 
 //设备信息详情分页
 export function getInfoList(data) {
-    debugger
     return request({
         url: '/api/v1/appdevice/pageQuery',
         method: 'post',
@@ -28,14 +27,6 @@ export function addBattery(data) {
     })
 }
 
-//导出execl模板
-export function excelTemplate() {
-    return request({
-        url: '/api/v1/appdevice/excelTemplate?name=battery.xls',
-        method: 'get'
-    })
-}
-
 //列表也数据统计
 export function dataTotle() {
     return request({

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

@@ -7,13 +7,4 @@ export function addStorageIn(data) {
         method: 'post',
         data
     })
-}
-
-//批次待入库列表
-export function batchStorageList(data) {
-    return request({
-        url: '/api/v1/applibrarylog/showAppDevice',
-        method: 'post',
-        data
-    })
 }

+ 8 - 8
src/router/index.js

@@ -85,14 +85,14 @@ export const constantRoutes = [{
                     import ('@/views/device/storage/index'),
                 meta: { title: '设备入库', icon: 'el-icon-sell' }
             },
-            {
-                path: 'storage/create',
-                name: 'Create',
-                component: () =>
-                    import ('@/views/device/storage/create'),
-                meta: { title: '电池新增', icon: 'el-icon-document' },
-                hidden: true
-            },
+            // {
+            //     path: 'storage/create',
+            //     name: 'Create',
+            //     component: () =>
+            //         import ('@/views/device/storage/create'),
+            //     meta: { title: '电池新增', icon: 'el-icon-document' },
+            //     hidden: true
+            // },
             {
                 path: 'storage/batchWarehousing',
                 name: 'BatchWarehousing',

+ 5 - 3
src/views/device/allocation/allocation-modal.vue

@@ -4,12 +4,12 @@
 			<el-row>
 				<el-col :span="12">
 					<el-form-item label="设备SN">
-						<span>MCLCLL640S2131001</span>
+						<span>{{dataForm.sn[0]}}</span>
 					</el-form-item>
 				</el-col>
 				<el-col :span="12">
 					<el-form-item label="厂家">
-						<span>格林美</span>
+						<span>{{packTitle}}</span>
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -21,7 +21,7 @@
 				</el-col>
 				<el-col :span="12">
 					<el-form-item label="类型">
-						<span>二轮车</span>
+						<span>{{typeTitle}}</span>
 					</el-form-item>
 				</el-col>
 			</el-row>
@@ -79,6 +79,8 @@ export default {
 				customId: '',
 				sn: []
       },
+			packTitle: '',
+			typeTitle: '',
 			option: [
 				{label: '动力电池', value: '1'},
 				{label: '储能电池', value: '2'}

+ 2 - 3
src/views/device/allocation/allocationAdd.vue

@@ -163,9 +163,8 @@ export default {
         importance: undefined,
         title: undefined,
         type: undefined,
-        sort: '+id',
+        sort: '',
 				sn: '',
-				status: [2]
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
@@ -246,7 +245,7 @@ export default {
 				this.$refs.addOrUpdate.title = '设备调拨'
 				this.$refs.addOrUpdate.dataForm.sn = [row.sn]
 				this.$refs.addOrUpdate.packTitle = row.packTitle
-				this.$refs.addOrUpdate.activeName = this.activeName
+				this.$refs.addOrUpdate.typeTitle = row.typeTitle
 			});
 		},
 

+ 4 - 5
src/views/device/allocation/index.vue

@@ -120,7 +120,7 @@
 </template>
 
 <script>
-import { deliveryList } from '@/api/device/allocation'
+import { transferList } from '@/api/device/allocation'
 export default {
   components: {  },
   data() {
@@ -136,9 +136,8 @@ export default {
         index: 1,
         length: 20,
         sn: '',
-        type: null,
-        sort: '+id',
-        status: 2
+        type: '',
+        sort: 'id desc',
       },
 			/**是否显示新增弹窗 */
 			addVisible: false,
@@ -164,7 +163,7 @@ export default {
     //获取列表数据
     getDataList() {
       this.loading = true
-      deliveryList(this.listQuery).then(res => {
+      transferList(this.listQuery).then(res => {
         if (res.code === 200) {
           this.data = res.data
           this.total = res.total

+ 12 - 17
src/views/device/storage/index.vue

@@ -78,7 +78,7 @@
 
       <el-table-column label="入库时间">
         <template slot-scope="scope">
-          {{ scope.row.deliverTime }}
+          {{ scope.row.updateTime }}
         </template>
       </el-table-column>
 
@@ -94,7 +94,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column label="批次编号" prop="model" width="80">
+      <el-table-column label="批次编号">
         <template slot-scope="scope">
           {{ scope.row.batchNum }}
         </template>
@@ -131,7 +131,7 @@
 			@current-change="pageCurrentChangeHandle">
 		</el-pagination>
 
-		<Create v-if="addVisible" ref="create" @refreshDataList="searchHandle"></Create>
+		<Create v-if="addVisible" ref="create" @refreshDataList="getDataList"></Create>
   </div>
 </template>
 
@@ -152,7 +152,7 @@ export default {
         index: 1,
         length: 20,
         sn: '',
-        status: [],
+        status: [1],
         sort: 'id desc',
       },
       //总条数
@@ -185,19 +185,14 @@ export default {
     /**请求列表数据 */
     getDataList() {
       this.loading = true
-      this.listQuery.status.push(1)
-      // getInfoList(this.listQuery).then(res => {
-      //   debugger
-      //   if (res.code === 200) {
-      //     this.data = res.data
-      //     this.total = res.total
-      //     this.loading = false
-      //   } else {
-      //     this.loading = false
-      //     return this.$message.error(res.message)
-      //   }
-      // })
-      getInfoList(this.listQuery).then(response => {
+      let dataForm = {
+        index: this.listQuery.index,
+        length: this.listQuery.length,
+        sn: this.listQuery.sn,
+        status: [1],
+        sort: this.listQuery.sort,
+      }
+      getInfoList(dataForm).then(response => {
         if (response.code === 200) {
           this.data = response.data
           this.total = response.total

+ 1 - 1
src/views/device/storage/warehousing.vue

@@ -91,7 +91,7 @@
 </template>
 
 <script>
-import { batchStorageList, addStorageIn } from '@/api/device/storage'
+import { addStorageIn } from '@/api/device/storage'
 import { getInfoList } from '@/api/device/info'
 import Create from '@/views/device/storage/create.vue'
 import debounce from 'lodash/debounce'