|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<el-card>
|
|
|
|
<el-row type="flex">
|
|
|
|
<el-col style="flex: 1" v-show="Dictionary">
|
|
|
|
<el-col v-if="showSearch" style="min-width: 300px; 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">{{
|
|
|
|
node.label
|
|
|
|
}}</span>
|
|
|
|
<el-button
|
|
|
|
type="text"
|
|
|
|
size="mini"
|
|
|
|
style="margin-left: 10px"
|
|
|
|
:disabled="data.parentCode != null"
|
|
|
|
@click="() => append(data,'add')">
|
|
|
|
新增
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
type="text"
|
|
|
|
size="mini"
|
|
|
|
:disabled="data.parentCode == null"
|
|
|
|
@click="() => append(data, 'edit')">
|
|
|
|
编辑
|
|
|
|
</el-button>
|
|
|
|
<el-button
|
|
|
|
type="text"
|
|
|
|
size="mini"
|
|
|
|
:disabled="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-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="8">
|
|
|
|
<el-form-item label="编码/名称:" class="query-form-item">
|
|
|
|
<el-input v-model="query.key" placeholder="请输入编码/工位名称" clearable>
|
|
|
|
</el-input>
|
|
|
|
<!--<el-form-item label="所属仓库:">-->
|
|
|
|
|
|
|
|
<!-- :isDisable.sync="defaultInv"-->
|
|
|
|
<!--</el-form-item>-->
|
|
|
|
<!--<el-select-->
|
|
|
|
<!-- v-model="query.key"-->
|
|
|
|
<!-- placeholder="请选择仓库">-->
|
|
|
|
<!-- <el-option v-for="item in unitStorageList"-->
|
|
|
|
<!-- :key="item.name"-->
|
|
|
|
<!-- :label="item.name"-->
|
|
|
|
<!-- :value="item.code"></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="addWorkplace">新增工位</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="90"></el-table-column>
|
|
|
|
<el-table-column label="所属组别" prop="categoryName" width="90"></el-table-column>
|
|
|
|
<el-table-column label="来源单据类型编号" prop="busTypeCode" width="150"></el-table-column>
|
|
|
|
<el-table-column label="来源单据类型名称" prop="busTypeName" width="150"></el-table-column>
|
|
|
|
<el-table-column label="所属仓库" prop="invName" width="90"></el-table-column>
|
|
|
|
<el-table-column label="作业方式" prop="operationType" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{operationTypes[scope.row.operationType]}}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="结果处理(是否插入)" prop="checkInsert" width="150">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{checkInserts[scope.row.checkInsert]}}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="提醒方式" prop="warnType" width="90">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{warnTypeMap[scope.row.warnType]}}</span>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="负责人" prop="employeeName" width="90"></el-table-column>
|
|
|
|
<el-table-column label="往来单位标题" prop="unitTittle" width="90"></el-table-column>
|
|
|
|
<el-table-column label="创建时间" prop="createTime" width="90"></el-table-column>
|
|
|
|
<el-table-column label="备注" prop="remake" width="90"></el-table-column>
|
|
|
|
<el-table-column label="操作" fixed="right" width="120">
|
|
|
|
<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>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
</el-card>
|
|
|
|
<el-dialog
|
|
|
|
:title="fromMap[fromName]"
|
|
|
|
:visible.sync="addWorkplaceDialogVisible"
|
|
|
|
width="40%"
|
|
|
|
v-if="addWorkplaceDialogVisible"
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
>
|
|
|
|
<el-form :model="formData" style="width: 60%;" ref="dataForm" :rules="formRules"
|
|
|
|
label-width="auto"
|
|
|
|
>
|
|
|
|
<el-row :gutter="20" class="el-row">
|
|
|
|
<el-col :span="24" 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="24" 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-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="作业方式:" prop="scanType" class="query-form-item">
|
|
|
|
<el-select v-model="formData.operationType" style="width: 80%" placeholder="选择扫码方式" clearable>
|
|
|
|
<el-option label="扫码生成业务单(必须插入)" :value="1"></el-option>
|
|
|
|
<el-option label="按单校验三期(是否插入可选" :value="2"></el-option>
|
|
|
|
<el-option label="按单不校验三期(是否插入可选" :value="3"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="结果处理:" prop="scanType" class="query-form-item">
|
|
|
|
<el-select v-model="formData.checkInsert" style="width: 80%" placeholder="选择扫码方式" clearable>
|
|
|
|
<el-option label="不插入" :value="1"></el-option>
|
|
|
|
<el-option label="插入" :value="2"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="提醒方式:" prop="scanType" class="query-form-item">
|
|
|
|
<el-select v-model="formData.warnType" style="width: 80%" placeholder="选择扫码方式" clearable>
|
|
|
|
<el-option label="信息提醒" :value="1"></el-option>
|
|
|
|
<el-option label="禁止录入" :value="2"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="所属仓库:" prop="busType" class="query-form-item">
|
|
|
|
<el-select v-model="formData.invCode" placeholder="请选择所属仓库"
|
|
|
|
style="width: 80%"
|
|
|
|
clearable
|
|
|
|
@change="handleInvChange"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in invList"
|
|
|
|
:key="item.name"
|
|
|
|
:label="item.name"
|
|
|
|
:value="item.code"
|
|
|
|
>
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24" 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-input-->
|
|
|
|
<!-- v-model="formData.chargeUser" style="width: 80%"-->
|
|
|
|
<!-- auto-complete="off"-->
|
|
|
|
<!--></el-input>-->
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="单据类型:" prop="busType" class="query-form-item">
|
|
|
|
<el-select v-model="formData.orderId" placeholder="请选择单据类型"
|
|
|
|
style="width: 80%"
|
|
|
|
clearable
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in busTypes"
|
|
|
|
:key="item.name"
|
|
|
|
:label="item.name"
|
|
|
|
:value="item.code"
|
|
|
|
>
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="所属组别:" prop="grouping" class="query-form-item">
|
|
|
|
<el-select v-model="formData.constituencies" placeholder="请选择所属组别"
|
|
|
|
style="width: 80%"
|
|
|
|
clearable
|
|
|
|
>
|
|
|
|
<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-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="往来类型标题:" prop="remake" class="query-form-item">
|
|
|
|
<el-input
|
|
|
|
v-model="formData.unitTittle" style="width: 80%"
|
|
|
|
auto-complete="off"
|
|
|
|
></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="24" class="el-col">
|
|
|
|
<el-form-item label="备注:" prop="unitTittle" 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>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
listPage,
|
|
|
|
addWorkplace,
|
|
|
|
updateWorkplace,
|
|
|
|
deleteWorkplace,
|
|
|
|
createWorkplaceId, printWorkLabel,getUsers
|
|
|
|
} from '@/api/basic/sysWorkplaceManage'
|
|
|
|
import { getInvListByUser } from '@/api/system/invWarehouse'
|
|
|
|
import { getTree } from '@/api/basic/collectPoint/collectPointManage'
|
|
|
|
import { getCollectBusType } from '@/api/basic/collectPoint/gatherOrderType'
|
|
|
|
import panelGroup from '@/views/dashboard/PanelGroup'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
query: {
|
|
|
|
invCode: this.$store.getters.locInvCode,
|
|
|
|
page: 1,
|
|
|
|
limit: 20,
|
|
|
|
code: null
|
|
|
|
},
|
|
|
|
showSearch: true,
|
|
|
|
Dictionary: true,
|
|
|
|
loading: false,
|
|
|
|
list: [],
|
|
|
|
treeList: [],
|
|
|
|
addWorkplaceDialogVisible: false,
|
|
|
|
fromName: 'add',
|
|
|
|
fromMap: {
|
|
|
|
'add': '新增工位',
|
|
|
|
'edit': '编辑工位'
|
|
|
|
},
|
|
|
|
formData: {},
|
|
|
|
workplaceCode: '6001',
|
|
|
|
unitStorageList: [],
|
|
|
|
invList: [],
|
|
|
|
fromDeptOptions: [],
|
|
|
|
filterBadInv: true,
|
|
|
|
formRules: {
|
|
|
|
workplaceName: [
|
|
|
|
{ required: true, message: '请输入工位名称', trigger: 'blur' }
|
|
|
|
],
|
|
|
|
invCode: [
|
|
|
|
{ required: true, message: '请选择仓库', trigger: 'blur' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
invQuery: {
|
|
|
|
code: ''
|
|
|
|
},
|
|
|
|
users: [],
|
|
|
|
busTypes: [],
|
|
|
|
operationTypes: {
|
|
|
|
1: '扫码生成业务单(必须插入)',
|
|
|
|
2: '按单校验三期(是否插入可选)',
|
|
|
|
3: '按单不校验三期(是否插入可选)'
|
|
|
|
},
|
|
|
|
checkInserts: {
|
|
|
|
1: '不插入',
|
|
|
|
2: '插入',
|
|
|
|
},
|
|
|
|
warnTypeMap: {
|
|
|
|
1: '信息提醒',
|
|
|
|
2: '禁止录入',
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
hideSearch() {
|
|
|
|
this.showSearch = !this.showSearch
|
|
|
|
},
|
|
|
|
onSubmit() {
|
|
|
|
this.query.page = 1
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
onReset() {
|
|
|
|
this.$router.push({
|
|
|
|
path: ''
|
|
|
|
})
|
|
|
|
this.query = {
|
|
|
|
page: 1,
|
|
|
|
limit: 20
|
|
|
|
}
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
getList() {
|
|
|
|
listPage(this.query).then(res => {
|
|
|
|
if (res.code != 20000) {
|
|
|
|
return this.$message.error('错误错误')
|
|
|
|
}
|
|
|
|
this.list = res.data.list || []
|
|
|
|
})
|
|
|
|
},
|
|
|
|
addWorkplace() {
|
|
|
|
this.fromName = 'add'
|
|
|
|
createWorkplaceId().then(res => {
|
|
|
|
if (res.code == 20000) {
|
|
|
|
if (res.data == null) {
|
|
|
|
this.formData.workplaceId = this.workplaceCode + 1001
|
|
|
|
this.addWorkplaceDialogVisible = true
|
|
|
|
} else {
|
|
|
|
this.formData = {}
|
|
|
|
this.formData.workplaceId = res.data
|
|
|
|
this.addWorkplaceDialogVisible = true
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
this.$message.error('获取错误')
|
|
|
|
}
|
|
|
|
}).catch(() => {
|
|
|
|
this.$message.error('获取错误')
|
|
|
|
})
|
|
|
|
},
|
|
|
|
hideForm() {
|
|
|
|
this.addWorkplaceDialogVisible = false
|
|
|
|
},
|
|
|
|
invChange(invCode) {
|
|
|
|
this.filterQuery.invCode = invCode
|
|
|
|
this.getFromStorage()
|
|
|
|
},
|
|
|
|
getFromStorage() {
|
|
|
|
let query = {}
|
|
|
|
filterFromAllByUser(query)
|
|
|
|
.then((response) => {
|
|
|
|
this.unitStorageList = response.data || []
|
|
|
|
console.log(this.filterQuery.invCode)
|
|
|
|
if (this.filterQuery.invCode) {
|
|
|
|
this.unitStorageList = this.unitStorageList.filter(item => item.code != this.filterQuery.invCode) || []
|
|
|
|
}
|
|
|
|
console.log(this.unitStorageList)
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
})
|
|
|
|
},
|
|
|
|
formSubmit() {
|
|
|
|
if (this.fromName == 'add') {
|
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
|
if (!valid) {
|
|
|
|
this.$message.error('请完善必填信息')
|
|
|
|
} else {
|
|
|
|
addWorkplace(this.formData).then(res => {
|
|
|
|
if (res.code != 20000) {
|
|
|
|
return this.$message.error('新增错误')
|
|
|
|
}
|
|
|
|
this.addWorkplaceDialogVisible = false
|
|
|
|
this.$message.success(res.data)
|
|
|
|
this.getList()
|
|
|
|
}).catch(() => {
|
|
|
|
this.addWorkplaceDialogVisible = false
|
|
|
|
this.$message.error('新增错误')
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
updateWorkplace(this.formData).then(res => {
|
|
|
|
if (res.code != 20000) {
|
|
|
|
return this.$message.error('更新错误')
|
|
|
|
}
|
|
|
|
this.addWorkplaceDialogVisible = false
|
|
|
|
this.$message.success(res.data)
|
|
|
|
this.getList()
|
|
|
|
}).catch(() => {
|
|
|
|
this.addWorkplaceDialogVisible = false
|
|
|
|
this.$message.error('更新错误')
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
edit(row) {
|
|
|
|
this.formData = row
|
|
|
|
this.fromName = 'edit'
|
|
|
|
this.addWorkplaceDialogVisible = true
|
|
|
|
},
|
|
|
|
deleteWorkplace(row) {
|
|
|
|
this.$confirm('此操作将永久删除该工位, 是否继续?', '提示', {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
type: 'warning'
|
|
|
|
}).then(() => {
|
|
|
|
deleteWorkplace(row).then(res => {
|
|
|
|
if (res.code != 20000) {
|
|
|
|
this.$message.error('删除错误')
|
|
|
|
} else {
|
|
|
|
this.$message.success(res.data)
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getInvList() {
|
|
|
|
let query = {
|
|
|
|
advanceType: 1
|
|
|
|
}
|
|
|
|
getInvListByUser(query)
|
|
|
|
.then((response) => {
|
|
|
|
this.invList = response.data || []
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleInvChange(invCode) {
|
|
|
|
this.invQuery.code = invCode
|
|
|
|
getUsers(this.invQuery).then(res => {
|
|
|
|
if (res.code == 20000) {
|
|
|
|
this.users = res.data || []
|
|
|
|
} else {
|
|
|
|
this.$message.error('错误')
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
printLabel(row) {
|
|
|
|
row.labelId = 5
|
|
|
|
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
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getLstTree(){
|
|
|
|
getTree(this.query)
|
|
|
|
.then((response) => {
|
|
|
|
var invlist = response.data || [];
|
|
|
|
this.treeList = this.handleTree(invlist, "code", "parentCode");
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getBusType() {
|
|
|
|
let query = {
|
|
|
|
page: 1,
|
|
|
|
limit: 10
|
|
|
|
}
|
|
|
|
getCollectBusType(query)
|
|
|
|
.then((response) => {
|
|
|
|
this.busTypes = response.data.list || []
|
|
|
|
// this.filterQuery.action = this.busTypes[0].action;
|
|
|
|
// this.getList();
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getTree() {
|
|
|
|
getTree(this.query)
|
|
|
|
.then((response) => {
|
|
|
|
var treeList = response.data || []
|
|
|
|
const filteredList = treeList.filter(item => item.parentCode != null)
|
|
|
|
this.fromDeptOptions = filteredList
|
|
|
|
console.log('jjsjsjsj', this.fromDeptOptions)
|
|
|
|
})
|
|
|
|
.catch(() => {
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handCurrentChange(row){
|
|
|
|
console.log(row)
|
|
|
|
},
|
|
|
|
handleNodeClick(row){
|
|
|
|
this.query.code = row.code
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.getList()
|
|
|
|
this.getInvList()
|
|
|
|
this.getBusType()
|
|
|
|
this.getTree()
|
|
|
|
this.getLstTree()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.iconButton {
|
|
|
|
margin-left: 0px;
|
|
|
|
height: 30px;
|
|
|
|
}
|
|
|
|
</style>
|