fix:coding#412,弹窗标题和检验人员列表筛选
This commit is contained in:
parent
ca0282595b
commit
a777e06d4b
|
@ -366,7 +366,9 @@ export default {
|
||||||
//获取员工
|
//获取员工
|
||||||
getUserList() {
|
getUserList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
this.$API.system.user.list
|
||||||
|
.req({ page: 0, belong_dept__name: "检验管理部" })
|
||||||
|
.then((res) => {
|
||||||
that.userList = res;
|
that.userList = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="首件检验任务"
|
title="成品检验任务"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:size="1000"
|
:size="1000"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
|
@ -20,21 +20,26 @@
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.batch"
|
v-model="form.batch"
|
||||||
placeholder="物料批次"
|
placeholder="物料批次"
|
||||||
clearable style="width:100%"
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.batch"
|
:label="item.batch"
|
||||||
:value="item.id">
|
:value="item.id"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="总数">
|
<el-form-item label="总数">
|
||||||
<el-input v-model="form.count" disabled></el-input>
|
<el-input
|
||||||
|
v-model="form.count"
|
||||||
|
disabled
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
|
@ -43,7 +48,7 @@
|
||||||
v-model="form.test_date"
|
v-model="form.test_date"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
style="width:100%"
|
style="width: 100%"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -51,7 +56,9 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-footer>
|
<el-footer>
|
||||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||||
|
>保存</el-button
|
||||||
|
>
|
||||||
<el-button @click="visible = false">取消</el-button>
|
<el-button @click="visible = false">取消</el-button>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
@ -63,11 +70,22 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
form: {
|
form: {},
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
test_date: [{required: true, message: "请选择检验日期", trigger: "blur"}],
|
test_date: [
|
||||||
batch: [{required: true, message: "请选择物料批次", trigger: "blur"}]
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择检验日期",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
batch: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请选择物料批次",
|
||||||
|
trigger: "blur",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
visible: false,
|
visible: false,
|
||||||
isSaveing: false,
|
isSaveing: false,
|
||||||
|
@ -87,17 +105,19 @@ export default {
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
//获取物料批次
|
//获取物料批次
|
||||||
getMaterialBatch(){
|
getMaterialBatch() {
|
||||||
let that = this;
|
let that = this;
|
||||||
this.$API.inm.warehouse.batch.req({page:0,material__type:10,count__gte:0}).then(res=>{
|
this.$API.inm.warehouse.batch
|
||||||
|
.req({ page: 0, material__type: 10, count__gte: 0 })
|
||||||
|
.then((res) => {
|
||||||
that.options = res;
|
that.options = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleChange(val){
|
handleChange(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(val)
|
console.log(val);
|
||||||
that.options.forEach(item => {
|
that.options.forEach((item) => {
|
||||||
if(item.id==val){
|
if (item.id == val) {
|
||||||
that.form.count = item.count;
|
that.form.count = item.count;
|
||||||
that.form.batch = item.batch;
|
that.form.batch = item.batch;
|
||||||
that.form.material = item.material;
|
that.form.material = item.material;
|
||||||
|
@ -111,21 +131,24 @@ export default {
|
||||||
this.isSaveing = true;
|
this.isSaveing = true;
|
||||||
try {
|
try {
|
||||||
if (this.mode == "add") {
|
if (this.mode == "add") {
|
||||||
this.$API.qm.ftestwork.create.req(this.form).then(res => {
|
this.$API.qm.ftestwork.create
|
||||||
|
.req(this.form)
|
||||||
|
.then((res) => {
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("success");
|
this.$emit("success");
|
||||||
this.$message.success("操作成功");
|
this.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
} else if (this.mode == "edit") {
|
} else if (this.mode == "edit") {
|
||||||
this.$API.qm.ftestwork.update.req(this.form.id,this.form).then(res => {
|
this.$API.qm.ftestwork.update
|
||||||
|
.req(this.form.id, this.form)
|
||||||
|
.then((res) => {
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$emit("success");
|
this.$emit("success");
|
||||||
this.$message.success("操作成功");
|
this.$message.success("操作成功");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//可以处理校验错误
|
//可以处理校验错误
|
||||||
this.isSaveing = false;
|
this.isSaveing = false;
|
||||||
|
@ -137,7 +160,7 @@ export default {
|
||||||
//表单注入数据
|
//表单注入数据
|
||||||
setData(data) {
|
setData(data) {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
this.form.test_group = this.form.split(',')
|
this.form.test_group = this.form.split(",");
|
||||||
},
|
},
|
||||||
//设置过滤项
|
//设置过滤项
|
||||||
setFilters(filters) {
|
setFilters(filters) {
|
||||||
|
@ -148,5 +171,4 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue