优化 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'
this.addCollectionPointsDialogVisible = true genCode().then(res => {
if (res.code == 20000){
this.code = res.data
this.formData.code = res.data
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,97 +67,96 @@
</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">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-form-item label="当前仓库:" class="query-form-item"> <el-form-item label="当前仓库:" class="query-form-item">
<invSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/> <invSelect :value.sync="query.invCode" :params.sync="filterBadInv" :changeValue.sync="invChange"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="编码/名称:" class="query-form-item"> <el-form-item label="编码/名称:" class="query-form-item">
<el-input v-model="query.key" placeholder="请输入编码/工位名称" clearable> <el-input v-model="query.key" placeholder="请输入编码/工位名称" clearable>
</el-input> </el-input>
<!--<el-form-item label="所属仓库:">--> <!--<el-form-item label="所属仓库:">-->
<!-- :isDisable.sync="defaultInv"--> <!-- :isDisable.sync="defaultInv"-->
<!--</el-form-item>--> <!--</el-form-item>-->
<!--<el-select--> <!--<el-select-->
<!-- v-model="query.key"--> <!-- v-model="query.key"-->
<!-- placeholder="请选择仓库">--> <!-- placeholder="请选择仓库">-->
<!-- <el-option v-for="item in unitStorageList"--> <!-- <el-option v-for="item in unitStorageList"-->
<!-- :key="item.name"--> <!-- :key="item.name"-->
<!-- :label="item.name"--> <!-- :label="item.name"-->
<!-- :value="item.code"></el-option>--> <!-- :value="item.code"></el-option>-->
<!--</el-select>--> <!--</el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn"> <div class="top-right-btn">
<el-button-group> <el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button> <el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addWorkplace"></el-button> <el-button type="primary" icon="el-icon-plus" @click="addWorkplace"></el-button>
</el-button-group> </el-button-group>
</div> </div>
<el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }" <el-table v-loading="loading" :data="list" style="width: 100%" :row-style="{height: '32px' }"
highlight-current-row @current-change="handCurrentChange" highlight-current-row @current-change="handCurrentChange"
> >
<el-table-column type="index" label="序号"></el-table-column> <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="workplaceId" width="90"></el-table-column>
<el-table-column label="工位名称" prop="workplaceName" width="90"></el-table-column> <el-table-column label="工位名称" prop="workplaceName" width="90"></el-table-column>
<el-table-column label="所属组别" prop="categoryName" width="90"></el-table-column> <el-table-column label="所属组别" prop="categoryName" width="90"></el-table-column>
<el-table-column label="单据类型编号" prop="busTypeCode" width="100"></el-table-column> <el-table-column label="单据类型编号" prop="busTypeCode" width="100"></el-table-column>
<el-table-column label="单据类型名称" prop="busTypeName" width="100"></el-table-column> <el-table-column label="单据类型名称" prop="busTypeName" width="100"></el-table-column>
<el-table-column label="所属仓库" prop="invName" width="90"></el-table-column> <el-table-column label="所属仓库" prop="invName" width="90"></el-table-column>
<el-table-column label="作业方式" prop="operationType" width="120"> <el-table-column label="作业方式" prop="operationType" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ operationTypes[scope.row.operationType] }}</span> <span>{{ operationTypes[scope.row.operationType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结果处理" prop="checkInsert" width="120"> <el-table-column label="结果处理" prop="checkInsert" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ checkInserts[scope.row.checkInsert] }}</span> <span>{{ checkInserts[scope.row.checkInsert] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="提醒方式" prop="warnType" width="90"> <el-table-column label="提醒方式" prop="warnType" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ warnTypeMap[scope.row.warnType] }}</span> <span>{{ warnTypeMap[scope.row.warnType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="负责人" prop="employeeName" width="90"></el-table-column> <el-table-column label="负责人" prop="employeeName" width="90"></el-table-column>
<el-table-column label="往来单位标题" prop="unitTittle" width="120"></el-table-column> <el-table-column label="往来单位标题" prop="unitTittle" width="120"></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="140"></el-table-column> <el-table-column label="创建时间" prop="createTime" width="140"></el-table-column>
<el-table-column label="备注" prop="remake" width="140"></el-table-column> <el-table-column label="备注" prop="remake" width="140"></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
type="text" type="text"
size="small" size="small"
@click.native.stop="printLabel(scope.row)" @click.native.stop="printLabel(scope.row)"
>打印 >打印
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="edit(scope.row)" @click.native.stop="edit(scope.row)"
>编辑 >编辑
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="deleteWorkplace(scope.row)" @click.native.stop="deleteWorkplace(scope.row)"
>删除 >删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
:total="total" :total="total"
:limit.sync="query.limit" :limit.sync="query.limit"
@ -165,9 +164,9 @@
@pagination="getList" @pagination="getList"
> >
</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"
@ -270,7 +269,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" class="el-row"> <el-row :gutter="24" class="el-row">
<el-col :span="12" class="el-col"> <el-col :span="12" class="el-col">
<el-form-item label="作业方式:" prop="operationType" class="query-form-item"> <el-form-item label="作业方式:" prop="operationType" class="query-form-item">
<el-select v-model="formData.operationType" style="width: 80%" placeholder="选择扫码方式" clearable> <el-select v-model="formData.operationType" style="width: 80%" placeholder="选择扫码方式" clearable>
@ -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>
@ -385,14 +384,14 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" class="el-row"> <el-row :gutter="24" class="el-row">
<el-col :span="22" class="el-col"> <el-col :span="22" class="el-col">
<el-form-item label="备注:" prop="unitTittle" class="query-form-item"> <el-form-item label="备注:" prop="unitTittle" class="query-form-item">
<el-input <el-input
v-model="formData.remake" style="width: 100%" v-model="formData.remake" style="width: 100%"
auto-complete="off" auto-complete="off"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
@ -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