10/30 处理单据扫码剔除和工位分格
parent
7828bbf1aa
commit
b5b91d7018
@ -0,0 +1,49 @@
|
|||||||
|
import axios from "@/utils/request";
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function createQueueCode(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/sysWorkplace/createQueueCode",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export function addQueue(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/sysWorkplaceQueue/addQueue",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateQueue(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/sysWorkplaceQueue/update",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getQueueList(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/sysWorkplaceQueue/page",
|
||||||
|
method: "get",
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export function deleteQueue(query) {
|
||||||
|
return axios({
|
||||||
|
url: "/udiwms/sysWorkplaceQueue/delete",
|
||||||
|
method: "post",
|
||||||
|
data: query
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,144 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<el-form :model="formData" style="width: 100%;" ref="dataForm" :rules="formRules"
|
||||||
|
label-width="auto"
|
||||||
|
>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="el-col">
|
||||||
|
<el-form-item label="分格编码:" prop="code" class="query-form-item">
|
||||||
|
<el-input
|
||||||
|
disabled
|
||||||
|
v-model="formData.code" style="width: 80%"
|
||||||
|
auto-complete="off"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" class="el-col">
|
||||||
|
<el-form-item label="分格名称:" class="query-form-item" prop="name" placeholder="请输入分格名称">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.name" style="width: 80%"
|
||||||
|
auto-complete="off"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>、
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12" class="el-col">
|
||||||
|
<el-form-item label="备注:" prop="remake" class="query-form-item">
|
||||||
|
<el-input
|
||||||
|
v-model="formData.remark" style="width: 80%"
|
||||||
|
auto-complete="off"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click.native="hideForm">取消</el-button>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click.native="formSubmit()"
|
||||||
|
>提交
|
||||||
|
</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { addQueue, createQueueCode, updateQueue } from '@/api/basic/workPlace/SysWorkplaceQueue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
closeDialog: {
|
||||||
|
type: Function,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
workplaceId: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
queueData: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formData: {
|
||||||
|
code: "",
|
||||||
|
name: "",
|
||||||
|
remark: "",
|
||||||
|
workPlaceIdFk: "",
|
||||||
|
},
|
||||||
|
formRules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入分格名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
getPlaidCode(){
|
||||||
|
createQueueCode().then(res => {
|
||||||
|
if (res.code == 20000){
|
||||||
|
this.formData.code = res.data
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formSubmit(){
|
||||||
|
this.formData.workPlaceIdFk = this.workplaceId
|
||||||
|
this.$refs['dataForm'].validate((rules) => {
|
||||||
|
if (rules) {
|
||||||
|
if (this.queueData != null){
|
||||||
|
updateQueue(this.formData).then(res => {
|
||||||
|
if (res.code == 20000){
|
||||||
|
this.$message.success("更新成功")
|
||||||
|
this.closeDialog()
|
||||||
|
}else {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
addQueue(this.formData).then(res => {
|
||||||
|
if (res.code == 20000){
|
||||||
|
this.$message.success("新增成功")
|
||||||
|
this.closeDialog()
|
||||||
|
}else {
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
hideForm(){
|
||||||
|
this.closeDialog()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.queueData != null){
|
||||||
|
this.formData = this.queueData
|
||||||
|
}else {
|
||||||
|
//更新就不获取编号了
|
||||||
|
this.getPlaidCode()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue