fix: 修复

20240912_adapter_z
chenhc 7 months ago
parent d2ef8d6831
commit 4ca59f3aec

@ -15,6 +15,16 @@ export function getWorkBindBusTypes(query) {
export function filterListByWorkplace(query) {
return axios({
url: '/udiwms/sysWorkplace/filterListByWorkplace',
method: 'get',
params: query
})
}
//绑定单据类型
export function bindBusType(query) {
@ -55,3 +65,23 @@ export function removeBusTypeById(query) {
data: query
});
}
//移除单据类型
export function removeBusTypeByBusTypeAndWorkplace(query) {
return axios({
url: "/udiwms/sysWorkplace/removeBusTypeByBusTypeAndWorkplace",
method: "post",
data: query
});
}
//绑定单据类型
export function workplaceBindBusType(query) {
return axios({
url: "/udiwms/sysWorkplace/workplaceBindBusType",
method: "post",
data: query
});
}

@ -4,15 +4,15 @@
label-width="auto"
>
<el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col">
<el-form-item label="所属工位:" prop="workplaceName" class="query-form-item">
<el-input
disabled
v-model="busData.workplaceName" 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-->
<!-- disabled-->
<!-- v-model="busData.workplaceName" 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="isMatching" class="query-form-item">
<el-select v-model="formData.isMatching" style="width: 80%" placeholder="是否配套系统"
@ -48,7 +48,14 @@
></el-input>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位:" prop="orderCirType" class="query-form-item">
<el-select v-model="formData.orderCirType" style="width: 80%" placeholder="选择计量单位">
<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="autoTag" class="query-form-item">
<el-select v-model="formData.autoTag" style="width: 80%" placeholder="请选择是否队列设备"
@ -58,14 +65,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" class="el-col">
<el-form-item label="计量单位:" prop="orderCirType" class="query-form-item">
<el-select v-model="formData.orderCirType" style="width: 80%" placeholder="选择计量单位">
<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="monopoly" class="query-form-item">
<el-select v-model="formData.monopoly" style="width: 80%" placeholder="独占工位库存"

@ -0,0 +1,827 @@
<template>
<el-card>
<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="chooseBusType"
icon="el-icon-plus"
>新增业务类型
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table :data="busTypeList" 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="busName" width="160"></el-table-column>
<el-table-column label="配套系统" prop="isMatching" width="100">
<template slot-scope="scope">
<span>{{ isMatchings[scope.row.isMatching] }}</span>
</template>
</el-table-column>
<el-table-column label="单据类型" prop="thrBusName" width="100"></el-table-column>
<!-- <el-table-column label="单据完成条件" prop="orderFinishVerify" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ orderFinishVerifys[scope.row.orderFinishVerify] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="队列管理" prop="autoTag" width="100">
<template slot-scope="scope">
<span>{{ autoTagTypes[scope.row.autoTag] }}</span>
</template>
</el-table-column>
<el-table-column label="独占库存" prop="monopoly" width="90">
<template slot-scope="scope">
<span>{{ monopolys[scope.row.monopoly] }}</span>
</template>
</el-table-column>
<el-table-column label="计量单位 " prop="orderCirType" width="100">
<template slot-scope="scope">
<span>{{ orderCirTypes[scope.row.orderCirType] }}</span>
</template>
</el-table-column>
<el-table-column label="扫码方式" prop="scanType" width="120">
<template slot-scope="scope">
<span>{{ operationTypes[scope.row.scanType] }}</span>
</template>
</el-table-column>
<el-table-column label="处理结果 " prop="checkInsert" width="120">
<template slot-scope="scope">
<span>{{ checkInserts[scope.row.checkInsert] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="异常方式提醒" prop="warnType" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ warnTypeMap[scope.row.warnType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="是否常用" prop="isPopular" width="100">
<template slot-scope="scope">
<span>{{ isPopulars[scope.row.isPopular] }}</span>
</template>
</el-table-column>
<el-table-column label="业务顺号" prop="number" width="100"></el-table-column>
<el-table-column label="备注:" prop="remark" 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="unitTittle" width="100"></el-table-column>-->
<!-- <el-table-column label="默认仓库 " prop="invName"></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-dialog
:title="busTypeMap[busName]"
:visible.sync="chooseBusTypeDialogVisible"
width="60%"
v-if="chooseBusTypeDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<!--<selectBusType-->
<!-- :closeDialog="closeDialog"-->
<!-- :workplaceId="workplaceId"-->
<!-- :busTypeCodes="busTypeCodes"-->
<!--&gt;-->
<!--</selectBusType>-->
<addBusTypeDialog
:workplaceId="workplaceId"
:busData="busData"
:busName="busName"
:upData="upData"
:closeDialog="closeDialog"
>
</addBusTypeDialog>
</el-dialog>
</el-card>
</template>
<script>
import {
listPage,
addWorkplace,
updateWorkplace,
deleteWorkplace,
createWorkplaceId, printWorkLabel, getUsers
} from '@/api/basic/workPlace/sysWorkplaceManage'
import {filterAllByUser, filterList, getInvListByUser} from '@/api/system/invWarehouse'
import {addTree, deleteTree, getTree, updateTree} from '@/api/basic/collectPoint/collectPointManage'
import {getCollectBusType} from '@/api/basic/collectPoint/gatherOrderType'
import panelGroup from '@/views/dashboard/PanelGroup'
import {delUserBindWork, getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
import selectBusType from './selectBusType'
import addBusTypeDialog from './addBusTypeDialog'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
components: {selectBusType, addBusTypeDialog},
data() {
return {
query: {
page: 1,
limit: 10,
code: null,
workplaceStatus: 1,
deptCode: ''
},
showSearch: true,
Dictionary: false,
loading: false,
list: [],
treeList: [
{
code: '1001',
parentCode: null,
label: '全部'
}
],
addWorkplaceDialogVisible: false,
chooseBusTypeDialogVisible: false,
fromName: 'add',
fromMap: {
'add': '新增工位',
'edit': '编辑工位'
},
busName: '',
busTypeMap: {
'add': '新增业务类型',
'edit': '编辑业务类型'
},
formData: {
workplaceId: null,
workplaceName: null,
workplaceStatus: 1,
workplaceType: 3,
deptCode: null,
chargeUser: null,
constituencies: null,
invRemindNumber: 0,
remake: null
},
workplaceCode: '6001',
unitStorageList: [],
invList: [],
fromDeptOptions: [],
filterBadInv: true,
formRules: {
workplaceName: [
{required: true, message: '请输入工位名称', trigger: 'blur'}
],
operationType: [
{required: true, message: '请选择作业方式', trigger: 'blur'}
],
checkInsert: [
{required: true, message: '处理结果不能为空', trigger: 'blur'}
],
// invRemindNumber: [
// { required: true, message: '', trigger: 'blur' }
// ],
warnType: [
{required: true, message: '请选择提醒方式', trigger: 'blur'}
],
corpType: [
{required: true, message: '请选择往来单位类型', trigger: 'blur'}
],
orderId: [
{required: true, message: '请选择单据类型', trigger: 'blur'}
],
unitTittle: [
{required: true, message: '请输入往来类型标题', trigger: 'blur'}
],
workplaceStatus: [
{required: true, message: '请选择工位状态', trigger: 'blur'}
]
// workplaceType: [
// { required: true, message: '', trigger: 'blur' }
// ]
},
invQuery: {
invCode: '',
deptCode: ''
},
users: [],
busTypes: [],
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: '使用计量单位'
},
workplaceStatusMap: {
0: '暂停',
1: '启用'
},
orderFinishVerifys: {
0: '完全赋码',
1: '部分赋码',
2: '赋码超出',
4: '',
},
warnTypeMap: {
1: '信息提醒',
2: '信息弹框提醒',
3: '不提醒'
},
isPopulars: {
1: '是',
0: '否',
},
userList: [],
userLoading: false,
rowData: {
workplaceName: '工位'
},
userQuery: {
page: 1,
limit: 10,
userKey: null,
workplaceCode: null
},
formName: 'add',
formMap: {
add: '新增',
edit: '编辑'
},
subFormVisible: false,
subData: {
parentName: '全部',
parentCode: '1001'
},
groupData: null,
total: 0,
userTotal: 0,
workplaceName: '用户',
workplaceBusType: '工位',
deptList: [],
//
workplaceId: null,
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 10
},
busTypeList: [],
busTypeTotal: 0,
busTypeCodes: [],
busData: null,
upData: null
}
},
computed: {},
methods: {
hideSearch() {
this.showSearch = !this.showSearch
},
onSubmit() {
this.userList = []
this.workplaceName = '工位'
this.query.page = 1
this.getList()
},
onReset() {
this.$router.push({
path: ''
})
this.query = {
page: 1,
limit: 20,
workplaceStatus: null
}
this.getList()
},
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
})
},
addWorkplace() {
this.fromName = 'add'
this.formData = {
workplaceId: null,
workplaceName: null,
workplaceStatus: 1,
deptCode: null,
chargeUser: null,
constituencies: null,
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
},
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() {
// 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('更新错误')
}
this.addWorkplaceDialogVisible = false
this.$message.success(res.data)
this.getList()
}).catch(() => {
this.addWorkplaceDialogVisible = false
this.$message.error('更新错误')
})
}
},
edit(row) {
this.formData = row
// this.formData.invCode = String(row.invCode)
if (row.chargeUser == 0) {
this.formData.chargeUser = null
} else if (row.chargeUser == 1) {
this.formData.chargeUser = Number(row.chargeUser)
} else {
this.formData.chargeUser = row.chargeUser
}
this.fromName = 'edit'
this.invQuery.deptCode = row.deptCode
getUsers(this.invQuery).then(res => {
if (res.code == 20000) {
this.users = res.data.list || []
} else {
this.$message.error('错误')
}
})
this.getTree()
this.addWorkplaceDialogVisible = true
},
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(() => {
})
},
getInvList() {
let query = {
advanceType: 1,
deptCode: this.formData.deptCode
}
getInvListByUser(query)
.then((response) => {
this.invList = response.data || []
})
.catch(() => {
})
},
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('错误')
}
})
},
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
})
},
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(() => {
})
},
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)
if (treeList.length == 0) {
this.fromDeptOptions = [
{
code: '1001',
parentCode: null,
label: '全部'
}
]
} else {
this.fromDeptOptions = treeList
}
})
.catch(() => {
})
},
handCurrentChange(row) {
this.rowData = row
this.workplaceName = row.workplaceName
this.userQuery.workplaceCode = row.workplaceId
this.workplaceId = row.workplaceId
this.getUserBindWork(this.userQuery)
this.getWorkBindBusTypes()
},
loadUserList() {
this.userQuery.workplaceCode = this.rowData.workplaceId
this.getUserBindWork(this.userQuery)
},
onBusTypeReset() {
this.busQuery = {
busKey: '',
workplaceCode: null,
page: 1,
limit: 10
},
this.getWorkBindBusTypes()
},
loadBusList() {
this.getWorkBindBusTypes()
},
chooseBusType() {
// if (this.rowData.workplaceId == null) {
// return this.$message.error('')
// }
this.busName = 'add'
this.workplaceId = this.rowData.workplaceId
this.busData = this.rowData
this.userId = this.rowData.id
this.busTypeCodes = this.busTypeList.map(item => item.code)
this.upData = null
this.chooseBusTypeDialogVisible = true
},
onUserReset() {
this.userQuery = {
page: 1,
limit: 10,
userKey: null,
workplaceCode: this.rowData.workplaceId
}
this.getUserBindWork(this.userQuery)
},
getUserBindWork(query) {
getUserBindWork(query).then(res => {
if (res.code == 20000) {
this.userList = res.data.list || []
this.userTotal = res.data.total || 0
} else {
this.$message.error('获取失败')
}
})
},
removeUser(row) {
this.$confirm('确定移除该用户?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let query = {
id: row.id
}
delUserBindWork(query).then(res => {
if (res.code == 20000) {
this.userQuery.workplaceCode = this.rowData.workplaceId
this.getUserBindWork(this.userQuery)
this.$message.success('移除成功')
} else {
this.$message.error(res.message)
}
})
}).catch(() => {
})
},
handleNodeClick(row) {
this.groupData = row
this.query.code = row.code
if (this.query.code == 1001) {
this.query.code = null
}
this.getList()
},
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)
}
})
},
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(() => {
})
}
},
getDeptList() {
this.deptList = []
let data =
{
enable: true
}
filterList(data).then(res => {
if (res.code == 20000) {
this.deptList = res.data.list || []
}
})
},
// getDeptList() {
//
// filterAllByUser()
// .then((response) => {
// this.deptList = response.data || []
// this.getInvList()
// })
// .catch(() => {
// })
// },
deptChange() {
this.getInvList()
this.formData.invCode = ''
},
changeCheckInsert() {
if (this.formData.operationType == 1) {
this.formData.checkInsert = 1
}
},
getWorkBindBusTypes(val) {
if (val != null){
this.busQuery.page = val.page;
}
getWorkBindBusTypes(this.busQuery).then(res => {
if (res.code == 20000) {
this.busTypeList = res.data.list
this.busTypeTotal = res.data.total
} else {
return this.$message.error('获取错误')
}
})
},
removeBusType(row) {
this.$confirm('此操作将永久删除该业务类型, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeBusTypeById(row).then(res => {
if (res.code == 20000) {
this.$message.success('删除成功')
this.getWorkBindBusTypes()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
})
},
updateBusType(row) {
this.upData = row
this.busData = this.rowData
this.busName = 'edit'
this.chooseBusTypeDialogVisible = true
},
closeDialog() {
this.chooseBusTypeDialogVisible = false
this.getWorkBindBusTypes()
}
},
created() {
this.loadBusList()
}
}
</script>
<style scoped>
</style>

@ -34,41 +34,68 @@
<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="code"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="出入库类型" prop="mainAction">
<!-- <el-table-column label="业务类型编码 " prop="documentTypeCode" width="100"></el-table-column>-->
<el-table-column label="业务名称 " prop="busName" width="160"></el-table-column>
<el-table-column label="配套系统" prop="isMatching" width="100">
<template slot-scope="scope">
<span>{{ mainActions[scope.row.mainAction] }}</span>
<span>{{ isMatchings[scope.row.isMatching] }}</span>
</template>
</el-table-column>
<el-table-column label="是否内部单据" prop="innerOrder">
<el-table-column label="单据类型" prop="thrBusName" width="100"></el-table-column>
<!-- <el-table-column label="单据完成条件" prop="orderFinishVerify" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ orderFinishVerifys[scope.row.orderFinishVerify] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="队列管理" prop="autoTag" width="100">
<template slot-scope="scope">
<span>{{ innerOrderMap[scope.row.innerOrder] }}</span>
<span>{{ autoTagTypes[scope.row.autoTag] }}</span>
</template>
</el-table-column>
<el-table-column label="来源系统" prop="fromType"></el-table-column>
<el-table-column label="来源单据类型" prop="fromDocumentType"></el-table-column>
<el-table-column label="来源接口地址" prop="fromInterAddress"></el-table-column>
<el-table-column label="排序" prop="sortNumber" width="50"></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="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-column label="独占库存" prop="monopoly" width="90">
<template slot-scope="scope">
<span>{{ monopolys[scope.row.monopoly] }}</span>
</template>
</el-table-column>
<el-table-column label="计量单位 " prop="orderCirType" width="100">
<template slot-scope="scope">
<span>{{ orderCirTypes[scope.row.orderCirType] }}</span>
</template>
</el-table-column>
<el-table-column label="扫码方式" prop="scanType" width="120">
<template slot-scope="scope">
<span>{{ operationTypes[scope.row.scanType] }}</span>
</template>
</el-table-column>
<el-table-column label="处理结果 " prop="checkInsert" width="120">
<template slot-scope="scope">
<span>{{ checkInserts[scope.row.checkInsert] }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="异常方式提醒" prop="warnType" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ warnTypeMap[scope.row.warnType] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="是否常用" prop="isPopular" width="100">
<template slot-scope="scope">
<span>{{ isPopulars[scope.row.isPopular] }}</span>
</template>
</el-table-column>
<el-table-column label="业务顺号" prop="number" width="100"></el-table-column>
<el-table-column label="备注:" prop="remark" width="100"></el-table-column>
</el-table>
<pagination
:total="total"
:limit.sync="query.limit"
:page.sync="query.page"
@pagination="getList()"
>
</pagination>
</div>
</template>
@ -81,7 +108,9 @@ import {
delCollectBusType, genCode
} from '@/api/basic/collectPoint/gatherOrderType'
import { getBusTypeList } from '@/api/basic/busType'
import { bindBusType } from '@/api/basic/workPlace/sysWorkplaceDocuments'
import { workplaceBindBusType } from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {filterListByWorkplace, removeBusTypeByBusTypeAndWorkplace} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
props: {
@ -100,10 +129,73 @@ export default {
},
data() {
return {
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: '使用计量单位'
},
workplaceStatusMap: {
0: '暂停',
1: '启用'
},
orderFinishVerifys: {
0: '完全赋码',
1: '部分赋码',
2: '赋码超出',
4: '',
},
warnTypeMap: {
1: '信息提醒',
2: '信息弹框提醒',
3: '不提醒'
},
isPopulars: {
1: '是',
0: '否',
},
busQuery: {
busKey: '',
workplaceCode: null,
page: 1,
limit: 1000
},
query: {
page: 1,
limit: 10
},
busTypeList: [],
busTypeTotal: 0,
showSearch: true,
filterBadInv: true,
loading: false,
@ -152,7 +244,7 @@ export default {
rowList: [],
BusTypeQuery: {
workplaceCode: null,
documentTypeCode: []
documentTypeCodes: []
}
}
},
@ -186,9 +278,12 @@ export default {
}
})
},
getList() {
getList(val) {
if (val != null){
this.query.page = val.page;
}
this.loading = true
getCollectBusType(this.query).then((response) => {
getWorkBindBusTypes(this.query).then((response) => {
if (response.code == 20000) {
this.list = response.data.list || []
this.total = response.data.total || 0
@ -226,13 +321,13 @@ export default {
//
chooseBusType() {
let selectList = this.$refs.table.selection
let list = selectList.map(item => item.code)
let list = selectList.map(item => item.documentTypeCode)
this.BusTypeQuery.workplaceCode = this.workplaceId
this.BusTypeQuery.documentTypeCode = list
this.BusTypeQuery.documentTypeCodes = list
if (list.length == 0) {
return this.$message.error('未选择单据类型或该工位已没有可增加单据类型')
}
bindBusType(this.BusTypeQuery).then(res => {
workplaceBindBusType(this.BusTypeQuery).then(res => {
if (res.code == 20000) {
this.$message.success('选入成功')
this.closeDialog()
@ -242,21 +337,32 @@ export default {
})
},
checkSelectable(row) {
if (this.busTypeCodes == null) {
return true
} else {
if (this.busTypeCodes.length > 0) {
return this.busTypeCodes.indexOf(row.code) === -1
} else {
return true
for (let item of this.busTypeList) {
// documentTypeCodefalse
if (item.documentTypeCode == row.documentTypeCode) {
return false;
}
}
}
// documentTypeCodetrue
return true;
},
getWorkBindBusTypes() {
this.busQuery.workplaceCode = this.workplaceId
filterListByWorkplace(this.busQuery).then(res => {
if (res.code == 20000) {
this.busTypeList = res.data.list
this.busTypeTotal = res.data.total
} else {
return this.$message.error('获取错误')
}
})
},
},
created() {
this.getList()
this.getBusType()
this.getWorkBindBusTypes()
}
}

@ -192,7 +192,7 @@
>
<el-button type="primary" @click="chooseBusType"
icon="el-icon-plus"
>新增业务类型
>选入业务类型
</el-button
>
</el-button-group>
@ -262,12 +262,12 @@
<!-- <el-table-column label="默认仓库 " prop="invName"></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="updateBusType(scope.row)"-->
<!-- >编辑-->
<!-- </el-button>-->
<el-button
type="text"
size="small"
@ -636,29 +636,29 @@
</el-dialog>
<el-dialog
:title="busTypeMap[busName]"
title="选入业务类型"
:visible.sync="chooseBusTypeDialogVisible"
width="60%"
v-if="chooseBusTypeDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
>
<!--<selectBusType-->
<!-- :closeDialog="closeDialog"-->
<!-- :workplaceId="workplaceId"-->
<!-- :busTypeCodes="busTypeCodes"-->
<!--&gt;-->
<!--</selectBusType>-->
<addBusTypeDialog
:workplaceId="workplaceId"
:busData="busData"
:busName="busName"
:upData="upData"
<selectBusType
:closeDialog="closeDialog"
:workplaceId="workplaceId"
:busTypeCodes="busTypeCodes"
>
</addBusTypeDialog>
</selectBusType>
<!-- <addBusTypeDialog-->
<!-- :workplaceId="workplaceId"-->
<!-- :busData="busData"-->
<!-- :busName="busName"-->
<!-- :upData="upData"-->
<!-- :closeDialog="closeDialog"-->
<!-- >-->
<!-- </addBusTypeDialog>-->
</el-dialog>
</div>
@ -679,7 +679,7 @@ import panelGroup from '@/views/dashboard/PanelGroup'
import {delUserBindWork, getUserBindWork} from '@/api/basic/collectPoint/userWorkplace'
import selectBusType from './selectBusType'
import addBusTypeDialog from './addBusTypeDialog'
import {getWorkBindBusTypes, removeBusTypeById} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {filterListByWorkplace, removeBusTypeByBusTypeAndWorkplace} from '@/api/basic/workPlace/sysWorkplaceDocuments'
export default {
components: {selectBusType, addBusTypeDialog},
@ -1291,7 +1291,7 @@ export default {
},
getWorkBindBusTypes() {
this.busQuery.workplaceCode = this.rowData.workplaceId
getWorkBindBusTypes(this.busQuery).then(res => {
filterListByWorkplace(this.busQuery).then(res => {
if (res.code == 20000) {
this.busTypeList = res.data.list
this.busTypeTotal = res.data.total
@ -1306,7 +1306,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeBusTypeById(row).then(res => {
removeBusTypeByBusTypeAndWorkplace(row).then(res => {
if (res.code == 20000) {
this.$message.success('删除成功')
this.getWorkBindBusTypes()

Loading…
Cancel
Save