优化 1.0

20240912_adapter_z
wangwei 11 months ago
parent 77ade51f3c
commit 68b805ef2c

@ -79,6 +79,7 @@
<el-form-item label="单据类型编号:" prop="code" class="query-form-item"> <el-form-item label="单据类型编号:" prop="code" class="query-form-item">
<el-input <el-input
placeholder="请输入单据类型编号" placeholder="请输入单据类型编号"
disabled
v-model="formData.code" style="width: 80%" v-model="formData.code" style="width: 80%"
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
@ -185,6 +186,7 @@ export default {
}, },
addCollectionPointsDialogVisible: false, addCollectionPointsDialogVisible: false,
formData: {}, formData: {},
code: '',
total: 0, total: 0,
busTypes: [], busTypes: [],
formRules: { formRules: {
@ -241,9 +243,14 @@ export default {
this.getList() this.getList()
}, },
addCollectionPoints() { addCollectionPoints() {
this.formData = {}
this.fromName = 'add' this.fromName = 'add'
genCode().then(res => {
if (res.code == 20000){
this.code = res.data
this.formData.code = res.data
this.addCollectionPointsDialogVisible = true this.addCollectionPointsDialogVisible = true
}
})
}, },
getList() { getList() {
this.loading = true this.loading = true
@ -333,6 +340,7 @@ export default {
created() { created() {
this.getList() this.getList()
this.getBusType() this.getBusType()
} }
} }

@ -67,7 +67,6 @@
</el-button> </el-button>
<el-col style="border-left: 3px solid #dddddd; overflow-y: hidden"> <el-col style="border-left: 3px solid #dddddd; overflow-y: hidden">
<el-card> <el-card>
<el-form :model="query" label-width="auto" v-show="showSearch" size="mini" class="order-el-form"> <el-form :model="query" label-width="auto" v-show="showSearch" size="mini" class="order-el-form">
@ -167,7 +166,7 @@
</pagination> </pagination>
</el-card> </el-card>
<el-card> <el-card>
<div>{{workplaceName}}-用户列表</div> <div>{{ workplaceName }}-用户列表</div>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini" <el-form :inline="true" :model="userQuery" class="query-form" size="mini"
style="margin-top: 30px;margin-bottom: 10px" style="margin-top: 30px;margin-bottom: 10px"
@ -284,7 +283,7 @@
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<el-form-item label="结果处理:" prop="checkInsert" class="query-form-item"> <el-form-item label="结果处理:" prop="checkInsert" class="query-form-item">
<el-select v-model="formData.checkInsert" style="width: 80%" placeholder="选择扫码方式" clearable> <el-select v-model="formData.checkInsert" style="width: 80%" placeholder="选择扫码方式" clearable disabled>
<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>
@ -515,7 +514,9 @@ export default {
'add': '新增工位', 'add': '新增工位',
'edit': '编辑工位' 'edit': '编辑工位'
}, },
formData: {}, formData: {
operationType: 1
},
workplaceCode: '6001', workplaceCode: '6001',
unitStorageList: [], unitStorageList: [],
invList: [], invList: [],
@ -536,6 +537,9 @@ export default {
], ],
invCode: [ invCode: [
{ required: true, message: '请选择仓库', trigger: 'blur' } { required: true, message: '请选择仓库', trigger: 'blur' }
],
constituencies: [
{ required: true, message: '请选择所属组别', trigger: 'blur' }
] ]
}, },
invQuery: { invQuery: {
@ -580,16 +584,14 @@ export default {
workplaceName: '用户' workplaceName: '用户'
} }
}, },
computed: { computed: {},
},
methods: { methods: {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch this.showSearch = !this.showSearch
}, },
onSubmit() { onSubmit() {
this.userList = [] this.userList = []
this.rowData.workplaceName = "工位" this.rowData.workplaceName = '工位'
this.query.page = 1 this.query.page = 1
this.getList() this.getList()
}, },
@ -618,9 +620,14 @@ export default {
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 + 1001
this.formData.operationType = 1
this.formData.checkInsert = 2
this.addWorkplaceDialogVisible = true this.addWorkplaceDialogVisible = true
} else { } else {
this.formData = {} this.formData = {
operationType: 1,
checkInsert: 2
}
this.formData.workplaceId = res.data this.formData.workplaceId = res.data
this.addWorkplaceDialogVisible = true this.addWorkplaceDialogVisible = true
} }
@ -660,12 +667,12 @@ export default {
this.$message.error('请完善必填信息') this.$message.error('请完善必填信息')
} else { } else {
addWorkplace(this.formData).then(res => { addWorkplace(this.formData).then(res => {
console.log("res",res) console.log('res', res)
if (res.code != 20000) { if (res.code != 20000) {
return this.$message.error('新增错误') return this.$message.error('新增错误')
} }
this.addWorkplaceDialogVisible = false this.addWorkplaceDialogVisible = false
this.$message.success("新增成功") this.$message.success('新增成功')
// this.query.code = this.groupData.code // this.query.code = this.groupData.code
// if (this.query.code == 1001) { // if (this.query.code == 1001) {
// this.query.code = null // this.query.code = null
@ -883,19 +890,19 @@ export default {
}) })
}, },
forInvSubmit() { forInvSubmit() {
if (this.formName === 'edit'){ if (this.formName === 'edit') {
updateTree(this.subData).then(res => { updateTree(this.subData).then(res => {
if (res.code == 20000){ if (res.code == 20000) {
this.subFormVisible = false this.subFormVisible = false
this.getLstTree() this.getLstTree()
this.$message.success('成功') this.$message.success('成功')
}else { } else {
this.$message.error(res.message) this.$message.error(res.message)
} }
}).catch(() => { }).catch(() => {
}) })
}else { } else {
addTree(this.subData).then(res => { addTree(this.subData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.subFormVisible = false this.subFormVisible = false

Loading…
Cancel
Save