9/18 现场管理基础数据页面优化

yanshishuju
wangwei 7 months ago
parent 5646e914b2
commit 9061cff13d

@ -16,7 +16,8 @@
<el-col :span="8">
<el-form-item label="所属组别:" class="query-form-item">
<el-select v-model="query.code" placeholder="请选择所属组别"
style="width: 80%" clearable>
style="width: 80%" clearable
>
<el-option
v-for="item in fromDeptOptions"
:key="item.code"
@ -39,7 +40,8 @@
</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 v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }" highlight-current-row
@current-change="handCurrentChange" ref="table"
>
<!--<el-table-column label width="45">-->
<!-- <template slot-scope="scope">-->
@ -56,11 +58,11 @@
<span>{{ workplaceStatusMap[scope.row.workplaceStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="工位类型" prop="workplaceType" width="90">
<template slot-scope="scope">
<span>{{ workplaceTypes[scope.row.workplaceType] }}</span>
</template>
</el-table-column>
<!--<el-table-column label="工位类型" prop="workplaceType" width="90">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ workplaceTypes[scope.row.workplaceType] }}</span>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column label="所属组别" prop="categoryName" width="90">
<template slot-scope="scope">
<span v-if="scope.row.categoryName !== '全部'">{{ scope.row.categoryName }}</span>
@ -116,67 +118,35 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" class="el-row">
<el-row :gutter="24">
<el-col :span="12" class="el-col">
<el-form-item label="作业方式:" prop="operationType" class="query-form-item">
<el-select v-model="formData.operationType" style="width: 100%" placeholder="选择扫码方式" clearable disabled>
<el-option label="扫码生成业务单" :value="1"></el-option>
<el-option label="按单校验三期" :value="2"></el-option>
<el-option label="按单不校验三期" :value="3"></el-option>
<el-form-item label="工位状态:" prop="workplaceStatus" class="query-form-item">
<el-select v-model="formData.workplaceStatus" style="width: 100%" placeholder="工位状态" disabled>
<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="checkInsert" class="query-form-item">
<el-select v-model="formData.checkInsert" style="width: 100%" placeholder="选择扫码方式" clearable disabled>
<el-option label="不插入" :value="1"></el-option>
<el-option label="插入" :value="2"></el-option>
<el-form-item prop="deptCode" label="所属部门:" >
<el-select v-model="formData.deptCode" placeholder="请选择部门" clearable disabled
style="width: 100%"
@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-col :span="12" class="el-col">-->
<!-- <el-form-item label="所属部门:" class="query-form-item">-->
<!-- <deptSelect :value.sync="formData.deptCode" style="width: 80%" :changeValue.sync="handleInvChange"/>-->
<!-- &lt;!&ndash;<deptSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>&ndash;&gt;-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col">
<el-form-item label="提醒方式:" prop="warnType" class="query-form-item">
<el-select v-model="formData.warnType" style="width: 100%" placeholder="选择扫码方式" clearable 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 label="往来类型标题:" prop="remake" class="query-form-item">
<el-input
disabled
v-model="formData.unitTittle" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="来源单据类型编号:" prop="remake" class="query-form-item">
<el-input
disabled
v-model="formData.busTypeCode" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="来源单据类型名称:" prop="remake" class="query-form-item">
<el-input
disabled
v-model="formData.busTypeName" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<!--<el-col :span="24" class="el-col">-->
<!-- <el-form-item label="所属仓库:" prop="invCode" class="query-form-item">-->
<!-- <el-select v-model="formData.invCode" placeholder="请选择所属仓库"-->
@ -204,16 +174,6 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="作业方式:" prop="chargeUser" class="query-form-item">
<el-input
disabled
v-model="operationTypes[formData.operationType]" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="创建时间:" prop="createTime" class="query-form-item">
<el-input
@ -259,9 +219,8 @@
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row :gutter="24" class="el-row">
<el-col :span="24" class="el-col">
<el-form-item label="备注:" prop="unitTittle" class="query-form-item">
<el-input
@ -284,9 +243,9 @@ import {
addWorkplace,
updateWorkplace,
deleteWorkplace,
createWorkplaceId, printWorkLabel,getUsers
createWorkplaceId, printWorkLabel, getUsers
} from '@/api/basic/workPlace/sysWorkplaceManage'
import { getInvListByUser } from '@/api/system/invWarehouse'
import { filterList, getInvListByUser } from '@/api/system/invWarehouse'
import { getTree } from '@/api/basic/collectPoint/collectPointManage'
import { getCollectBusType } from '@/api/basic/collectPoint/gatherOrderType'
import { userBindWork } from '@/api/basic/collectPoint/userWorkplace'
@ -296,16 +255,16 @@ export default {
props: {
closeDialog: {
type: Function,
required: true,
required: true
},
userId: {
type: Object,
required: true,
required: true
},
workPlaceCode: {
type: Array,
required: true,
},
required: true
}
},
data() {
return {
@ -368,20 +327,21 @@ export default {
1: '客户',
2: '供应商',
3: '内部科室',
4: '特殊往来',
4: '特殊往来'
},
workplaceStatusMap:{
workplaceStatusMap: {
0: '暂停',
1: '启用'
},
workplaceTypes:{
workplaceTypes: {
1: '拆零',
2: '取整',
3: '全部',
3: '全部'
},
radioCheck: '',
rowData: {},
rowList:[]
rowList: [],
deptList: [],
}
},
methods: {
@ -518,6 +478,18 @@ export default {
.catch(() => {
})
},
getDeptList() {
this.deptList = []
let data =
{
enable: true
}
filterList(data).then(res => {
if (res.code == 20000) {
this.deptList = res.data.list || []
}
})
},
handleInvChange(invCode) {
this.invQuery.code = invCode
getUsers(this.invQuery).then(res => {
@ -542,14 +514,14 @@ export default {
this.loading = false
})
},
getLstTree(){
getLstTree() {
getTree(this.query)
.then((response) => {
var invlist = response.data || [];
this.treeList = this.handleTree(invlist, "code", "parentCode");
var invlist = response.data || []
this.treeList = this.handleTree(invlist, 'code', 'parentCode')
})
.catch(() => {
});
})
},
getBusType() {
let query = {
@ -575,38 +547,38 @@ export default {
.catch(() => {
})
},
handCurrentChange(row){
handCurrentChange(row) {
this.rowList = row
// this.workQuery.workplaceId = row
// this.rowData = row
},
handleNodeClick(row){
handleNodeClick(row) {
this.query.code = row.code
this.getList()
},
//
addWork(){
addWork() {
let selectList = this.$refs.table.selection
let list = selectList.map(item => item.workplaceId)
this.workQuery.userId = this.userId
this.workQuery.workplaceId = list
if (list.length == 0){
if (list.length == 0) {
// return this.closeDialog()
return this.$message.error("未选择工位或该用户已没有可增加工位")
return this.$message.error('未选择工位或该用户已没有可增加工位')
}
userBindWork(this.workQuery).then(res => {
if (res.code == 20000){
if (res.code == 20000) {
this.closeDialog()
this.$message.success("成功!!")
}else {
this.$message.success('成功!!')
} else {
this.$message.error(res.message)
}
}).catch(() => {
})
},
checkDetail(row){
checkDetail(row) {
this.formData = row
this.WorkplaceDialogVisible = true
},
@ -625,6 +597,7 @@ export default {
created() {
this.getList()
this.getInvList()
this.getDeptList()
// this.getBusType()
this.getTree()
this.getLstTree()

@ -12,7 +12,9 @@
<el-col :span="10">
<el-form-item label="当前部门:" class="query-form-item">
<el-select v-model="userQuery.deptCode" class="width-full" placeholder="请选择" filterable clearable @change="changeUsers">
<el-select v-model="userQuery.deptCode" class="width-full" placeholder="请选择" filterable clearable
@change="changeUsers"
>
<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"/>-->
@ -45,7 +47,8 @@
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="userList" style="width: 100%" :row-style="{height: '32px' }" ref="userTable"
<el-table v-loading="loading" :data="userList" style="width: 100%" :row-style="{height: '32px' }"
ref="userTable"
@current-change="handCurrentChange" highlight-current-row
>
<el-table-column type="index" label="序号"></el-table-column>
@ -129,19 +132,7 @@
<span>{{ workplaceStatusMap[scope.row.workplaceStatus] }}</span>
</template>
</el-table-column>
<el-table-column label="工位类型" prop="workplaceType" width="90">
<template slot-scope="scope">
<span>{{ workplaceTypes[scope.row.workplaceType] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="库存预警数" prop="invRemindNumber" width="90"></el-table-column>-->
<el-table-column label="工位负责人" prop="employeeName" width="90"></el-table-column>
<!--<el-table-column label="往来单位标题" prop="unitTittle" width="100"></el-table-column>-->
<!--<el-table-column label="往来单位类型" prop="corpType" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ corpTypeMap[scope.row.corpType] }}</span>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column label="创建时间" prop="createTime" width="140"></el-table-column>
<el-table-column label="备注" prop="remake" width="240"></el-table-column>
<el-table-column label="操作" fixed="right" width="100">
@ -222,67 +213,26 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24" class="el-row">
<el-row :gutter="24">
<el-col :span="12" class="el-col">
<el-form-item label="作业方式:" prop="operationType" class="query-form-item">
<el-select v-model="formData.operationType" style="width: 100%" placeholder="选择扫码方式" clearable disabled>
<el-option label="扫码生成业务单" :value="1"></el-option>
<el-option label="按单校验三期" :value="2"></el-option>
<el-option label="按单不校验三期" :value="3"></el-option>
<el-form-item label="工位状态:" prop="workplaceStatus" class="query-form-item">
<el-select v-model="formData.workplaceStatus" style="width: 100%" placeholder="工位状态" disabled>
<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="checkInsert" class="query-form-item">-->
<!-- <el-select v-model="formData.checkInsert" style="width: 100%" placeholder="选择扫码方式" clearable disabled>-->
<!-- <el-option label="不插入" :value="1"></el-option>-->
<!-- <el-option label="插入" :value="2"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col">
<el-form-item label="提醒方式:" prop="warnType" class="query-form-item">
<el-select v-model="formData.warnType" style="width: 100%" placeholder="选择扫码方式" clearable disabled>
<el-option label="信息提醒" :value="1"></el-option>
<el-option label="禁止录入" :value="2"></el-option>
</el-select>
<el-form-item label="所属部门:" class="query-form-item">
<el-input
disabled
v-model="formData.deptCodeName" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="往来类型标题:" prop="remake" class="query-form-item">-->
<!-- <el-input-->
<!-- disabled-->
<!-- v-model="formData.unitTittle" style="width: 100%"-->
<!-- auto-complete="off"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!--</el-col>-->
<!--<el-col :span="24" class="el-col">-->
<!-- <el-form-item label="所属仓库:" prop="invCode" 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-row>
<el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col">
<el-form-item label="工位负责人:" prop="chargeUser" class="query-form-item">
<el-input
@ -292,6 +242,15 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="创建时间:" prop="createTime" class="query-form-item">
<el-input
disabled
v-model="formData.createTime" style="width: 100%"
auto-complete="off"
></el-input>
</el-form-item>
</el-col>
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="作业方式:" prop="chargeUser" class="query-form-item">-->
@ -338,8 +297,8 @@
<!--</el-col>-->
</el-row>
<el-row :gutter="24" class="el-row">
<el-col :span="24" class="el-col">
<el-form-item label="备注:" prop="unitTittle" class="query-form-item">
<el-input
@ -357,7 +316,7 @@
</template>
<script>
import { getUserBindWork, getUsers,delUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
import { getUserBindWork, getUsers, delUserBindWork } from '@/api/basic/collectPoint/userWorkplace'
import selectWorkplace from './selectWorkplace'
import { authAdminList } from '@/api/auth/authAdmin'
import { filterList } from '@/api/system/invWarehouse'
@ -411,16 +370,16 @@ export default {
1: '客户',
2: '供应商',
3: '内部科室',
4: '特殊往来',
4: '特殊往来'
},
workplaceStatusMap:{
workplaceStatusMap: {
0: '暂停',
1: '启用'
},
workplaceTypes:{
workplaceTypes: {
1: '拆零',
2: '取整',
3: '全部',
3: '全部'
},
userId: '',
workPlaceCode: [],
@ -443,14 +402,14 @@ export default {
this.userQuery = {
page: 1,
limit: 10,
key: '',
key: ''
}
this.getUsers()
},
onSubmit() {
this.workList = []
this.employeeName = '用户'
this.$refs.userTable.setCurrentRow(null);
this.$refs.userTable.setCurrentRow(null)
this.userQuery.page = 1
this.getUsers()
},
@ -478,31 +437,31 @@ export default {
// })
// },
getUsers() {
this.loading = true;
this.userQuery.key = 'key';
this.loading = true
this.userQuery.key = 'key'
authAdminList(this.userQuery)
.then(response => {
this.loading = false;
this.userList = response.data.list || [];
this.userTotal = response.data.total || 0;
this.loading = false
this.userList = response.data.list || []
this.userTotal = response.data.total || 0
})
.catch(() => {
this.loading = false;
this.userList = [];
this.userTotal = 0;
});
this.loading = false
this.userList = []
this.userTotal = 0
})
},
handCurrentChange(row) {
this.rowData = row
this.employeeName = row.employeeName
this.getUserBindWork()
},
getUserBindWork(){
getUserBindWork() {
this.workQuery.userId = this.rowData.id
getUserBindWork(this.workQuery).then(res => {
if (res.code == 20000) {
this.workList = res.data.list || []
this.workTotal= res.data.total || 0
this.workTotal = res.data.total || 0
} else {
this.$message.error('获取失败')
}
@ -513,7 +472,7 @@ export default {
return this.$message.error('请先选择用户')
}
this.userId = this.rowData.id
this.workPlaceCode = this.workList.map(item => item.workplaceId);
this.workPlaceCode = this.workList.map(item => item.workplaceId)
this.selectUserWorkDialogVisible = true
},
closeDialog() {
@ -528,14 +487,14 @@ export default {
type: 'warning'
}).then(() => {
let query = {
id : row.id
id: row.id
}
delUserBindWork(query).then(res => {
if (res.code == 20000) {
this.workQuery.userId = this.rowData.id
this.getUserBindWork(this.workQuery)
this.$message.success('移除成功')
}else {
} else {
this.$message.error(res.message)
}
})
@ -544,13 +503,15 @@ export default {
})
},
workDetail(row){
workDetail(row) {
console.log("woshishhss",row)
this.formData = row
this.addWorkplaceDialogVisible = true
},
getDepts() {
let data =
{enable: true,
{
enable: true
}
filterList(data).then(res => {
if (res.code == 20000) {
@ -558,7 +519,7 @@ export default {
}
})
},
changeUsers(){
changeUsers() {
this.getUsers()
}
},

@ -153,7 +153,7 @@
<el-option label="客户" :value="4"></el-option>
<el-option label="特殊往来" :value="5"></el-option>
<el-option label="内部科室" :value="6"></el-option>
<el-option label="填写" :value="7"></el-option>
<!--<el-option label="填写" :value="7"></el-option>-->
</div>
</el-select>
</el-form-item>

@ -5,6 +5,7 @@
>
<el-form-item class="query-form-item" label="业务类型编号/业务名称:">
<el-input
style="width: 210px"
v-model="busQuery.busKey"
placeholder="请输入业务类型编号/业务名称"
clearable

@ -72,19 +72,19 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="当前部门:" class="query-form-item">
<deptSelect style="width: 68%" :value.sync="query.deptCode"/>
<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>
<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>
<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>

Loading…
Cancel
Save