gjy 3 years ago
parent
commit
3ff3d8d21d

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

@@ -69,8 +69,12 @@ export const API_POST_EDIT_INVENTORYCOSTINFO = '/inventoryCostInfo/api/editInven
 export const API_GET_WEIGHTEDDETAILS = '/weightedDetails/selectInventoryCostInfo'
 // 库
 export const API_GET_WAREHOUSE = '/warehouseBaseInfo/selectWarehouse'
-// 出入库任务
+// 出入库任务负责人
 export const API_GET_WAREHOUSERESPONSIBLE = "/warehouseBaseInfo/selectResponsible"
+// 出入库任务
+export const API_GET_WAREHOUSETASK = "/inOutWarehouseTask/selectWarehouseTask"
+// 修改经办人
+export const API_GET_CHECKORUPDATE = "/inOutWarehouseTask/api/checkOrUpdateInOutTask"
 
 
 

+ 9 - 3
src/model/warehouse/index.js

@@ -34,7 +34,9 @@ import {
     API_POST_EDIT_INVENTORYCOSTINFO,
     API_GET_WEIGHTEDDETAILS,
     API_GET_WAREHOUSE,
-    API_GET_WAREHOUSERESPONSIBLE
+    API_GET_WAREHOUSERESPONSIBLE,
+    API_GET_WAREHOUSETASK,
+    API_GET_CHECKORUPDATE
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // 列表
@@ -104,5 +106,9 @@ export const editinventory = appRx.post(API_POST_EDIT_INVENTORYCOSTINFO,errorCat
 export const weighteddetails = appRx.get(API_GET_WEIGHTEDDETAILS,errorCatcher, errorHandle, filter)
 // 编辑库点费用
 export const getwarehousebase = appRx.get(API_GET_WAREHOUSE,errorCatcher, errorHandle, filter)
-//负者人
-export const getsponsible = appRx.get(API_GET_WAREHOUSERESPONSIBLE,errorCatcher, errorHandle, filter)
+//负责人
+export const getsponsible = appRx.get(API_GET_WAREHOUSERESPONSIBLE,errorCatcher, errorHandle, filter)
+//出入库任务
+export const getwarehousetask = appRx.get(API_GET_WAREHOUSETASK,errorCatcher, errorHandle, filter)
+//修改经办人
+export const postcheckorupdate = appRx.post(API_GET_CHECKORUPDATE,errorCatcher, errorHandle, filter)

+ 2 - 2
src/views/warehouse/component/router/index.js

@@ -279,7 +279,7 @@ const warehouseManagementRouter = {
       meta: {
         title: 'warehouseManagementPutOutLook',
         shortcutEntrance: 'warehouseManagementPutOutLook',
-        module: 'warehouseManagement.warehouse.warehouseInfoTask.View',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
         permissicon: [],
         keepAlive: true
         // module: 'procurement.sparepart.applDetail'
@@ -295,7 +295,7 @@ const warehouseManagementRouter = {
       meta: {
         title: 'tranManagementWarehouseInOutTask',
         shortcutEntrance: 'tranManagementWarehouseInOutTask',
-        module: 'warehouseManagement.warehouse.warehouseInfoTask',
+        module: 'warehouseManagement.warehouse.warehouseInfo',
         permissicon: [],
         keepAlive: true
         // module: 'procurement.sparepart.applDetail'

+ 118 - 74
src/views/warehouse/tranManagementWarehouseInOutTask.vue

@@ -128,16 +128,45 @@
         <el-table-column
           prop="publisher"
           class="table_td"
-          label="发布者"
-        ></el-table-column>
+          label="经办人"
+        >
+          <template slot-scope="scope">
+             <template>
+                <span v-if="!scope.row.editstatus" slot="reference">
+                  {{ scope.row.publisher }}
+                </span>
+                 <el-select
+                 class='staff'
+              v-if="scope.row.editstatus"
+                  v-model="scope.row.publisher"
+              placeholder="请选择经办人"
+              filterable
+              :filter-method="dataFilter"
+              @change="(event)=>{selectstaff(event, scope.row)}"
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+              </template>
+            <img
+             v-if="!scope.row.editstatus"
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick1(scope.row)"
+              alt
+            />
+            <i v-if="scope.row.editstatus" @click='checkstaff' class="el-icon-check"></i>
+          </template></el-table-column>
         <el-table-column prop="taskStatus" label="状态">
           <template slot-scope="scope">
              <template>
                 <span slot="reference">
-                  <span
-                    v-if="scope.row.taskStatus == '待审核'"
-                    class="executory"
-                  ></span>
                   <span
                     v-if="scope.row.taskStatus == '执行中'"
                     class="inExecution"
@@ -170,62 +199,9 @@
             <span
               class="corles"
               @click="nocomplete(scope.row)"
-              v-hasPermission="
-                `warehouseManagement.warehouse.warehouseInfoTask.View`
-              "
               >查看</span
             >
-            <el-divider
-              direction="vertical"
-              v-if="scope.row.taskStatus == '待审核'"
-            ></el-divider>
-            <span
-              class="corles"
-              v-hasPermission="
-                `warehouseManagement.warehouse.warehouseInfoTask.audit`
-              "
-              v-if="scope.row.taskStatus == '待审核'"
-              @click="audit(scope.row)"
-              >审核</span
-            >
-            <el-divider
-              direction="vertical"
-              class="divider"
-              v-if="
-                scope.row.taskStatus == '待审核' ||
-                scope.row.taskStatus == '执行中' ||
-                scope.row.taskStatus == '已驳回'
-              "
-            ></el-divider>
-            <span
-              class="corles"
-              v-hasPermission="
-                `warehouseManagement.warehouse.warehouseInfoTask.edit`
-              "
-              v-if="
-                scope.row.taskStatus == '待审核' ||
-                scope.row.taskStatus == '执行中' ||
-                scope.row.taskStatus == '已驳回'
-              "
-              @click="delivery(scope.row)"
-              >编辑</span
-            >
-            <el-divider
-            v-hasPermission="
-                `warehouseManagement.warehouse.warehouseInfoTask.edit`
-              "
-              direction="vertical"
-              v-if="scope.row.taskId == null"
-            ></el-divider>
-            <span
-              class="corles"
-              v-hasPermission="
-                `warehouseManagement.warehouse.warehouseInfoTask.delete`
-              "
-              v-if="scope.row.taskId == null"
-              @click="deleteclick(scope.row)"
-              >删除</span
-            >
+            
           </template>
         </el-table-column>
       </el-table>
@@ -241,6 +217,11 @@
   </div>
 </template>
 <script>
+import {
+  getwarehousetask,
+  postcheckorupdate,
+  getstaff
+} from '@/model/warehouse/index'
 import { getoreditoutput, outdelete, movestates } from '@/model/tasksport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
@@ -267,9 +248,11 @@ export default {
       dialogApproveFormVisible: false,
       // 船舶类型
       monetaryKey: null,
-      // 表格显示数据
+      id:'',
+      staff:'',
       tableDate: [],
-
+      options:[],
+      staffList:[],
       // 是否显示
       showType: true,
       // 年
@@ -278,16 +261,14 @@ export default {
       currentPage: 1,
       primary: '1',
       pageSize: 10,
-      searchType: 1,
-      searchTypeText: '待审核',
+      searchType: 3,
+      searchTypeText: '执行中',
       searchKeyWord: '',
       contractType: 2,
+      publisherList:[],
       taskTypeList: [
-        { value: '待审核', type: 1 },
         { value: '执行中', type: 3 },
-        { value: '已驳回', type: 2 },
-        { value: '已完成', type: 4 },
-        { value: '全部任务', type: '' },
+        { value: '已完成', type: 4 }
       ],
       // 提交类型
       submitType: true,
@@ -310,11 +291,41 @@ export default {
     this.getList()
     this.showType = this.isShow
   },
-  mounted() {
-    this.getList()
-    this.showType = this.isShow
-  },
   methods: {
+     dataFilter(val) {
+      // console.log(val,"名")
+      this.deptBudgetList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter(item => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    checkstaff(){
+ postcheckorupdate({id:this.id,publisher:this.staff}).toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '经办人修改成功',
+              })
+              this.getList()
+            })
+    },
+    selectstaff(e,item) {
+      this.id=item.id
+      this.staff=e
+      console.log(e,item)
+     
+    },
     //添加
     handleAdd() {
       this.$router.push({ path: 'tranManagementWarehouseInOuttaskAdd' })
@@ -357,15 +368,20 @@ export default {
         })
     },
     getList() {
-      getoreditoutput({
+      console.log(this.$route)
+      getwarehousetask({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
         searchKeyWord: this.searchKeyWord,
+        stringList:this.$route.query.stringList.toString()
       })
         .toPromise()
         .then((response) => {
+          for (let i = 0; i < response.records.length; i++) {
+            response.records[i].editstatus=false
+          }
           this.gainList = response
           this.currentPage = response.current
           this.pageSize = response.size
@@ -427,7 +443,7 @@ export default {
     //查看//传参
     nocomplete(row) {
       this.$router.push({
-        path: 'inOutWarehousetaskEdit',
+        path: 'warehouseManagementPutOutLook',
         query: {
           relevanceId: row.relevanceId,
           businessKey: row.id,
@@ -500,6 +516,29 @@ export default {
         .catch(() => {
           return false
         })
+    },
+    editClick1(row) {
+      console.log(row)
+     row.editstatus=true
+     var arr=JSON.parse(this.$route.query.warehouseBaseInfoList)
+     for (let i = 0; i < arr.length; i++) {
+       if(arr[i].warehouseName==row.warehouseName){
+console.log(arr[i])
+          getstaff({
+            compId: sessionStorage.getItem('ws-pf_compId'),
+            warehouseId: arr[i].id
+          })
+            .toPromise()
+            .then(response => {
+              this.options = response
+              this.staffList = response
+              //  this.agent = response
+            })
+       }
+       
+     }
+         
+          
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -629,6 +668,11 @@ export default {
   width: 30%;
   margin-right: 10px;
 }
+.el-select.staff{
+  width:85%;
+  display:inline-block;
+  margin-right:2px;
+}
 /deep/.typeselect .el-input__inner {
   color: #8890b1;
 }

+ 13 - 6
src/views/warehouse/warehouseManagementList.vue

@@ -26,9 +26,8 @@
         <ws-button v-hasPermission="
            `warehouseManagement.warehouse.warehouseInfo.delete`
           " @click="handleDelete()">删除</ws-button>
-        <ws-button v-hasPermission="
-           `warehouseManagement.warehouse.warehouseInfo.view`
-          " @click="handlTask()">任务</ws-button>
+        <ws-button v-if='list.length>0'
+           @click="handlTask()">任务</ws-button>
       </template>
       <template slot="left">
         <div >
@@ -256,6 +255,7 @@
 <script>
 import {
   getList,
+  getwarehousetask,
   export1,
   editstatus,
   billoperatehis,
@@ -289,7 +289,7 @@ export default {
       monetaryKey: null,
       // 表格显示数据
       tableDate: [],
-
+      list:[],
       // 是否显示
       showType: true,
       // 年
@@ -493,7 +493,13 @@ export default {
     },
     //任务
     handlTask(){
-      this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+      var arr=[]
+      console.log(this.list)
+      for (let i = 0; i < this.list.length; i++) {
+        arr.push(this.list[i].warehouseName)
+      }
+      this.$router.push({ path: 'tranManagementWarehouseInOutTask',query:{stringList:arr,warehouseBaseInfoList:JSON.stringify(this.list)} })
+      // this.$router.push({ path: 'tranManagementWarehouseInOutTask',query:{warehouseBaseInfoList:JSON.stringify(this.list)} })
     },
     dateFormat(fmt, date) {
       let ret
@@ -544,7 +550,8 @@ export default {
         compId: sessionStorage.getItem('ws-pf_compId')
       }).toPromise()
         .then((response) => {
-          console.log(response)
+          this.list=response
+          // console.log(response)
         })
     },
     editClick(row) {

+ 5 - 5
src/views/warehouse/warehouseManagementPutOutLook.vue

@@ -10,7 +10,7 @@
           class="bg-bottom"
           type="primary"
           size="small"
-          @click="returnsales()"
+          @click="revert()"
           ><img
             width="6"
             height="10"
@@ -224,7 +224,7 @@
       
     <!-- 关闭 -->
     <div style="text-align: right; padding: 10px" class="center">
-      <el-button class="bg-bottom" type="primary" size="small" @click="close()"
+      <el-button class="bg-bottom" type="primary" size="small" @click="revert()"
         >关闭</el-button
       >
     </div>
@@ -349,9 +349,9 @@ export default {
       this.$router.go(-1)
       
     },
-    returnsales() {
-      this.$router.push({ path: 'warehouseManagementPutOut' })
-    },
+    // returnsales() {
+    //   this.$router.push({ path: 'warehouseManagementPutOut' })
+    // },
 
     // 获取当前年月日
     getdate() {

+ 2 - 1
vue.config.js

@@ -141,7 +141,8 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.122:9100/',
+        target: 'http://192.168.1.107:8090/',
+        // target: 'http://192.168.1.122:9100/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',