9/29 工位维护优化增加上货工位
							parent
							
								
									6db9098731
								
							
						
					
					
						commit
						2ab26bf71f
					
				@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					import axios from "@/utils/request";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//绑定采集工位
 | 
				
			||||||
 | 
					export function bindCollect(query) {
 | 
				
			||||||
 | 
					  return axios({
 | 
				
			||||||
 | 
					    url: "/udiwms/sysWorkplace/bindCollect",
 | 
				
			||||||
 | 
					    method: "post",
 | 
				
			||||||
 | 
					    data: query
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getBindCollectList(query) {
 | 
				
			||||||
 | 
					  return axios({
 | 
				
			||||||
 | 
					    url: "/udiwms/basic/collectPoints/getBindCollectList",
 | 
				
			||||||
 | 
					    method: "get",
 | 
				
			||||||
 | 
					    params: query
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,272 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-form :model="query" label-width="auto" v-show="showSearch" size="mini" class="order-el-form">
 | 
				
			||||||
 | 
					      <el-row :gutter="20">
 | 
				
			||||||
 | 
					        <!--<el-col :span="8">-->
 | 
				
			||||||
 | 
					        <!--  <el-form-item label="当前仓库:" class="query-form-item">-->
 | 
				
			||||||
 | 
					        <!--    <invSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>-->
 | 
				
			||||||
 | 
					        <!--  </el-form-item>-->
 | 
				
			||||||
 | 
					        <!--</el-col>-->
 | 
				
			||||||
 | 
					        <el-col :span="10">
 | 
				
			||||||
 | 
					          <el-form-item label="采集工位:" class="query-form-item">
 | 
				
			||||||
 | 
					            <el-select v-model="query.workplaceCode" clearable placeholder="请选择" filterable @change="changePlace">
 | 
				
			||||||
 | 
					              <el-option
 | 
				
			||||||
 | 
					                v-for="item in workPlaces"
 | 
				
			||||||
 | 
					                :key="item.code"
 | 
				
			||||||
 | 
					                :label="item.label"
 | 
				
			||||||
 | 
					                :value="item.code"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					              </el-option>
 | 
				
			||||||
 | 
					            </el-select>
 | 
				
			||||||
 | 
					          </el-form-item>
 | 
				
			||||||
 | 
					        </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-col :span="10">
 | 
				
			||||||
 | 
					          <el-form-item label="业务名称:" class="query-form-item">
 | 
				
			||||||
 | 
					            <el-select v-model="query.documentTypeCode" clearable placeholder="请选择" filterable>
 | 
				
			||||||
 | 
					              <el-option
 | 
				
			||||||
 | 
					                v-for="item in busTypes"
 | 
				
			||||||
 | 
					                :key="item.code"
 | 
				
			||||||
 | 
					                :label="item.label"
 | 
				
			||||||
 | 
					                :value="item.code"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					              </el-option>
 | 
				
			||||||
 | 
					            </el-select>
 | 
				
			||||||
 | 
					          </el-form-item>
 | 
				
			||||||
 | 
					        </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <!--<el-col :span="10">-->
 | 
				
			||||||
 | 
					        <!--  <el-form-item label="编码/名称:" class="query-form-item">-->
 | 
				
			||||||
 | 
					        <!--    <el-input v-model="query.busKey" placeholder="请输入业务编号/业务名称" clearable>-->
 | 
				
			||||||
 | 
					        <!--    </el-input>-->
 | 
				
			||||||
 | 
					        <!--  </el-form-item>-->
 | 
				
			||||||
 | 
					        <!--</el-col>-->
 | 
				
			||||||
 | 
					      </el-row>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="top-right-btn">
 | 
				
			||||||
 | 
					      <el-button-group>
 | 
				
			||||||
 | 
					        <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
 | 
				
			||||||
 | 
					        <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
 | 
				
			||||||
 | 
					        <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
 | 
				
			||||||
 | 
					        <el-button type="primary" icon="el-icon-plus" @click="chooseCollect">选入</el-button>
 | 
				
			||||||
 | 
					      </el-button-group>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <el-divider style="margin: 15px"></el-divider>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
 | 
				
			||||||
 | 
					              highlight-current-row @current-change="handCurrentChange" ref="table"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <el-table-column type="selection" width="55" :selectable="checkSelectable">
 | 
				
			||||||
 | 
					      </el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column type="index" label="序号"></el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column label="采集工位名称 " prop="workplaceName"></el-table-column>
 | 
				
			||||||
 | 
					      <el-table-column label="业务类型 " prop="busName"></el-table-column>
 | 
				
			||||||
 | 
					      <!--<el-table-column label="备注:" prop="remark" ></el-table-column>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    </el-table>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <pagination
 | 
				
			||||||
 | 
					      :total="total"
 | 
				
			||||||
 | 
					      :limit.sync="query.limit"
 | 
				
			||||||
 | 
					      :page.sync="query.page"
 | 
				
			||||||
 | 
					      @pagination="getList()"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					    </pagination>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { filterListByWorkplace, getWorkBindBusTypes } from '@/api/basic/workPlace/sysWorkplaceDocuments'
 | 
				
			||||||
 | 
					import { filterWorkOptimize } from '@/api/basic/workPlace/sysWorkplaceManage'
 | 
				
			||||||
 | 
					import { bindCollect } from '@/api/basic/collectPoint/cargowWorkplaceManage'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    closeDialog: {
 | 
				
			||||||
 | 
					      type: Function,
 | 
				
			||||||
 | 
					      required: true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    workplaceId: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      required: true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    collectWorks: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      required: true
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  components: {},
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      Dictionary: false,
 | 
				
			||||||
 | 
					      showSearch: true,
 | 
				
			||||||
 | 
					      query: {
 | 
				
			||||||
 | 
					        workplaceCode: null,
 | 
				
			||||||
 | 
					        documentTypeCode: null,
 | 
				
			||||||
 | 
					        workPlaceClass: 1,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      DeptList: [],
 | 
				
			||||||
 | 
					      list: [],
 | 
				
			||||||
 | 
					      busTypeList: [],
 | 
				
			||||||
 | 
					      busTypeTotal: 0,
 | 
				
			||||||
 | 
					      total: 0,
 | 
				
			||||||
 | 
					      busQuery: {
 | 
				
			||||||
 | 
					        busKey: '',
 | 
				
			||||||
 | 
					        workplaceCode: null,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 100
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      workPlaces: [],
 | 
				
			||||||
 | 
					      busTypes: [],
 | 
				
			||||||
 | 
					      collectQuery: {
 | 
				
			||||||
 | 
					        workplaceCode: null,
 | 
				
			||||||
 | 
					        collectWorkCodes: [],
 | 
				
			||||||
 | 
					        collectBusTypes: []
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    hideSearch() {
 | 
				
			||||||
 | 
					      this.showSearch = !this.showSearch
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    onReset() {
 | 
				
			||||||
 | 
					      this.$router.push({
 | 
				
			||||||
 | 
					        path: ''
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      this.busQuery = {
 | 
				
			||||||
 | 
					        busKey: '',
 | 
				
			||||||
 | 
					        workPlaceClass: 1,
 | 
				
			||||||
 | 
					        workplaceCode: null,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					        this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    onSubmit() {
 | 
				
			||||||
 | 
					      this.busQuery.page = 1
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // containsObject(collectWorks,row){
 | 
				
			||||||
 | 
					    //   return collectWorks.some( collect => {
 | 
				
			||||||
 | 
					    //     return collect.workplaceCode === row.workplaceCode && collect.documentTypeCode === row.documentTypeCode
 | 
				
			||||||
 | 
					    //   })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // checkSelectable(row) {
 | 
				
			||||||
 | 
					    //   if (this.collectWorks == null) {
 | 
				
			||||||
 | 
					    //     return true
 | 
				
			||||||
 | 
					    //   } else {
 | 
				
			||||||
 | 
					    //     if (this.collectWorks.length > 0) {
 | 
				
			||||||
 | 
					    //       if (this.containsObject(this.collectWorks,row)){
 | 
				
			||||||
 | 
					    //         return -1
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //      return true
 | 
				
			||||||
 | 
					    //     } else {
 | 
				
			||||||
 | 
					    //       return true
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    //新增数据
 | 
				
			||||||
 | 
					    handCurrentChange(row) {
 | 
				
			||||||
 | 
					      this.rowList = row
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getList() {
 | 
				
			||||||
 | 
					      filterListByWorkplace(this.query).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          this.list = res.data.list
 | 
				
			||||||
 | 
					          this.total = res.data.total
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          return this.$message.error('获取错误')
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    findWorkPlace(val) {
 | 
				
			||||||
 | 
					      let query = {
 | 
				
			||||||
 | 
					        userIdFlag: false,
 | 
				
			||||||
 | 
					        workPlaceClass: 1,
 | 
				
			||||||
 | 
					        key: val,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      filterWorkOptimize(query)
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.loading = false
 | 
				
			||||||
 | 
					          this.workPlaces = response.data || []
 | 
				
			||||||
 | 
					          if (this.workPlaces.length == 1) {
 | 
				
			||||||
 | 
					            this.query.workPlaceCode = this.workPlaces[0].code
 | 
				
			||||||
 | 
					            this.getWorkBindBusTypes(this.query.workPlaceCode)
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.loading = false
 | 
				
			||||||
 | 
					          this.workPlaces = []
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getWorkBindBusTypes(query) {
 | 
				
			||||||
 | 
					      this.busQuery.workplaceCode = query
 | 
				
			||||||
 | 
					      getWorkBindBusTypes(this.busQuery).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          let busTypes = res.data.list || []
 | 
				
			||||||
 | 
					          // _this.options.getWorkPlace = res.data.list || [];
 | 
				
			||||||
 | 
					          let getWorkPlace = busTypes.map(busType => {
 | 
				
			||||||
 | 
					            return {
 | 
				
			||||||
 | 
					              code: busType.documentTypeCode,
 | 
				
			||||||
 | 
					              label: busType.busName
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          this.busTypes = getWorkPlace
 | 
				
			||||||
 | 
					          if (this.busTypes.length == 1) {
 | 
				
			||||||
 | 
					            this.query.busType = this.busTypes[0].code
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.query.busType = null
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    changePlace(query) {
 | 
				
			||||||
 | 
					      this.getWorkBindBusTypes(query)
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chooseCollect() {
 | 
				
			||||||
 | 
					      let selectList = this.$refs.table.selection
 | 
				
			||||||
 | 
					      let selecTypetList = selectList.map(item => item.documentTypeCode)
 | 
				
			||||||
 | 
					      let selecCollecttList = selectList.map(item => item.workplaceCode)
 | 
				
			||||||
 | 
					      let seleceBusId = selectList.map(item => item.id)
 | 
				
			||||||
 | 
					      this.collectQuery.workPlaceCode = this.workplaceId
 | 
				
			||||||
 | 
					      this.collectQuery.collectBusTypes = selecTypetList
 | 
				
			||||||
 | 
					      this.collectQuery.collectWorkCodes = selecCollecttList
 | 
				
			||||||
 | 
					      this.collectQuery.relBusIdFks = seleceBusId
 | 
				
			||||||
 | 
					      bindCollect(this.collectQuery).then(res => {
 | 
				
			||||||
 | 
					        if (res.code != 20000) {
 | 
				
			||||||
 | 
					          return this.$message.error(res.message)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        this.$message.success('绑定成功')
 | 
				
			||||||
 | 
					        this.closeDialog()
 | 
				
			||||||
 | 
					      }).catch(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created() {
 | 
				
			||||||
 | 
					    this.getList()
 | 
				
			||||||
 | 
					    this.findWorkPlace('')
 | 
				
			||||||
 | 
					    this.getWorkBindBusTypes('')
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.iconButton {
 | 
				
			||||||
 | 
					  margin-left: 0px;
 | 
				
			||||||
 | 
					  height: 30px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@ -0,0 +1,989 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <el-card>
 | 
				
			||||||
 | 
					      <el-row type="flex">
 | 
				
			||||||
 | 
					        <el-col style="flex: 1" v-show="Dictionary">
 | 
				
			||||||
 | 
					          <el-col v-if="showSearch" style="min-width: 200px; max-width: 100%">
 | 
				
			||||||
 | 
					            <el-tree
 | 
				
			||||||
 | 
					              :data="treeList"
 | 
				
			||||||
 | 
					              class="tree"
 | 
				
			||||||
 | 
					              :default-expand-all="true"
 | 
				
			||||||
 | 
					              @node-click="handleNodeClick"
 | 
				
			||||||
 | 
					              :expand-on-click-node="false"
 | 
				
			||||||
 | 
					              highlight-current
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              <span class="custom-tree-node" slot-scope="{ node, data }">
 | 
				
			||||||
 | 
					                <span style="font-size: 14px; font-weight: 500; width:200px">{{
 | 
				
			||||||
 | 
					                    node.label
 | 
				
			||||||
 | 
					                  }}</span>
 | 
				
			||||||
 | 
					                  <el-button
 | 
				
			||||||
 | 
					                    type="text"
 | 
				
			||||||
 | 
					                    size="mini"
 | 
				
			||||||
 | 
					                    style="margin-left: 10px"
 | 
				
			||||||
 | 
					                    v-if="data.parentCode == null"
 | 
				
			||||||
 | 
					                    @click="() => append(data,'add')"
 | 
				
			||||||
 | 
					                  >
 | 
				
			||||||
 | 
					                  新增
 | 
				
			||||||
 | 
					                </el-button>
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  v-if="data.parentCode != null"
 | 
				
			||||||
 | 
					                  type="text"
 | 
				
			||||||
 | 
					                  size="mini"
 | 
				
			||||||
 | 
					                  style="margin-left: 10px"
 | 
				
			||||||
 | 
					                  @click="() => append(data, 'edit')"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					            编辑
 | 
				
			||||||
 | 
					          </el-button>
 | 
				
			||||||
 | 
					          <el-button
 | 
				
			||||||
 | 
					            type="text"
 | 
				
			||||||
 | 
					            size="mini"
 | 
				
			||||||
 | 
					            v-if="data.parentCode != null"
 | 
				
			||||||
 | 
					            @click="delTree(data)"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            删除
 | 
				
			||||||
 | 
					          </el-button>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              </span>
 | 
				
			||||||
 | 
					            </el-tree>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-button
 | 
				
			||||||
 | 
					          type="success"
 | 
				
			||||||
 | 
					          @click="Dictionary = !Dictionary"
 | 
				
			||||||
 | 
					          icon="el-icon-arrow-left"
 | 
				
			||||||
 | 
					          v-show="Dictionary"
 | 
				
			||||||
 | 
					          class="iconButton"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					        </el-button>
 | 
				
			||||||
 | 
					        <el-button
 | 
				
			||||||
 | 
					          type="success"
 | 
				
			||||||
 | 
					          @click="Dictionary = !Dictionary"
 | 
				
			||||||
 | 
					          icon="el-icon-arrow-right"
 | 
				
			||||||
 | 
					          v-show="!Dictionary"
 | 
				
			||||||
 | 
					          class="iconButton"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					        </el-button>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-col style="border-left: 3px solid #dddddd; overflow-y: hidden">
 | 
				
			||||||
 | 
					    <el-card>
 | 
				
			||||||
 | 
					      <el-form :model="query" label-width="auto" v-show="showSearch" size="mini" class="order-el-form">
 | 
				
			||||||
 | 
					        <el-row :gutter="20">
 | 
				
			||||||
 | 
					          <el-col :span="8">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <el-form-item label="当前部门:" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-select v-model="query.deptCode" class="width-full" placeholder="请选择" filterable clearable
 | 
				
			||||||
 | 
					                         @change="changeDept" style="width: 80%"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-option  v-for="item in DeptList" :key="item.id" :label="item.name" :value="item.code"/>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					              <!--<el-option v-for="item in " :key="item.id" :label="item.name" :value="item.code"/>-->
 | 
				
			||||||
 | 
					              <!--  <deptSelect  :value.sync="userQuery.deptCode"-->
 | 
				
			||||||
 | 
					              <!--               :changeValue.sync="changeUsers"/>-->
 | 
				
			||||||
 | 
					              <!--  <!–<deptSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>–>-->
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <!--<el-col :span="8">-->
 | 
				
			||||||
 | 
					          <!--  <el-form-item label="当前部门:" class="query-form-item">-->
 | 
				
			||||||
 | 
					          <!--    <deptSelect style="width: 80%" :value.sync="query.deptCode"/>-->
 | 
				
			||||||
 | 
					          <!--    <!–<deptSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>–>-->
 | 
				
			||||||
 | 
					          <!--  </el-form-item>-->
 | 
				
			||||||
 | 
					          <!--</el-col>-->
 | 
				
			||||||
 | 
					          <el-col :span="8">
 | 
				
			||||||
 | 
					            <el-form-item label="编码/名称:" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-input v-model="query.key" placeholder="请输入编码/工位名称" clearable style="width: 80%">
 | 
				
			||||||
 | 
					              </el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="8">
 | 
				
			||||||
 | 
					            <el-form-item label="工位状态:" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-select v-model="query.workplaceStatus" placeholder="工位状态" clearable style="width: 80%">
 | 
				
			||||||
 | 
					                <el-option label="暂停" :value="0"></el-option>
 | 
				
			||||||
 | 
					                <el-option label="启用" :value="1"></el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </el-form>
 | 
				
			||||||
 | 
					      <div class="top-right-btn">
 | 
				
			||||||
 | 
					        <el-button-group>
 | 
				
			||||||
 | 
					          <el-button icon="el-icon-view" type="primary" @click="hideSearch">显示/隐藏搜索栏</el-button>
 | 
				
			||||||
 | 
					          <el-button type="primary" icon="el-icon-refresh" @click="onReset">重置</el-button>
 | 
				
			||||||
 | 
					          <el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
 | 
				
			||||||
 | 
					          <el-button type="primary" icon="el-icon-plus" @click="addCargowWorkplace">新增上货工位</el-button>
 | 
				
			||||||
 | 
					        </el-button-group>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
 | 
				
			||||||
 | 
					                highlight-current-row @current-change="handCurrentChange"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <el-table-column type="index" label="序号"></el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column label="工位编码" prop="workplaceId" width="90"></el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column label="工位名称" prop="workplaceName" width="120"></el-table-column>
 | 
				
			||||||
 | 
					        <!--<el-table-column label="工位类型" prop="workplaceType" width="90">-->
 | 
				
			||||||
 | 
					        <!--  <template slot-scope="scope">-->
 | 
				
			||||||
 | 
					        <!--    <span>{{ workplaceTypeMao[scope.row.workplaceType] }}</span>-->
 | 
				
			||||||
 | 
					        <!--  </template>-->
 | 
				
			||||||
 | 
					        <!--</el-table-column>-->
 | 
				
			||||||
 | 
					        <!--              <el-table-column label="库存预警数" prop="invRemindNumber" width="90"></el-table-column>-->
 | 
				
			||||||
 | 
					        <el-table-column label="工位状态" prop="workplaceStatus" width="90">
 | 
				
			||||||
 | 
					          <template slot-scope="scope">
 | 
				
			||||||
 | 
					            <span>{{ workplaceStatusMap[scope.row.workplaceStatus] }}</span>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column label="工位类型" prop="workPlaceClass" width="90">
 | 
				
			||||||
 | 
					          <template slot-scope="scope">
 | 
				
			||||||
 | 
					            <span>{{ workPlaceClasss[scope.row.workPlaceClass] }}</span>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					        <!--<el-table-column label="所属组别" prop="categoryName" width="90"></el-table-column>-->
 | 
				
			||||||
 | 
					        <!--<el-table-column label="单据类型编号" prop="busTypeCode" width="100"></el-table-column>-->
 | 
				
			||||||
 | 
					        <!--<el-table-column label="单据类型名称" prop="busTypeName" width="100"></el-table-column>-->
 | 
				
			||||||
 | 
					        <!--<el-table-column label="单据来源系统" prop="fromTypeName" width="100"></el-table-column>-->
 | 
				
			||||||
 | 
					        <el-table-column label="所属部门" prop="deptCodeName" width="90"></el-table-column>
 | 
				
			||||||
 | 
					        <!--<el-table-column label="默认仓库" prop="invName" width="90"></el-table-column>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-table-column label="工位负责人" prop="employeeName" width="90"></el-table-column>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-table-column label="创建时间" prop="createTime" width="140"></el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column label="备注" prop="remake" width="140"></el-table-column>
 | 
				
			||||||
 | 
					        <el-table-column label="操作" fixed="right" width="160">
 | 
				
			||||||
 | 
					          <template slot-scope="scope">
 | 
				
			||||||
 | 
					            <el-button
 | 
				
			||||||
 | 
					              type="text"
 | 
				
			||||||
 | 
					              size="small"
 | 
				
			||||||
 | 
					              @click.native.stop="printLabel(scope.row)"
 | 
				
			||||||
 | 
					            >工位标签
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            <el-button
 | 
				
			||||||
 | 
					              type="text"
 | 
				
			||||||
 | 
					              size="small"
 | 
				
			||||||
 | 
					              @click.native.stop="edit(scope.row)"
 | 
				
			||||||
 | 
					            >编辑
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button
 | 
				
			||||||
 | 
					              type="text"
 | 
				
			||||||
 | 
					              size="small"
 | 
				
			||||||
 | 
					              @click.native.stop="deleteWorkplace(scope.row)"
 | 
				
			||||||
 | 
					            >删除
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </template>
 | 
				
			||||||
 | 
					        </el-table-column>
 | 
				
			||||||
 | 
					      </el-table>
 | 
				
			||||||
 | 
					      <pagination
 | 
				
			||||||
 | 
					        :total="total"
 | 
				
			||||||
 | 
					        :limit.sync="query.limit"
 | 
				
			||||||
 | 
					        :page.sync="query.page"
 | 
				
			||||||
 | 
					        @pagination="getList"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					      </pagination>
 | 
				
			||||||
 | 
					    </el-card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      <el-tabs type="border-card" style="margin: 15px">
 | 
				
			||||||
 | 
					        <el-tab-pane>
 | 
				
			||||||
 | 
					          <!--              {{ workplaceName }}--->
 | 
				
			||||||
 | 
					          <span slot="label">采集工位</span>
 | 
				
			||||||
 | 
					          <el-form :inline="true" :model="busQuery" class="query-form" size="mini"
 | 
				
			||||||
 | 
					                   style="margin-bottom: 10px"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            <el-form-item class="query-form-item" label="采集工位名称:">
 | 
				
			||||||
 | 
					              <el-input
 | 
				
			||||||
 | 
					                v-model="busQuery.busKey"
 | 
				
			||||||
 | 
					                placeholder="采集工位名称"
 | 
				
			||||||
 | 
					                clearable
 | 
				
			||||||
 | 
					              ></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
					              <el-button-group>
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  type="primary"
 | 
				
			||||||
 | 
					                  icon="el-icon-refresh"
 | 
				
			||||||
 | 
					                  @click="onBusTypeReset"
 | 
				
			||||||
 | 
					                >重置
 | 
				
			||||||
 | 
					                </el-button>
 | 
				
			||||||
 | 
					                <el-button type="primary" @click="loadBusList"
 | 
				
			||||||
 | 
					                           icon="el-icon-search"
 | 
				
			||||||
 | 
					                >查询
 | 
				
			||||||
 | 
					                </el-button
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                <el-button type="primary" @click="chooseCollect"
 | 
				
			||||||
 | 
					                           icon="el-icon-plus"
 | 
				
			||||||
 | 
					                >选入采集工位
 | 
				
			||||||
 | 
					                </el-button
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					              </el-button-group>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-form>
 | 
				
			||||||
 | 
					          <el-table :data="collectList" style="width: 100%;" :row-style="{height: '32px' }"
 | 
				
			||||||
 | 
					                    highlight-current-row
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            <el-table-column type="index" label="序号"></el-table-column>
 | 
				
			||||||
 | 
					            <!--                <el-table-column label="业务类型编码 " prop="documentTypeCode" width="100"></el-table-column>-->
 | 
				
			||||||
 | 
					            <el-table-column label="采集工位名称" prop="collectName" ></el-table-column>
 | 
				
			||||||
 | 
					            <el-table-column label="业务名称 " prop="busTypeName" ></el-table-column>
 | 
				
			||||||
 | 
					            <el-table-column label="操作" fixed="right" width="120">
 | 
				
			||||||
 | 
					              <template slot-scope="scope">
 | 
				
			||||||
 | 
					                <!--                    <el-button-->
 | 
				
			||||||
 | 
					                <!--                      type="text"-->
 | 
				
			||||||
 | 
					                <!--                      size="small"-->
 | 
				
			||||||
 | 
					                <!--                      @click.native.stop="updateBusType(scope.row)"-->
 | 
				
			||||||
 | 
					                <!--                    >编辑-->
 | 
				
			||||||
 | 
					                <!--                    </el-button>-->
 | 
				
			||||||
 | 
					                <el-button
 | 
				
			||||||
 | 
					                  type="text"
 | 
				
			||||||
 | 
					                  size="small"
 | 
				
			||||||
 | 
					                  @click.native.stop="removeBusType(scope.row)"
 | 
				
			||||||
 | 
					                >删除
 | 
				
			||||||
 | 
					                </el-button>
 | 
				
			||||||
 | 
					              </template>
 | 
				
			||||||
 | 
					            </el-table-column>
 | 
				
			||||||
 | 
					          </el-table>
 | 
				
			||||||
 | 
					          <!--<pagination-->
 | 
				
			||||||
 | 
					          <!--  :total="busTypeTotal"-->
 | 
				
			||||||
 | 
					          <!--  :limit.sync="busQuery.limit"-->
 | 
				
			||||||
 | 
					          <!--  :page.sync="busQuery.page"-->
 | 
				
			||||||
 | 
					          <!--  @pagination="getWorkBindBusTypes()"-->
 | 
				
			||||||
 | 
					          <!-->-->
 | 
				
			||||||
 | 
					          <!--</pagination>-->
 | 
				
			||||||
 | 
					        </el-tab-pane>
 | 
				
			||||||
 | 
					      </el-tabs>
 | 
				
			||||||
 | 
					    </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-dialog
 | 
				
			||||||
 | 
					      title="选入采集工位"
 | 
				
			||||||
 | 
					      :visible.sync="chooseCollectDialogVisible"
 | 
				
			||||||
 | 
					      width="60%"
 | 
				
			||||||
 | 
					      v-if="chooseCollectDialogVisible"
 | 
				
			||||||
 | 
					      :close-on-click-modal="false"
 | 
				
			||||||
 | 
					      :close-on-press-escape="false"
 | 
				
			||||||
 | 
					      @close=""
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <addCollectWorkplace
 | 
				
			||||||
 | 
					      :workplaceId="workplaceId"
 | 
				
			||||||
 | 
					      :collectWorks="collectWorks"
 | 
				
			||||||
 | 
					      :closeDialog="closeDialog">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      </addCollectWorkplace>
 | 
				
			||||||
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <el-dialog
 | 
				
			||||||
 | 
					      :title="fromMap[fromName]"
 | 
				
			||||||
 | 
					      :visible.sync="addWorkplaceDialogVisible"
 | 
				
			||||||
 | 
					      width="60%"
 | 
				
			||||||
 | 
					      v-if="addWorkplaceDialogVisible"
 | 
				
			||||||
 | 
					      :close-on-press-escape="false"
 | 
				
			||||||
 | 
					      :close-on-click-modal="false"
 | 
				
			||||||
 | 
					      :show-close="false"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <el-form :model="formData" style="width: 100%;" ref="dataForm" :rules="formRules"
 | 
				
			||||||
 | 
					               label-width="auto"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="工位编码:" prop="workplaceId" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-input
 | 
				
			||||||
 | 
					                disabled
 | 
				
			||||||
 | 
					                v-model="formData.workplaceId" style="width: 80%"
 | 
				
			||||||
 | 
					                auto-complete="off"
 | 
				
			||||||
 | 
					              ></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="工位名称:" prop="workplaceName" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-input
 | 
				
			||||||
 | 
					                v-model="formData.workplaceName" style="width: 80%"
 | 
				
			||||||
 | 
					                auto-complete="off"
 | 
				
			||||||
 | 
					              ></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="工位状态:" prop="workplaceStatus" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-select v-model="formData.workplaceStatus" style="width: 80%" placeholder="工位状态">
 | 
				
			||||||
 | 
					                <el-option label="暂停" :value="0"></el-option>
 | 
				
			||||||
 | 
					                <el-option label="启用" :value="1"></el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <!--<el-col :span="12" class="el-col">-->
 | 
				
			||||||
 | 
					          <!--  <el-form-item label="工位类型:" prop="workPlaceClass" class="query-form-item">-->
 | 
				
			||||||
 | 
					          <!--    <el-select v-model="formData.workPlaceClass" style="width: 80%" placeholder="工位类型" disabled>-->
 | 
				
			||||||
 | 
					          <!--      <el-option label="采集工位" :value="1"></el-option>-->
 | 
				
			||||||
 | 
					          <!--      <el-option label="上货工位" :value="2"></el-option>-->
 | 
				
			||||||
 | 
					          <!--    </el-select>-->
 | 
				
			||||||
 | 
					          <!--  </el-form-item>-->
 | 
				
			||||||
 | 
					          <!--</el-col>-->
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item prop="deptCode" label="所属部门:">
 | 
				
			||||||
 | 
					              <el-select v-model="formData.deptCode" placeholder="请选择部门" clearable
 | 
				
			||||||
 | 
					                         style="width: 80%"
 | 
				
			||||||
 | 
					                         @change="handleInvChange"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-option v-for="item in deptList" :key="item.id" :label="item.name" :value="item.code"/>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="工位负责人:" prop="chargeUser" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-select v-model="formData.chargeUser" placeholder="请选择负责人"
 | 
				
			||||||
 | 
					                         style="width: 80%"
 | 
				
			||||||
 | 
					                         clearable
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-option
 | 
				
			||||||
 | 
					                  v-for="item in users"
 | 
				
			||||||
 | 
					                  :key="item.id"
 | 
				
			||||||
 | 
					                  :label="item.employeeName"
 | 
				
			||||||
 | 
					                  :value="item.id"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                  <span style="float: left">{{ item.employeeName }}</span>
 | 
				
			||||||
 | 
					                </el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="所属组别:" prop="constituencies" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-select v-model="formData.constituencies" placeholder="请选择所属组别"
 | 
				
			||||||
 | 
					                         style="width: 80%"
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
 | 
					                <el-option
 | 
				
			||||||
 | 
					                  v-for="item in fromDeptOptions"
 | 
				
			||||||
 | 
					                  :key="item.code"
 | 
				
			||||||
 | 
					                  :label="item.label"
 | 
				
			||||||
 | 
					                  :value="item.code"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                  <span style="float: left">{{ item.label }}</span>
 | 
				
			||||||
 | 
					                </el-option>
 | 
				
			||||||
 | 
					              </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          <el-col :span="12" class="el-col">
 | 
				
			||||||
 | 
					            <el-form-item label="备注:" prop="remake" class="query-form-item">
 | 
				
			||||||
 | 
					              <el-input
 | 
				
			||||||
 | 
					                v-model="formData.remake" style="width: 80%"
 | 
				
			||||||
 | 
					                auto-complete="off"
 | 
				
			||||||
 | 
					              ></el-input>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </el-form>
 | 
				
			||||||
 | 
					      <div slot="footer" class="dialog-footer">
 | 
				
			||||||
 | 
					        <el-button @click.native="hideForm">取消</el-button>
 | 
				
			||||||
 | 
					        <el-button
 | 
				
			||||||
 | 
					          type="primary"
 | 
				
			||||||
 | 
					          @click.native="formSubmit()"
 | 
				
			||||||
 | 
					        >提交
 | 
				
			||||||
 | 
					        </el-button
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <el-dialog
 | 
				
			||||||
 | 
					          :title="formMap[formName]"
 | 
				
			||||||
 | 
					          append-to-body
 | 
				
			||||||
 | 
					          :close-on-click-modal="false"
 | 
				
			||||||
 | 
					          :close-on-press-escape="false"
 | 
				
			||||||
 | 
					          :visible.sync="subFormVisible"
 | 
				
			||||||
 | 
					          width="45%"
 | 
				
			||||||
 | 
					          top="5vh"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					          <el-form :model="subData" ref="dataForm" label-width="80px">
 | 
				
			||||||
 | 
					            <el-row :gutter="20" class="el-row" type="flex">
 | 
				
			||||||
 | 
					              <el-col class="el-col">
 | 
				
			||||||
 | 
					                <el-form-item label="上级菜单" prop="parentCode">
 | 
				
			||||||
 | 
					                  <!--<el-select v-model="subData.parentCode" placeholder="选择上级菜单"-->
 | 
				
			||||||
 | 
					                  <!--           style="width: 80%"-->
 | 
				
			||||||
 | 
					                  <!--           clearable-->
 | 
				
			||||||
 | 
					                  <!--           disabled-->
 | 
				
			||||||
 | 
					                  <!-->-->
 | 
				
			||||||
 | 
					                  <!--  <el-option-->
 | 
				
			||||||
 | 
					                  <!--    v-for="item in fromDeptOptions"-->
 | 
				
			||||||
 | 
					                  <!--    :key="item.parentCode"-->
 | 
				
			||||||
 | 
					                  <!--    :label="item.parentName"-->
 | 
				
			||||||
 | 
					                  <!--    :value="item.parentCode"-->
 | 
				
			||||||
 | 
					                  <!--  >-->
 | 
				
			||||||
 | 
					                  <!--    <span style="float: left">{{ item.parentName }}</span>-->
 | 
				
			||||||
 | 
					                  <!--  </el-option>-->
 | 
				
			||||||
 | 
					                  <!--</el-select>-->
 | 
				
			||||||
 | 
					                  <el-input
 | 
				
			||||||
 | 
					                    v-model="subData.parentName" style="width: 80%"
 | 
				
			||||||
 | 
					                    placeholder="全部"
 | 
				
			||||||
 | 
					                    auto-complete="off"
 | 
				
			||||||
 | 
					                    disabled
 | 
				
			||||||
 | 
					                  >
 | 
				
			||||||
 | 
					                  </el-input>
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					              </el-col>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            </el-row>
 | 
				
			||||||
 | 
					            <el-row :gutter="20" class="el-row" type="flex">
 | 
				
			||||||
 | 
					              <el-col class="el-col">
 | 
				
			||||||
 | 
					                <el-form-item label="名称" prop="name" class="query-form-item">
 | 
				
			||||||
 | 
					                  <el-input
 | 
				
			||||||
 | 
					                    v-model="subData.name" style="width: 80%"
 | 
				
			||||||
 | 
					                    placeholder="请输入名称"
 | 
				
			||||||
 | 
					                    auto-complete="off"
 | 
				
			||||||
 | 
					                  ></el-input>
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					              </el-col>
 | 
				
			||||||
 | 
					            </el-row>
 | 
				
			||||||
 | 
					            <el-row class="el-row" type="flex">
 | 
				
			||||||
 | 
					              <el-col class="el-col">
 | 
				
			||||||
 | 
					                <el-form-item label="备注:" prop="remark" class="query-form-item">
 | 
				
			||||||
 | 
					                  <el-input
 | 
				
			||||||
 | 
					                    v-model="subData.remark"
 | 
				
			||||||
 | 
					                    type="textarea"
 | 
				
			||||||
 | 
					                    style="width: 80%"
 | 
				
			||||||
 | 
					                    auto-complete="off"
 | 
				
			||||||
 | 
					                  ></el-input>
 | 
				
			||||||
 | 
					                </el-form-item>
 | 
				
			||||||
 | 
					              </el-col>
 | 
				
			||||||
 | 
					            </el-row>
 | 
				
			||||||
 | 
					          </el-form>
 | 
				
			||||||
 | 
					          <div slot="footer" class="dialog-footer">
 | 
				
			||||||
 | 
					            <el-button @click.native="subFormVisible = false">取消</el-button>
 | 
				
			||||||
 | 
					            <el-button
 | 
				
			||||||
 | 
					              type="primary"
 | 
				
			||||||
 | 
					              @click.native="forInvSubmit()"
 | 
				
			||||||
 | 
					              :loading="subLoading"
 | 
				
			||||||
 | 
					            >提交
 | 
				
			||||||
 | 
					            </el-button
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					        </el-dialog>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      </el-row>
 | 
				
			||||||
 | 
					    </el-card>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { filterList } from '@/api/system/invWarehouse'
 | 
				
			||||||
 | 
					import {
 | 
				
			||||||
 | 
					  addWorkplace,
 | 
				
			||||||
 | 
					  createWorkplaceId,
 | 
				
			||||||
 | 
					  deleteWorkplace,
 | 
				
			||||||
 | 
					  getUsers,
 | 
				
			||||||
 | 
					  listPage,
 | 
				
			||||||
 | 
					  printWorkLabel, updateWorkplace
 | 
				
			||||||
 | 
					} from '@/api/basic/workPlace/sysWorkplaceManage'
 | 
				
			||||||
 | 
					import {addTree, deleteTree, getTree, updateTree} from '@/api/basic/collectPoint/collectPointManage'
 | 
				
			||||||
 | 
					import { getBindCollectList } from '@/api/basic/collectPoint/cargowWorkplaceManage'
 | 
				
			||||||
 | 
					import addCollectWorkplace from "./addCollectWorkplace"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  components: {addCollectWorkplace},
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      Dictionary: false,
 | 
				
			||||||
 | 
					      showSearch: true,
 | 
				
			||||||
 | 
					      treeList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          code: '1001',
 | 
				
			||||||
 | 
					          parentCode: null,
 | 
				
			||||||
 | 
					          label: '全部'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      query: {
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10,
 | 
				
			||||||
 | 
					        code: null,
 | 
				
			||||||
 | 
					        workplaceStatus: 1,
 | 
				
			||||||
 | 
					        workPlaceClass: 2,
 | 
				
			||||||
 | 
					        deptCode: this.$store.getters.locDeptCode,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      DeptList:[],
 | 
				
			||||||
 | 
					      list:[],
 | 
				
			||||||
 | 
					      collectList:[],
 | 
				
			||||||
 | 
					      busTypeTotal:0,
 | 
				
			||||||
 | 
					      total:0,
 | 
				
			||||||
 | 
					      subFormVisible: false,
 | 
				
			||||||
 | 
					      subData: {
 | 
				
			||||||
 | 
					        parentName: '全部',
 | 
				
			||||||
 | 
					        parentCode: '1001'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      isMatchings: {
 | 
				
			||||||
 | 
					        0: '否',
 | 
				
			||||||
 | 
					        1: '是'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      operationTypes: {
 | 
				
			||||||
 | 
					        1: '扫码生成业务单',
 | 
				
			||||||
 | 
					        2: '按单校验三期',
 | 
				
			||||||
 | 
					        3: '按单不校验三期'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      inoutTypes: {
 | 
				
			||||||
 | 
					        1: '是',
 | 
				
			||||||
 | 
					        2: '否'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      autoTagTypes: {
 | 
				
			||||||
 | 
					        1: '是',
 | 
				
			||||||
 | 
					        0: '否'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      monopolys: {
 | 
				
			||||||
 | 
					        1: '是',
 | 
				
			||||||
 | 
					        0: '否'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      corpTypeMap: {
 | 
				
			||||||
 | 
					        1: '客户',
 | 
				
			||||||
 | 
					        2: '供应商',
 | 
				
			||||||
 | 
					        3: '内部科室',
 | 
				
			||||||
 | 
					        4: '特殊往来'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      checkInserts: {
 | 
				
			||||||
 | 
					        1: '自动添加',
 | 
				
			||||||
 | 
					        2: '自动不添加',
 | 
				
			||||||
 | 
					        3: '根据提醒决定'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      orderCirTypes: {
 | 
				
			||||||
 | 
					        1: '流通计量单位',
 | 
				
			||||||
 | 
					        2: '使用计量单位'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      inAndOutTypes: {
 | 
				
			||||||
 | 
					        1: '入库',
 | 
				
			||||||
 | 
					        2: '出库',
 | 
				
			||||||
 | 
					        3: '流转'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      workplaceStatusMap: {
 | 
				
			||||||
 | 
					        0: '暂停',
 | 
				
			||||||
 | 
					        1: '启用'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      workPlaceClasss: {
 | 
				
			||||||
 | 
					        1: '采集工位',
 | 
				
			||||||
 | 
					        2: '上货工位'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      orderFinishVerifys: {
 | 
				
			||||||
 | 
					        0: '完全赋码',
 | 
				
			||||||
 | 
					        1: '部分赋码',
 | 
				
			||||||
 | 
					        2: '赋码超出',
 | 
				
			||||||
 | 
					        4: '',
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      warnTypeMap: {
 | 
				
			||||||
 | 
					        1: '信息提醒',
 | 
				
			||||||
 | 
					        2: '信息弹框提醒',
 | 
				
			||||||
 | 
					        3: '不提醒'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      isPopulars: {
 | 
				
			||||||
 | 
					        1: '是',
 | 
				
			||||||
 | 
					        0: '否',
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      shippers: {
 | 
				
			||||||
 | 
					        1: '原始单据的发货方',
 | 
				
			||||||
 | 
					        2: '原始单据的收货方',
 | 
				
			||||||
 | 
					        3: '用户所属仓库',
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      consignees: {
 | 
				
			||||||
 | 
					        1: '原始单据的收货方',
 | 
				
			||||||
 | 
					        2: '原始单据的发货方',
 | 
				
			||||||
 | 
					        3: '供应商',
 | 
				
			||||||
 | 
					        4: '客户',
 | 
				
			||||||
 | 
					        5: '特殊往来',
 | 
				
			||||||
 | 
					        6: '内部科室',
 | 
				
			||||||
 | 
					        7: '填写',
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      userLoading: false,
 | 
				
			||||||
 | 
					      rowData: {
 | 
				
			||||||
 | 
					        workplaceName: '工位'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      cargowQuery: {
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10,
 | 
				
			||||||
 | 
					        userKey: null,
 | 
				
			||||||
 | 
					        workPlaceCode: null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      busQuery: {
 | 
				
			||||||
 | 
					        busKey: '',
 | 
				
			||||||
 | 
					        workplaceCode: null,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 10
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      chooseCollectDialogVisible: false,
 | 
				
			||||||
 | 
					      workplaceId: null,
 | 
				
			||||||
 | 
					      collectWorkPlaceCodes: [],
 | 
				
			||||||
 | 
					      collectBusTypeCodes: [],
 | 
				
			||||||
 | 
					      collectWorks: [],
 | 
				
			||||||
 | 
					      fromName: 'add',
 | 
				
			||||||
 | 
					      fromMap: {
 | 
				
			||||||
 | 
					        'add': '新增上货工位',
 | 
				
			||||||
 | 
					        'edit': '编辑上货工位'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      formName: 'add',
 | 
				
			||||||
 | 
					      formMap: {
 | 
				
			||||||
 | 
					        add: '新增分组',
 | 
				
			||||||
 | 
					        edit: '编辑分组'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      groupData: null,
 | 
				
			||||||
 | 
					      addWorkplaceDialogVisible: false,
 | 
				
			||||||
 | 
					      formData: {
 | 
				
			||||||
 | 
					        workplaceId: null,
 | 
				
			||||||
 | 
					        workplaceName: null,
 | 
				
			||||||
 | 
					        workplaceStatus: 1,
 | 
				
			||||||
 | 
					        workplaceType: 3,
 | 
				
			||||||
 | 
					        workPlaceClass: 2,
 | 
				
			||||||
 | 
					        deptCode: null,
 | 
				
			||||||
 | 
					        chargeUser: null,
 | 
				
			||||||
 | 
					        constituencies: null,
 | 
				
			||||||
 | 
					        invRemindNumber: 0,
 | 
				
			||||||
 | 
					        remake: null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      fromDeptOptions: [],
 | 
				
			||||||
 | 
					      invQuery: {
 | 
				
			||||||
 | 
					        invCode: '',
 | 
				
			||||||
 | 
					        deptCode: ''
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      formRules: {
 | 
				
			||||||
 | 
					        workplaceName: [
 | 
				
			||||||
 | 
					          {required: true, message: '请输入工位名称', trigger: 'blur'}
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        workplaceStatus: [
 | 
				
			||||||
 | 
					          {required: true, message: '请选择工位状态', trigger: 'blur'}
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					        // workplaceType: [
 | 
				
			||||||
 | 
					        //   { required: true, message: '请选择工位类型', trigger: 'blur' }
 | 
				
			||||||
 | 
					        // ]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    append(data, formName) {//新增 编辑
 | 
				
			||||||
 | 
					      this.formName = formName
 | 
				
			||||||
 | 
					      if (formName === 'edit') {
 | 
				
			||||||
 | 
					        this.subData = JSON.parse(JSON.stringify(data))
 | 
				
			||||||
 | 
					        this.subData.name = JSON.parse(JSON.stringify(data.label))
 | 
				
			||||||
 | 
					      } else if (formName === 'add') {
 | 
				
			||||||
 | 
					        this.subData = {
 | 
				
			||||||
 | 
					          parentCode: JSON.parse(JSON.stringify(data)).code
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        let parentData = {
 | 
				
			||||||
 | 
					          parentCode: JSON.parse(JSON.stringify(data)).code,
 | 
				
			||||||
 | 
					          parentName: JSON.parse(JSON.stringify(data.label))
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        this.fromDeptOptions.push(parentData)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.subFormVisible = true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    delTree(row) {
 | 
				
			||||||
 | 
					      deleteTree(row).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          this.$message.success('删除成功')
 | 
				
			||||||
 | 
					          this.getLstTree()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.$message.error(res.message)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    hideSearch() {
 | 
				
			||||||
 | 
					      this.showSearch = !this.showSearch
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    onSubmit() {
 | 
				
			||||||
 | 
					      this.collectList = []
 | 
				
			||||||
 | 
					      // this.workplaceName = '工位'
 | 
				
			||||||
 | 
					      this.query.page = 1
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    onReset() {
 | 
				
			||||||
 | 
					      this.collectList = []
 | 
				
			||||||
 | 
					      this.$router.push({
 | 
				
			||||||
 | 
					        path: ''
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      this.query = {
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        limit: 20,
 | 
				
			||||||
 | 
					        workplaceStatus: 1,
 | 
				
			||||||
 | 
					        workPlaceClass: 2,
 | 
				
			||||||
 | 
					        deptCode: this.$store.getters.locDeptCode,
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    changeDept(){
 | 
				
			||||||
 | 
					      this.collectList = []
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleInvChange(deptCode) {
 | 
				
			||||||
 | 
					      this.invQuery.deptCode = deptCode
 | 
				
			||||||
 | 
					      this.formData.chargeUser = null
 | 
				
			||||||
 | 
					      getUsers(this.invQuery).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          this.users = res.data.list || []
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.$message.error('错误')
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getDepts() {
 | 
				
			||||||
 | 
					      let data =
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          enable: true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      filterList(data).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          this.DeptList = res.data.list || []
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getList() {
 | 
				
			||||||
 | 
					      listPage(this.query).then(res => {
 | 
				
			||||||
 | 
					        if (res.code != 20000) {
 | 
				
			||||||
 | 
					          return this.$message.error(res.message)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        this.list = res.data.list || []
 | 
				
			||||||
 | 
					        this.total = res.data.total || 0
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handCurrentChange(row) {
 | 
				
			||||||
 | 
					      this.rowData = row
 | 
				
			||||||
 | 
					      this.workplaceName = row.workplaceName
 | 
				
			||||||
 | 
					      // this.userQuery.workplaceCode = row.workplaceId
 | 
				
			||||||
 | 
					      this.workplaceId = row.workplaceId
 | 
				
			||||||
 | 
					      // this.getUserBindWork(this.cargowQuery)
 | 
				
			||||||
 | 
					      // this.getWorkBindBusTypes()
 | 
				
			||||||
 | 
					      this.getCargowBindCollectList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getCargowBindCollectList(){
 | 
				
			||||||
 | 
					      this.cargowQuery.workPlaceCode = this.rowData.workplaceId
 | 
				
			||||||
 | 
					      getBindCollectList(this.cargowQuery).then(res => {
 | 
				
			||||||
 | 
					        if (res.code != 20000){
 | 
				
			||||||
 | 
					          return this.$message.error("获取失败")
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        this.collectList = res.data.list || []
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chooseCollect(){
 | 
				
			||||||
 | 
					      if (this.rowData.workplaceId == null) {
 | 
				
			||||||
 | 
					        return this.$message.error('请选择上货工位')
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      console.log("hhhhhhh",this.collectList)
 | 
				
			||||||
 | 
					      this.collectWorks = this.collectList.map(item => ({
 | 
				
			||||||
 | 
					        workplaceCode: item.collectWorkPlaceCode,
 | 
				
			||||||
 | 
					        documentTypeCode: item.collectBusTypeCode
 | 
				
			||||||
 | 
					      }));
 | 
				
			||||||
 | 
					      // this.collectWorks = this.collectWorkPlaceCodes.concat(this.collectBusTypeCodes);
 | 
				
			||||||
 | 
					      this.chooseCollectDialogVisible = true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleNodeClick(row) {
 | 
				
			||||||
 | 
					      this.groupData = row
 | 
				
			||||||
 | 
					      this.query.code = row.code
 | 
				
			||||||
 | 
					      if (this.query.code == 1001) {
 | 
				
			||||||
 | 
					        this.query.code = null
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    closeDialog(){
 | 
				
			||||||
 | 
					      this.getCargowBindCollectList()
 | 
				
			||||||
 | 
					      this.chooseCollectDialogVisible = false
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    printLabel(row) {
 | 
				
			||||||
 | 
					      row.labelId = 6
 | 
				
			||||||
 | 
					      printWorkLabel(row).then((response) => {
 | 
				
			||||||
 | 
					        const binaryData = []
 | 
				
			||||||
 | 
					        binaryData.push(response)
 | 
				
			||||||
 | 
					        let url = window.URL.createObjectURL(
 | 
				
			||||||
 | 
					          new Blob(binaryData, {type: 'application/pdf'})
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					        this.loading = false
 | 
				
			||||||
 | 
					        window.open(url)
 | 
				
			||||||
 | 
					      }).catch(() => {
 | 
				
			||||||
 | 
					        this.loading = false
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    deleteWorkplace(row) {
 | 
				
			||||||
 | 
					      this.$confirm('此操作将永久删除该工位, 是否继续?', '提示', {
 | 
				
			||||||
 | 
					        confirmButtonText: '确定',
 | 
				
			||||||
 | 
					        cancelButtonText: '取消',
 | 
				
			||||||
 | 
					        type: 'warning'
 | 
				
			||||||
 | 
					      }).then(() => {
 | 
				
			||||||
 | 
					        deleteWorkplace(row).then(res => {
 | 
				
			||||||
 | 
					          if (res.code != 20000) {
 | 
				
			||||||
 | 
					            this.$message.error(res.message)
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$message.success(res.data)
 | 
				
			||||||
 | 
					            this.getList()
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }).catch(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    //增加上货工位
 | 
				
			||||||
 | 
					    addCargowWorkplace() {
 | 
				
			||||||
 | 
					      this.fromName = 'add'
 | 
				
			||||||
 | 
					      this.formData = {
 | 
				
			||||||
 | 
					        workplaceId: null,
 | 
				
			||||||
 | 
					        workplaceName: null,
 | 
				
			||||||
 | 
					        workplaceStatus: 1,
 | 
				
			||||||
 | 
					        workPlaceClass: 2,
 | 
				
			||||||
 | 
					        deptCode: null,
 | 
				
			||||||
 | 
					        chargeUser: null,
 | 
				
			||||||
 | 
					        constituencies: "1001",
 | 
				
			||||||
 | 
					        invRemindNumber: 0,
 | 
				
			||||||
 | 
					        remake: null
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (this.groupData != null) {
 | 
				
			||||||
 | 
					        this.formData.constituencies = this.groupData.code
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      // if (this.)
 | 
				
			||||||
 | 
					      this.getDeptList()
 | 
				
			||||||
 | 
					      createWorkplaceId().then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          if (res.data == null) {
 | 
				
			||||||
 | 
					            this.formData.workplaceId = this.workplaceCode + 1001
 | 
				
			||||||
 | 
					            this.addWorkplaceDialogVisible = true
 | 
				
			||||||
 | 
					            this.getTree()
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.getTree()
 | 
				
			||||||
 | 
					            this.formData.workplaceId = res.data
 | 
				
			||||||
 | 
					            this.addWorkplaceDialogVisible = true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.$message.error('获取错误')
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }).catch(() => {
 | 
				
			||||||
 | 
					        this.$message.error('获取错误')
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    hideForm(){
 | 
				
			||||||
 | 
					      this.addWorkplaceDialogVisible = false
 | 
				
			||||||
 | 
					      this.getList()
 | 
				
			||||||
 | 
					      this.collectList = []
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    formSubmit() {
 | 
				
			||||||
 | 
					      // this.formData.constituencies = this.groupData.code
 | 
				
			||||||
 | 
					      if (this.formData.constituencies == null) {
 | 
				
			||||||
 | 
					        this.formData.constituencies = '1001'
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      if (this.fromName == 'add') {
 | 
				
			||||||
 | 
					        this.$refs['dataForm'].validate((valid) => {
 | 
				
			||||||
 | 
					          if (valid) {
 | 
				
			||||||
 | 
					            addWorkplace(this.formData).then(res => {
 | 
				
			||||||
 | 
					              if (res.code != 20000) {
 | 
				
			||||||
 | 
					                return this.$message.error('新增错误')
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.addWorkplaceDialogVisible = false
 | 
				
			||||||
 | 
					              this.$message.success('新增成功')
 | 
				
			||||||
 | 
					              // this.query.code = this.groupData.code
 | 
				
			||||||
 | 
					              // if (this.query.code == 1001) {
 | 
				
			||||||
 | 
					              //   this.query.code = null
 | 
				
			||||||
 | 
					              // }
 | 
				
			||||||
 | 
					              this.getList()
 | 
				
			||||||
 | 
					            }).catch(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            // this.$message.error('请完善必填信息')
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        updateWorkplace(this.formData).then(res => {
 | 
				
			||||||
 | 
					          if (res.code != 20000) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.message)
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.addWorkplaceDialogVisible = false
 | 
				
			||||||
 | 
					          this.$message.success("更新成功")
 | 
				
			||||||
 | 
					          this.getList()
 | 
				
			||||||
 | 
					        }).catch(() => {
 | 
				
			||||||
 | 
					          this.addWorkplaceDialogVisible = false
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getTree() {
 | 
				
			||||||
 | 
					      getTree(this.query)
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          var treeList = response.data || []
 | 
				
			||||||
 | 
					          const filteredList = treeList.filter(item => item.parentCode != null)
 | 
				
			||||||
 | 
					          if (treeList.length == 0) {
 | 
				
			||||||
 | 
					            this.fromDeptOptions = [
 | 
				
			||||||
 | 
					              {
 | 
				
			||||||
 | 
					                code: '1001',
 | 
				
			||||||
 | 
					                parentCode: null,
 | 
				
			||||||
 | 
					                label: '全部'
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.fromDeptOptions = treeList
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    forInvSubmit() {
 | 
				
			||||||
 | 
					      if (this.formName === 'edit') {
 | 
				
			||||||
 | 
					        updateTree(this.subData).then(res => {
 | 
				
			||||||
 | 
					          if (res.code == 20000) {
 | 
				
			||||||
 | 
					            this.subFormVisible = false
 | 
				
			||||||
 | 
					            this.getLstTree()
 | 
				
			||||||
 | 
					            this.$message.success('成功')
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$message.error(res.message)
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }).catch(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        addTree(this.subData).then(res => {
 | 
				
			||||||
 | 
					          if (res.code == 20000) {
 | 
				
			||||||
 | 
					            this.subFormVisible = false
 | 
				
			||||||
 | 
					            this.getLstTree()
 | 
				
			||||||
 | 
					            this.$message.success('成功')
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$message.error(res.message)
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }).catch(() => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getLstTree() {
 | 
				
			||||||
 | 
					      getTree(this.query)
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          var invlist = response.data || []
 | 
				
			||||||
 | 
					          if (invlist.length == 0) {
 | 
				
			||||||
 | 
					            this.treeList = this.handleTree(this.treeList, 'code', 'parentCode')
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.treeList = this.handleTree(invlist, 'code', 'parentCode')
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getDeptList() {
 | 
				
			||||||
 | 
					      this.deptList = []
 | 
				
			||||||
 | 
					      let data =
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          enable: true
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      filterList(data).then(res => {
 | 
				
			||||||
 | 
					        if (res.code == 20000) {
 | 
				
			||||||
 | 
					          this.deptList = res.data.list || []
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  created() {
 | 
				
			||||||
 | 
					    this.getDepts()
 | 
				
			||||||
 | 
					    this.getList()
 | 
				
			||||||
 | 
					    this.getTree()
 | 
				
			||||||
 | 
					    this.getLstTree()
 | 
				
			||||||
 | 
					    this.getDeptList()
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.iconButton {
 | 
				
			||||||
 | 
					  margin-left: 0px;
 | 
				
			||||||
 | 
					  height: 30px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue