9/29 工位维护-上货工位优化1.0

yanshishuju
wangwei 6 months ago
parent 005badaa79
commit 78372b85b8

@ -12,6 +12,14 @@ export function bindCollect(query) {
}); });
} }
//删除采集工位
export function delCollect(query) {
return axios({
url: "/udiwms/sysWorkplace/delCollect",
method: "post",
data: query
});
}
export function getBindCollectList(query) { export function getBindCollectList(query) {

@ -161,20 +161,17 @@ export default {
// return collect.workplaceCode === row.workplaceCode && collect.documentTypeCode === row.documentTypeCode // return collect.workplaceCode === row.workplaceCode && collect.documentTypeCode === row.documentTypeCode
// }) // })
// }, // },
// checkSelectable(row) { checkSelectable(row) {
// if (this.collectWorks == null) { if (this.collectWorks == null) {
// return true return true
// } else { } else {
// if (this.collectWorks.length > 0) { if (this.collectWorks.length > 0) {
// if (this.containsObject(this.collectWorks,row)){ return this.collectWorks.indexOf(row.collectAndTypeCodes) === -1
// return -1 } else {
// } return true
// return true }
// } else { }
// return true },
// }
// }
// },
// //
handCurrentChange(row) { handCurrentChange(row) {
this.rowList = row this.rowList = row

@ -184,13 +184,13 @@
<el-tab-pane> <el-tab-pane>
<!-- {{ workplaceName }}---> <!-- {{ workplaceName }}--->
<span slot="label">采集工位</span> <span slot="label">采集工位</span>
<el-form :inline="true" :model="busQuery" class="query-form" size="mini" <el-form :inline="true" :model="cargowQuery" class="query-form" size="mini"
style="margin-bottom: 10px" style="margin-bottom: 10px"
> >
<el-form-item class="query-form-item" label="采集工位名称:"> <el-form-item class="query-form-item" label="采集工位名称:">
<el-input <el-input
v-model="busQuery.busKey" v-model="cargowQuery.keyWords"
placeholder="采集工位名称" placeholder="采集工位/业务名称"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -199,10 +199,10 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="onBusTypeReset" @click="onCollectList"
>重置 >重置
</el-button> </el-button>
<el-button type="primary" @click="loadBusList" <el-button type="primary" @click="loadCollectList"
icon="el-icon-search" icon="el-icon-search"
>查询 >查询
</el-button </el-button
@ -220,8 +220,8 @@
> >
<el-table-column type="index" label="序号"></el-table-column> <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="documentTypeCode" width="100"></el-table-column>-->
<el-table-column label="采集工位名称" prop="collectName" ></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="业务名称 " prop="busTypeName"></el-table-column>
<el-table-column label="操作" fixed="right" width="120"> <el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button--> <!-- <el-button-->
@ -233,19 +233,19 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="removeBusType(scope.row)" @click.native.stop="removeCollect(scope.row)"
>删除 >删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--<pagination--> <pagination
<!-- :total="busTypeTotal"--> :total="collectTotal"
<!-- :limit.sync="busQuery.limit"--> :limit.sync="cargowQuery.limit"
<!-- :page.sync="busQuery.page"--> :page.sync="cargowQuery.page"
<!-- @pagination="getWorkBindBusTypes()"--> @pagination="getCargowBindCollectList()"
<!--&gt;--> >
<!--</pagination>--> </pagination>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
@ -262,7 +262,8 @@
<addCollectWorkplace <addCollectWorkplace
:workplaceId="workplaceId" :workplaceId="workplaceId"
:collectWorks="collectWorks" :collectWorks="collectWorks"
:closeDialog="closeDialog"> :closeDialog="closeDialog"
>
</addCollectWorkplace> </addCollectWorkplace>
</el-dialog> </el-dialog>
@ -476,17 +477,17 @@ import {
listPage, listPage,
printWorkLabel, updateWorkplace printWorkLabel, updateWorkplace
} from '@/api/basic/workPlace/sysWorkplaceManage' } from '@/api/basic/workPlace/sysWorkplaceManage'
import {addTree, deleteTree, getTree, updateTree} from '@/api/basic/collectPoint/collectPointManage' import { addTree, deleteTree, getTree, updateTree } from '@/api/basic/collectPoint/collectPointManage'
import { getBindCollectList } from '@/api/basic/collectPoint/cargowWorkplaceManage' import { delCollect, getBindCollectList } from '@/api/basic/collectPoint/cargowWorkplaceManage'
import addCollectWorkplace from "./addCollectWorkplace" import addCollectWorkplace from './addCollectWorkplace'
export default { export default {
components: {addCollectWorkplace}, components: { addCollectWorkplace },
data() { data() {
return { return {
Dictionary: false, Dictionary: false,
showSearch: true, showSearch: true,
workplaceCode: '6001',
treeList: [ treeList: [
{ {
code: '1001', code: '1001',
@ -500,13 +501,15 @@ export default {
code: null, code: null,
workplaceStatus: 1, workplaceStatus: 1,
workPlaceClass: 2, workPlaceClass: 2,
deptCode: this.$store.getters.locDeptCode, deptCode: this.$store.getters.locDeptCode
}, },
DeptList:[], DeptList: [],
list:[], list: [],
collectList:[], collectList: [],
busTypeTotal:0, collectAndTypeIds: [],
total:0, users: [],
busTypeTotal: 0,
total: 0,
subFormVisible: false, subFormVisible: false,
subData: { subData: {
parentName: '全部', parentName: '全部',
@ -565,7 +568,7 @@ export default {
0: '完全赋码', 0: '完全赋码',
1: '部分赋码', 1: '部分赋码',
2: '赋码超出', 2: '赋码超出',
4: '', 4: ''
}, },
warnTypeMap: { warnTypeMap: {
1: '信息提醒', 1: '信息提醒',
@ -574,12 +577,12 @@ export default {
}, },
isPopulars: { isPopulars: {
1: '是', 1: '是',
0: '否', 0: '否'
}, },
shippers: { shippers: {
1: '原始单据的发货方', 1: '原始单据的发货方',
2: '原始单据的收货方', 2: '原始单据的收货方',
3: '用户所属仓库', 3: '用户所属仓库'
}, },
consignees: { consignees: {
1: '原始单据的收货方', 1: '原始单据的收货方',
@ -588,7 +591,7 @@ export default {
4: '客户', 4: '客户',
5: '特殊往来', 5: '特殊往来',
6: '内部科室', 6: '内部科室',
7: '填写', 7: '填写'
}, },
userList: [], userList: [],
userLoading: false, userLoading: false,
@ -598,9 +601,10 @@ export default {
cargowQuery: { cargowQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
userKey: null, keyWords: null,
workPlaceCode: null workPlaceCode: null
}, },
collectTotal:0,
busQuery: { busQuery: {
busKey: '', busKey: '',
workplaceCode: null, workplaceCode: null,
@ -643,15 +647,16 @@ export default {
}, },
formRules: { formRules: {
workplaceName: [ workplaceName: [
{required: true, message: '请输入工位名称', trigger: 'blur'} { required: true, message: '请输入工位名称', trigger: 'blur' }
], ],
workplaceStatus: [ workplaceStatus: [
{required: true, message: '请选择工位状态', trigger: 'blur'} { required: true, message: '请选择工位状态', trigger: 'blur' }
] ]
// workplaceType: [ // workplaceType: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
// ] // ]
}, },
} }
}, },
computed: {}, computed: {},
@ -702,11 +707,11 @@ export default {
limit: 20, limit: 20,
workplaceStatus: 1, workplaceStatus: 1,
workPlaceClass: 2, workPlaceClass: 2,
deptCode: this.$store.getters.locDeptCode, deptCode: this.$store.getters.locDeptCode
} }
this.getList() this.getList()
}, },
changeDept(){ changeDept() {
this.collectList = [] this.collectList = []
this.getList() this.getList()
}, },
@ -750,27 +755,65 @@ export default {
// this.getWorkBindBusTypes() // this.getWorkBindBusTypes()
this.getCargowBindCollectList() this.getCargowBindCollectList()
}, },
getCargowBindCollectList(){ getCargowBindCollectList() {
this.cargowQuery.workPlaceCode = this.rowData.workplaceId this.cargowQuery.workPlaceCode = this.rowData.workplaceId
getBindCollectList(this.cargowQuery).then(res => { getBindCollectList(this.cargowQuery).then(res => {
if (res.code != 20000){ if (res.code != 20000) {
return this.$message.error("获取失败") return this.$message.error('获取失败')
} }
this.collectList = res.data.list || [] this.collectList = res.data.list || []
this.collectTotal = res.data.total || 0
}) })
}, },
chooseCollect(){ onCollectList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
}
this.$router.push({
path: ''
})
this.cargowQuery = {
page: 1,
limit: 10,
keyWords: null,
workPlaceCode: null
},
this.getCargowBindCollectList()
},
loadCollectList() {
if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位')
}
this.cargowQuery.page = 1
this.getCargowBindCollectList()
},
chooseCollect() {
if (this.rowData.workplaceId == null) { if (this.rowData.workplaceId == null) {
return this.$message.error('请选择上货工位') return this.$message.error('请选择上货工位')
} }
console.log("hhhhhhh",this.collectList) this.collectWorks = this.collectList.map(item => item.collectAndTypeCodes)
this.collectWorks = this.collectList.map(item => ({
workplaceCode: item.collectWorkPlaceCode,
documentTypeCode: item.collectBusTypeCode
}));
// this.collectWorks = this.collectWorkPlaceCodes.concat(this.collectBusTypeCodes); // this.collectWorks = this.collectWorkPlaceCodes.concat(this.collectBusTypeCodes);
this.chooseCollectDialogVisible = true this.chooseCollectDialogVisible = true
}, },
removeCollect(row){
this.$confirm('此操作将永久删除该采集工位, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delCollect(row).then(res => {
if (res.code != 20000) {
this.$message.error(res.message)
} else {
this.$message.success("删除成功")
this.getCargowBindCollectList()
}
})
}).catch(() => {
})
},
handleNodeClick(row) { handleNodeClick(row) {
this.groupData = row this.groupData = row
this.query.code = row.code this.query.code = row.code
@ -779,7 +822,7 @@ export default {
} }
this.getList() this.getList()
}, },
closeDialog(){ closeDialog() {
this.getCargowBindCollectList() this.getCargowBindCollectList()
this.chooseCollectDialogVisible = false this.chooseCollectDialogVisible = false
}, },
@ -789,7 +832,7 @@ export default {
const binaryData = [] const binaryData = []
binaryData.push(response) binaryData.push(response)
let url = window.URL.createObjectURL( let url = window.URL.createObjectURL(
new Blob(binaryData, {type: 'application/pdf'}) new Blob(binaryData, { type: 'application/pdf' })
) )
this.loading = false this.loading = false
window.open(url) window.open(url)
@ -825,7 +868,7 @@ export default {
workPlaceClass: 2, workPlaceClass: 2,
deptCode: null, deptCode: null,
chargeUser: null, chargeUser: null,
constituencies: "1001", constituencies: '1001',
invRemindNumber: 0, invRemindNumber: 0,
remake: null remake: null
} }
@ -837,7 +880,7 @@ export default {
createWorkplaceId().then(res => { createWorkplaceId().then(res => {
if (res.code == 20000) { if (res.code == 20000) {
if (res.data == null) { if (res.data == null) {
this.formData.workplaceId = this.workplaceCode + 1001 this.formData.workplaceId = this.workplaceCode + 1002
this.addWorkplaceDialogVisible = true this.addWorkplaceDialogVisible = true
this.getTree() this.getTree()
} else { } else {
@ -852,7 +895,7 @@ export default {
this.$message.error('获取错误') this.$message.error('获取错误')
}) })
}, },
hideForm(){ hideForm() {
this.addWorkplaceDialogVisible = false this.addWorkplaceDialogVisible = false
this.getList() this.getList()
this.collectList = [] this.collectList = []
@ -889,7 +932,7 @@ export default {
return this.$message.error(res.message) return this.$message.error(res.message)
} }
this.addWorkplaceDialogVisible = false this.addWorkplaceDialogVisible = false
this.$message.success("更新成功") this.$message.success('更新成功')
this.getList() this.getList()
}).catch(() => { }).catch(() => {
this.addWorkplaceDialogVisible = false this.addWorkplaceDialogVisible = false
@ -969,7 +1012,7 @@ export default {
this.deptList = res.data.list || [] this.deptList = res.data.list || []
} }
}) })
}, }
}, },
created() { created() {
this.getDepts() this.getDepts()

@ -421,14 +421,14 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" class="el-col"> <!--<el-col :span="12" class="el-col">-->
<el-form-item label="工位类型:" prop="workPlaceClass" class="query-form-item"> <!-- <el-form-item label="工位类型:" prop="workPlaceClass" class="query-form-item">-->
<el-select v-model="formData.workPlaceClass" style="width: 80%" placeholder="工位类型"> <!-- <el-select v-model="formData.workPlaceClass" style="width: 80%" placeholder="工位类型">-->
<el-option label="采集工位" :value="1"></el-option> <!-- <el-option label="采集工位" :value="1"></el-option>-->
<el-option label="上货工位" :value="2"></el-option> <!-- <el-option label="上货工位" :value="2"></el-option>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-col> <!--</el-col>-->
<!--<el-col :span="12" class="el-col">--> <!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="工位类型:" prop="workplaceType" class="query-form-item">--> <!-- <el-form-item label="工位类型:" prop="workplaceType" class="query-form-item">-->
<!-- <el-select v-model="formData.workplaceType" style="width: 80%" placeholder="工位类型">--> <!-- <el-select v-model="formData.workplaceType" style="width: 80%" placeholder="工位类型">-->

Loading…
Cancel
Save