|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<el-card>
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
@ -26,7 +26,8 @@
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table v-loading="loading" :data="userList" style="width: 100%" :row-style="{height: '32px' }" @current-change="handCurrentChange" highlight-current-row
|
|
|
|
|
<el-table v-loading="loading" :data="userList" style="width: 100%" :row-style="{height: '32px' }"
|
|
|
|
|
@current-change="handCurrentChange" highlight-current-row
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
|
|
|
<el-table-column label="用户账号" prop="userName"></el-table-column>
|
|
|
|
@ -90,6 +91,48 @@
|
|
|
|
|
</el-button-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-table v-loading="loading" :data="workList" style="width: 100%" :row-style="{height: '32px' }"
|
|
|
|
|
>
|
|
|
|
|
<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="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="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
>详情
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click="remove(scope.row)"
|
|
|
|
|
>移除
|
|
|
|
|
</el-button>
|
|
|
|
|
<!--@click.native.stop="printLabel(scope.row)"-->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
@ -101,90 +144,54 @@
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
>
|
|
|
|
|
<selectWorkplace>
|
|
|
|
|
<selectWorkplace
|
|
|
|
|
:userId="userId"
|
|
|
|
|
:closeDialog="closeDialog"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
</selectWorkplace>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!--<el-card>-->
|
|
|
|
|
<!-- <el-form :model="query" label-width="auto" v-show="showSearch1" 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>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- </el-form>-->
|
|
|
|
|
<!-- <el-table v-loading="loading" :data="collectPointList" style="width: 100%" :row-style="{height: '32px' }"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-table-column type="index" label="序号"></el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="采集点编号" prop="code"></el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="采集点名称" prop="name"></el-table-column>-->
|
|
|
|
|
<!-- <!–<el-table-column label="采集点负责人" prop="employeeName"></el-table-column>–>-->
|
|
|
|
|
<!-- <el-table-column label="单据类型" prop="busType"></el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="扫码方式" prop="scanType">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- {{ scanTypeEnum[scope.row.scanType].desc }}-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="备注" prop="remark"></el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="操作" fixed="right" width="100">-->
|
|
|
|
|
<!-- <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="editCollectionPoints(scope.row)"-->
|
|
|
|
|
<!-- >编辑-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- type="text"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- @click.native.stop="deleteCollectionPoints(scope.row)"-->
|
|
|
|
|
<!-- >删除-->
|
|
|
|
|
<!-- </el-button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- </el-table>-->
|
|
|
|
|
<!--</el-card>-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { getUserBindWork, getUsers } from '@/api/basic/collectPoint/userWorkplace'
|
|
|
|
|
import selectWorkplace from "./selectWorkplace"
|
|
|
|
|
|
|
|
|
|
import { getUserBindWork, getUsers,delUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
|
|
|
|
|
import selectWorkplace from './selectWorkplace'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {selectWorkplace},
|
|
|
|
|
components: { selectWorkplace },
|
|
|
|
|
data() {
|
|
|
|
|
return{
|
|
|
|
|
loading:false,
|
|
|
|
|
showSearch:true,
|
|
|
|
|
return {
|
|
|
|
|
loading: false,
|
|
|
|
|
showSearch: true,
|
|
|
|
|
filterBadInv: true,
|
|
|
|
|
list:[],
|
|
|
|
|
collectPointList:[],
|
|
|
|
|
list: [],
|
|
|
|
|
collectPointList: [],
|
|
|
|
|
query: {},
|
|
|
|
|
userList: [],
|
|
|
|
|
workList: [],
|
|
|
|
|
rowData: {
|
|
|
|
|
employeeName: '用户'
|
|
|
|
|
},
|
|
|
|
|
userQuery: {
|
|
|
|
|
invCode: this.$store.getters.locInvCode,
|
|
|
|
|
invCode: this.$store.getters.locInvCode
|
|
|
|
|
},
|
|
|
|
|
workQuery: {},
|
|
|
|
|
selectUserWorkDialogVisible: false
|
|
|
|
|
selectUserWorkDialogVisible: false,
|
|
|
|
|
operationTypes: {
|
|
|
|
|
1: '扫码生成业务单(必须插入)',
|
|
|
|
|
2: '按单校验三期(是否插入可选)',
|
|
|
|
|
3: '按单不校验三期(是否插入可选)'
|
|
|
|
|
},
|
|
|
|
|
checkInserts: {
|
|
|
|
|
1: '不插入',
|
|
|
|
|
2: '插入'
|
|
|
|
|
},
|
|
|
|
|
warnTypeMap: {
|
|
|
|
|
1: '信息提醒',
|
|
|
|
|
2: '禁止录入'
|
|
|
|
|
},
|
|
|
|
|
userId: ''
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -204,39 +211,75 @@ export default {
|
|
|
|
|
this.query.page = 1
|
|
|
|
|
this.getUsers()
|
|
|
|
|
},
|
|
|
|
|
onUserReset(){
|
|
|
|
|
onUserReset() {
|
|
|
|
|
this.workQuery = {}
|
|
|
|
|
},
|
|
|
|
|
loadWorkList(){
|
|
|
|
|
loadWorkList() {
|
|
|
|
|
// if (this.rowData.id == null){
|
|
|
|
|
// return this.$message.error("请先选择用户")
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
getUsers(){
|
|
|
|
|
getUsers() {
|
|
|
|
|
getUsers(this.userQuery).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.userList = res.data || []
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("获取错误")
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('获取错误')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handCurrentChange(row){
|
|
|
|
|
handCurrentChange(row) {
|
|
|
|
|
this.rowData = row
|
|
|
|
|
let query = {
|
|
|
|
|
userId : row.id
|
|
|
|
|
userId: row.id
|
|
|
|
|
}
|
|
|
|
|
getUserBindWork(query).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
console.log("djjddjdjdjd",res.data)
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.workList = res.data || []
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('获取失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
addWork(){
|
|
|
|
|
if (this.rowData.id == null){
|
|
|
|
|
return this.$message.error("请先选择用户")
|
|
|
|
|
addWork() {
|
|
|
|
|
if (this.rowData.id == null) {
|
|
|
|
|
return this.$message.error('请先选择用户')
|
|
|
|
|
}
|
|
|
|
|
this.userId = this.rowData.id
|
|
|
|
|
this.selectUserWorkDialogVisible = true
|
|
|
|
|
},
|
|
|
|
|
closeDialog() {
|
|
|
|
|
let query = {
|
|
|
|
|
userId: this.userId
|
|
|
|
|
}
|
|
|
|
|
getUserBindWork(query).then(res => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.workList = res.data || []
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error('获取失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.selectUserWorkDialogVisible = false
|
|
|
|
|
},
|
|
|
|
|
remove(row) {
|
|
|
|
|
this.$confirm('确定移除该工位?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
let query = {
|
|
|
|
|
id : row.id
|
|
|
|
|
}
|
|
|
|
|
delUserBindWork(query).then(res => {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
this.$message.success('移除成功')
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|