Browse Source

前端gjy

18513069273 4 năm trước cách đây
mục cha
commit
26f2e0fd02

+ 1 - 0
src/api/V2/warehouse/index.js

@@ -0,0 +1 @@
+export const API_GET_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/selectWarehouseViewinfo'

+ 7 - 0
src/model/warehouse/index.js

@@ -0,0 +1,7 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+import {
+    API_GET_WAREHOUSE_BASEINFO,
+} from '@/api/V2/warehouse'
+// 列表
+export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)

+ 30 - 80
src/views/warehouse/warehouseManagementList.vue

@@ -38,7 +38,7 @@
       </template>
       <template slot="right">
         <ws-input
-          v-model="searchKeyWord"
+          v-model="warehouseName"
           placeholder="请输入仓库名"
           clearable
           maxlength="500"
@@ -69,7 +69,7 @@
     </BaseHeaderLayout>
     <el-table
       class="wenzi"
-      :data="contractList.records"
+      :data="warehouselist.records"
       style="width: 100%; margin-top: 10px"
     >
       <!-- <el-table-column type="index" label="序号">
@@ -84,7 +84,7 @@
       </el-table-column>
       <el-table-column prop="grade" label="容量(吨)" width="80">
         <!-- <template slot-scope="scope"> -->
-          <!-- <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+        <!-- <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
             scope.row.grade
           }}</span>
           <span v-if="scope.row.grade == '二等品'" class="second-class">{{
@@ -98,14 +98,11 @@
           }}</span> -->
         <!-- </template> -->
       </el-table-column>
-      <el-table-column prop="weight" label="入库量(吨)"> 
-      </el-table-column>
+      <el-table-column prop="weight" label="入库量(吨)"> </el-table-column>
       <el-table-column prop="unitContractPrice" label="出库量(吨)">
       </el-table-column>
-      <el-table-column prop="packingMethod" label="应余量"> 
-      </el-table-column>
-      <el-table-column prop="buyer" label="出入库"> 
-      </el-table-column>
+      <el-table-column prop="packingMethod" label="应余量"> </el-table-column>
+      <el-table-column prop="buyer" label="出入库"> </el-table-column>
       <el-table-column prop="address" label="操作" width="200">
         <template slot-scope="scope">
           <img
@@ -171,13 +168,7 @@
   </div>
 </template>
 <script>
-import {
-  getList,
-  export1,
-  editstatus,
-  billoperatehis,
-  
-} from '@/model/contarct/index'
+import { getList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -203,9 +194,6 @@ export default {
       dialogApproveFormVisible: false,
       // 船舶类型
       monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
-    
       // 是否显示
       showType: true,
       // 年
@@ -225,30 +213,20 @@ export default {
       contractForm: {},
       categoryIndex: 0,
       rulesVendor: {},
-     
+
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
-      handleCurrentChange:{},
+      handleCurrentChange: {},
       deptCircularPage: {},
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
-      contractList: [],
+      warehouselist: [],
       deptBudgetList: {},
       historyList: [],
-      
-      pickerBeginDateBefore: {
-        disabledDate: (time) => {
-          return time.getTime() > Date.now()
-        },
-      },
       accessoryTFs: false,
-      taskTypeList: [
-        { value: '未完成', type: 1 },
-        { value: '已完成', type: 2 },
-        { value: '全部合同', type: '' },
-      ],
+      warehouseName: '',
       pickerOptions: {
         shortcuts: [
           {
@@ -305,18 +283,12 @@ export default {
     this.showType = this.isShow
   },
   methods: {
-    handleLook(){
-
-    },
-    handleAdd(){
+    handleLook() {},
+    handleAdd() {
       this.$router.push({ path: 'warehouseManagementAdd' })
     },
-    handleEdit(){
-
-    },
-    handleDelete(){
-
-    },
+    handleEdit() {},
+    handleDelete() {},
     dateFormat(fmt, date) {
       let ret
       const opt = {
@@ -355,30 +327,12 @@ export default {
     getList() {
       getList({
         compId: sessionStorage.getItem('ws-pf_compId'),
-        contractType: this.contractType,
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord,
-        startDate: this.startDate,
-        endDate: this.endDate,
-        contrPage: this.contrPage,
+        warehouseName: this.warehouseName,
       })
         .toPromise()
         .then((response) => {
-          for (var i = 0; i < response.records.length; i++) {
-            if (response.records[i].addressUrl != null) {
-              response.records[i].addressUrlArray = response.records[
-                i
-              ].addressUrl.split(',')
-            } else {
-              response.records[i].addressUrlArray = []
-            }
-          }
-          this.deptCircularPage.currentPage = response.current
-          this.deptCircularPage.pageSize = response.size
-          this.deptBudgetTotal = response.total
-          this.contractList = response
+          this.warehouselist = response
+          console.log(response)
         })
     },
     // 上传附件
@@ -393,7 +347,6 @@ export default {
       // this.onChangeFlag = true
     },
     editClick(row) {
-      
       var status = ''
       if (row.status == '待执行' || row.status == '已完成') {
         status = '执行中'
@@ -403,9 +356,8 @@ export default {
       //cancelButtonClass: "btn-custom-cancel"
       this.$confirm(`是否将状态改为${status}`, {
         confirmButtonText: '确定',
-        cancelButtonText:'取消',
+        cancelButtonText: '取消',
         type: 'warning',
-      
       })
         .then(() => {
           editstatus({ id: row.id })
@@ -447,7 +399,6 @@ export default {
       this.appendixIdss = row.receiveAttachmentPath
     },
     handleExamine(row) {
-    
       this.$router.push({
         name: 'salesContractExamine',
         query: { id: row.id },
@@ -496,8 +447,7 @@ export default {
       })
     },
     // deletecontract(){},
-    //删除 
-    
+    //删除
 
     approve() {},
     listQuery() {},
@@ -799,14 +749,14 @@ export default {
     cursor: text;
     padding: 0 !important;
   }
-  .el-message-box{
+  .el-message-box {
     width: 440px;
     height: 160px;
-    background: #FFFFFF;
+    background: #ffffff;
     box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
     border-radius: 4px;
   }
- /deep/.el-message-box__message p{
+  /deep/.el-message-box__message p {
     width: 351px;
     height: 20px;
     font-size: 14px;
@@ -815,12 +765,12 @@ export default {
     color: #191919;
     line-height: 20px;
   }
-.el-message-box__title{
-  width: 440px;
-  height: 160px;
-  background: #FFFFFF;
-  box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
-  border-radius: 4px;
-}
+  .el-message-box__title {
+    width: 440px;
+    height: 160px;
+    background: #ffffff;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
 }
 </style>