Browse Source

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

18513069273 4 years ago
parent
commit
0376105f68

+ 28 - 25
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -16,8 +16,10 @@
     </el-row>
     <div class="center">
       <h2>鲅鱼圈一号库 102仓位(容量100吨)</h2>
-      <ws-form ref="deptBudgetList" :model="deptBudgetList">
-        <el-table>
+      <!-- <ws-form ref="deptBudgetList" :v-model="deptBudgetList"> -->
+        <el-table
+        :data="improved.records"
+        >
           <el-table-column type="index" label="序号">
             <template scope="scope">
               <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
@@ -30,19 +32,21 @@
           <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>   
           <el-table-column prop="grade" label="品级"> </el-table-column>
           <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
-          <el-table-column prop="buyer" label="类型"> </el-table-column>
+          <el-table-column prop="inOutType" label="类型"> </el-table-column>
           <el-table-column prop="contractNo" label="合同编号"> </el-table-column>
           <el-table-column prop="carNo" label="车牌号"> </el-table-column>
           <el-table-column prop="agent" label="经办人"> </el-table-column>
-          <el-table-column prop=" backOffice" label="内勤"> </el-table-column>
+          <el-table-column prop="backOffice" label="内勤"> </el-table-column>
           <el-table-column prop="updateDate" label="保存时间"> </el-table-column>
           <el-table-column prop="address" label="操作" width="200">
+            <template scope="scope">
           <ws-button
             type="primary"
-            @click="edits(scope.row)"
+             @click="edits(scope.row)"
             v-hasPermission="
               `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
             "
+           
             >编辑</ws-button
           >
           <ws-button
@@ -53,7 +57,7 @@
             "
             >删除</ws-button
           >
-          <!-- </template> -->
+          </template>
         </el-table-column>
         </el-table>
         <div style="text-align: right; padding: 10px">
@@ -64,10 +68,12 @@
             @click="returnWarehouse()"
             >关闭</el-button
           >
+     
         </div>
-      </ws-form>
+      <!-- </ws-form> -->
     </div>
   </div>
+  
 </template>
 <script>
 import {
@@ -120,7 +126,8 @@ export default {
       deletewarehouse:[],
       pageSize:10,
       currentPage:'1',
-      
+      improved:[],
+      row:[],
 
       // 提交类型
       submitType: true,
@@ -156,14 +163,6 @@ export default {
     this.showType = this.isShow
   },
   methods: {
-
-    //编辑
-     edits(row){
-       this.$router.push({
-         name:'warehouseManagementPerfectput',
-         query: { baseId:row.baseId, positionId:row.positionId, pageSize:row.pageSize, currentPage: row.currentPage },
-       })
-     },
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
@@ -173,8 +172,17 @@ export default {
      this.$router.push({path:'warehouseManagementDelete'})
     },
     //编辑
-    edits(){
-      this.$router.push({ path: 'warehouseManagementPerfectput' })
+    edits(row){
+      if(row.inOutFlag==2){
+         this.$router.push({
+           path:'warehouseManagementPerfectput',
+          
+           })
+      }else if(row.inOutFlag==1){
+        this.$router.push({path:''})
+        
+      }
+     
     },
     dateFormat(fmt, date) {
       let ret
@@ -223,15 +231,9 @@ export default {
     })
     .toPromise()
         .then((response) => {
-          this.getList = response
+          this.improved = response
         })
     },
-    // complete(){
-    //   complete({
-
-    //   })
-    // },
-
     handleExamine(row) {
       this.$router.push({
         name: 'salesContractExamine',
@@ -341,4 +343,5 @@ export default {
 /deep/.el-form-item {
   width: 33%;
 }
+
 </style>

+ 32 - 27
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -250,7 +250,7 @@
   </div>
 </template>
 <script>
-import { getList, export1, billoperatehis } from '@/model/contarct/index'
+import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -334,7 +334,21 @@ export default {
     },
     //提交按钮
     submit() {
-      this.$router.push({ path: 'warehouseManagementList' })
+       this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.deptBudgetList.inOutFlag = 2
+          addstorageputList(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.push({ path: 'warehouseManagementList' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
     },
     dateFormat(fmt, date) {
       let ret
@@ -371,33 +385,24 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    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,
-      })
+     getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      pullDown({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 类型
+      pullDown({ constId: 'CON5' })
         .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.storageType = response
         })
     },
     selecttaskType(e) {

+ 3 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -341,7 +341,7 @@ export default {
     this.deptBudgetList.binNumber = this.$route.query.binNumber
     this.getList()
   },
-  // activated() {
+  activated() {
   //   //cg.viewBudget
   //   //cg.viewSpareMoney
   //   // this.getVesselData();
@@ -349,7 +349,8 @@ export default {
   //   this.getList()
   //   console.log(1111)
   //   this.showType = this.isShow
-  // },
+  // this.getList(this.$route.query.baseId,)
+  },
   methods: {
     //返回按钮
     returnWarehouse() {