Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
91c1b9a0a4
|
@ -416,6 +416,14 @@ export default {
|
|||
);
|
||||
},
|
||||
},
|
||||
mgroups:{
|
||||
name: "获取可交接的工段",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/wpm/handover/mgroups/`,data
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
//车间库存
|
||||
wmaterial: {
|
||||
|
|
|
@ -2914,17 +2914,7 @@ const routes = [
|
|||
perms: ["train"],
|
||||
},
|
||||
component: "edu/train",
|
||||
},
|
||||
{
|
||||
name: "examrecord",
|
||||
path: "/edu/examrecord",
|
||||
meta: {
|
||||
title: "考试记录",
|
||||
// icon: "el-icon-notebook",
|
||||
perms: ["examrecord"],
|
||||
},
|
||||
component: "edu/examrecord",
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -206,4 +206,10 @@ export const wmState = new EnumFactory({
|
|||
30: { text: '返修', type: 'warning' },
|
||||
40: { text: '检验', type: 'primary' },
|
||||
50: { text: '报废', type: 'danger' },
|
||||
}, parseInt)
|
||||
|
||||
export const certStateEnum = new EnumFactory({
|
||||
10: { text: '正常', type: 'success' },
|
||||
20: { text: '临期', type: 'warning' },
|
||||
30: { text: '过期', type: 'danger' }
|
||||
}, parseInt)
|
|
@ -40,9 +40,7 @@
|
|||
width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-icon v-if="scope.row.can_attend" color="green"
|
||||
><CircleCheckFilled
|
||||
/></el-icon>
|
||||
<el-tag v-if="scope.row.can_attend" type="success">是</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -67,16 +65,14 @@
|
|||
width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-icon v-if="scope.row.is_public" color="green"
|
||||
><CircleCheckFilled
|
||||
/></el-icon>
|
||||
<el-tag v-if="scope.row.is_public" type="success">是</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
width="150"
|
||||
width="160"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
|
@ -92,7 +88,7 @@
|
|||
size="small"
|
||||
@click="row_detail(scope.row)"
|
||||
type="primary"
|
||||
>详情</el-button
|
||||
>答题详情</el-button
|
||||
>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
|
@ -158,8 +154,24 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="所用试卷" prop="paper" required>
|
||||
<el-select
|
||||
<el-form-item label="所用试卷" prop="paper" required v-if="examDialog">
|
||||
<xtSelect
|
||||
v-model="examForm.paper"
|
||||
v-model:label="examForm.paper_name"
|
||||
:apiObj = "apiPaper"
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column
|
||||
label="限时(分钟)"
|
||||
prop="limit"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="满分"
|
||||
prop="total_score"
|
||||
></el-table-column>
|
||||
</xtSelect>
|
||||
<!-- <el-select
|
||||
v-model="examForm.paper"
|
||||
filterable
|
||||
reserve-keyword
|
||||
|
@ -171,7 +183,7 @@
|
|||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -188,39 +200,38 @@
|
|||
<template #footer>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="examSaving"
|
||||
@click="examSubmit()"
|
||||
>保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-drawer v-model="drawerVisible" title="考试记录" size="50%">
|
||||
<ExamRecord :exam="examId" v-if="drawerVisible"></ExamRecord>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
const defaultExam = {chance: 1, is_public:false}
|
||||
import ExamRecord from './examrecord.vue';
|
||||
export default {
|
||||
components: { ExamRecord },
|
||||
data() {
|
||||
return {
|
||||
paperOptions:[],
|
||||
examDialog: false,
|
||||
apiObj: this.$API.edu.exam.list,
|
||||
apiPaper: this.$API.edu.paper.list,
|
||||
query: {
|
||||
search: "",
|
||||
},
|
||||
examForm: Object.assign({}, defaultExam),
|
||||
drawerVisible: false,
|
||||
examId: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getPaperOptions();
|
||||
},
|
||||
methods: {
|
||||
getPaperOptions() {
|
||||
this.$API.edu.paper.list.req({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
this.paperOptions = res;
|
||||
});
|
||||
},
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
|
@ -233,10 +244,12 @@ export default {
|
|||
this.examDialog = true;
|
||||
},
|
||||
row_detail(row) {
|
||||
this.$router.push({
|
||||
path: "/edu/examrecord/",
|
||||
query: { id: row.id },
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: "/edu/examrecord/",
|
||||
// query: { id: row.id },
|
||||
// });
|
||||
this.examId = row.id;
|
||||
this.drawerVisible = true;
|
||||
},
|
||||
table_del(row) {
|
||||
this.$API.edu.exam.delete.req(row.id).then(() => {
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
style="margin-right: 5px"
|
||||
style="margin-right: 2px"
|
||||
v-model="query.search"
|
||||
placeholder="考试名称或用户"
|
||||
placeholder="用户名"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-button
|
||||
|
@ -20,12 +20,14 @@
|
|||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
:query="query"
|
||||
hidePagination
|
||||
>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="考试名称"
|
||||
prop="exam_name"
|
||||
></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column
|
||||
label="用户"
|
||||
prop="create_by_name"
|
||||
|
@ -46,6 +48,7 @@
|
|||
<el-table-column
|
||||
label="答题时间"
|
||||
prop="start_time"
|
||||
width="160"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="是否通过"
|
||||
|
@ -83,27 +86,22 @@
|
|||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
exam: { type: String }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
paperOptions:[],
|
||||
examDialog: false,
|
||||
apiObj: this.$API.edu.examrecord.list,
|
||||
params: { exam: this.exam },
|
||||
query: {
|
||||
search: "",
|
||||
search: ""
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getPaperOptions();
|
||||
},
|
||||
methods: {
|
||||
getPaperOptions() {
|
||||
this.$API.edu.paper.list.req({
|
||||
page: 0
|
||||
}).then(res => {
|
||||
this.paperOptions = res;
|
||||
});
|
||||
},
|
||||
formatBoolean(row) {
|
||||
return row.isTrue ? '是' : '否';
|
||||
},
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
<el-table-column
|
||||
label="时长(h)"
|
||||
prop="duration"
|
||||
width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="开始时间"
|
||||
|
@ -57,18 +58,12 @@
|
|||
label="地点"
|
||||
prop="place"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="内容描述"
|
||||
prop="description"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="是否公开"
|
||||
width="80"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-icon v-if="scope.row.is_public" color="green"
|
||||
><CircleCheckFilled
|
||||
/></el-icon>
|
||||
<el-tag v-if="scope.row.is_public" type="success">是</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -117,57 +112,16 @@
|
|||
label-width="100px"
|
||||
ref="questioncatForm"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="18">
|
||||
<el-form-item label="培训名称" prop="name" required>
|
||||
<el-input
|
||||
v-model="trainForm.name"
|
||||
style="width: 80%;"
|
||||
style="width: 100%;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="开始时间" prop="start_time" required>
|
||||
<el-date-picker
|
||||
v-model="trainForm.start_time"
|
||||
type="datetime"
|
||||
style="width:100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
v-model="trainForm.end_time"
|
||||
type="datetime"
|
||||
style="width:100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="地点" prop="place" required>
|
||||
<el-input
|
||||
v-model="trainForm.place"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="时长(h)" prop="duration" required>
|
||||
<el-input-number
|
||||
v-model="trainForm.duration"
|
||||
controls-position="right"
|
||||
:step="0.5"
|
||||
step-strictly="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容描述" prop="description" required>
|
||||
<el-input
|
||||
v-model="trainForm.description"
|
||||
clearable
|
||||
autisize
|
||||
type="textarea"
|
||||
style="width: 240%;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="级别" prop="level" required>
|
||||
<el-select
|
||||
v-model="trainForm.level"
|
||||
|
@ -186,7 +140,43 @@
|
|||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="start_time" required>
|
||||
<el-date-picker
|
||||
v-model="trainForm.start_time"
|
||||
type="datetime"
|
||||
style="width:100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
v-model="trainForm.end_time"
|
||||
type="datetime"
|
||||
style="width:100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地点" prop="place" required>
|
||||
<el-input
|
||||
v-model="trainForm.place"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="时长(h)" prop="duration" required>
|
||||
<el-input-number
|
||||
v-model="trainForm.duration"
|
||||
controls-position="right"
|
||||
:step="0.5"
|
||||
step-strictly="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item
|
||||
label="是否公开"
|
||||
prop="is_public"
|
||||
|
@ -195,6 +185,16 @@
|
|||
<el-switch v-model="trainForm.is_public"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="内容描述" prop="description" required>
|
||||
<el-input
|
||||
v-model="trainForm.description"
|
||||
clearable
|
||||
autisize
|
||||
type="textarea"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="附件" prop="files">
|
||||
<sc-upload-file
|
||||
:multiple="false"
|
||||
|
|
|
@ -36,6 +36,16 @@
|
|||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.state"
|
||||
placeholder="证书状态"
|
||||
@change="handleQuery"
|
||||
clearable
|
||||
style="margin-left: 2px"
|
||||
>
|
||||
<el-option v-for="e in certStateEnum.values" :key="e.key" :value="e.key"
|
||||
:label="e.text"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
|
@ -79,6 +89,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="证书编号" prop="number"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="80">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="certStateEnum[scope.row.state]?.type"
|
||||
>{{
|
||||
certStateEnum[scope.row.state]?.text
|
||||
}}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发证日期" prop="issue_date"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date"> </el-table-column>
|
||||
<el-table-column label="下一次复审日期" prop="review_date"></el-table-column>
|
||||
|
@ -185,7 +205,8 @@
|
|||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import { certStateEnum } from "@/utils/enum.js";
|
||||
const defaultform=
|
||||
{ id: "",
|
||||
name: "",
|
||||
|
@ -197,6 +218,7 @@ export default {
|
|||
components: {},
|
||||
data() {
|
||||
return {
|
||||
certStateEnum,
|
||||
apiObj: this.$API.hrm.certificate.list,
|
||||
form:defaultform,
|
||||
typeoptions: [
|
||||
|
|
|
@ -43,11 +43,20 @@
|
|||
<el-table-column label="证书名称" fixed="left" prop="name"></el-table-column>
|
||||
<el-table-column label="证书编号" prop="number"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column>
|
||||
<el-table-column label="状态" prop="state">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
:type="certStateEnum[scope.row.state]?.type"
|
||||
>{{
|
||||
certStateEnum[scope.row.state]?.text
|
||||
}}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发证日期" prop="issue_date"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date"> </el-table-column>
|
||||
<el-table-column label="下一次复审日期" prop="review_date"></el-table-column>
|
||||
<el-table-column label="证书文件" prop="file"></el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -144,7 +153,8 @@
|
|||
</template>
|
||||
</sc-dialog>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import { certStateEnum } from "@/utils/enum.js";
|
||||
const defaultform=
|
||||
{ id: "",
|
||||
name: "",
|
||||
|
@ -156,6 +166,7 @@ export default {
|
|||
components: {},
|
||||
data() {
|
||||
return {
|
||||
certStateEnum,
|
||||
form:defaultform,
|
||||
typeoptions: [
|
||||
{ id: 10, name: "特种作业证书" },
|
||||
|
|
|
@ -135,6 +135,8 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="合格数量" prop="count_ok">
|
||||
</el-table-column> -->
|
||||
<el-table-column label="不合格数量" prop="count_notok">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<el-form-item label="数量" v-if="cate == 'mainso'">
|
||||
<el-input-number
|
||||
v-model="form.count"
|
||||
:min="0"
|
||||
:min="1"
|
||||
:precision="3"
|
||||
style="width: 100%"
|
||||
/>
|
||||
|
@ -180,6 +180,7 @@
|
|||
<script>
|
||||
const defaultForm = {
|
||||
state: 10,
|
||||
count: 1,
|
||||
type: "do_in",
|
||||
};
|
||||
export default {
|
||||
|
@ -204,7 +205,7 @@ export default {
|
|||
other_in: "其他入库",
|
||||
other_out: "其他出库",
|
||||
},
|
||||
form: {},
|
||||
form: {count: 1,},
|
||||
rules: {
|
||||
batch:[
|
||||
{
|
||||
|
|
|
@ -231,7 +231,7 @@ const defaultForm = {
|
|||
material_out:'',
|
||||
hour_work:0,
|
||||
div_number:1,
|
||||
batch_bind: true,
|
||||
batch_bind: false,
|
||||
is_autotask: true,
|
||||
};
|
||||
export default {
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
link
|
||||
type="primary"
|
||||
size="small"
|
||||
v-if="scope.row.ticket == null"
|
||||
v-if="scope.row.state == 10"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>继续编辑
|
||||
</el-button>
|
||||
|
|
|
@ -22,7 +22,11 @@ export default {
|
|||
type:{
|
||||
type:String,
|
||||
default:''
|
||||
}
|
||||
},
|
||||
closeNow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
@ -40,13 +44,15 @@ export default {
|
|||
return this;
|
||||
},
|
||||
codeTextChange(){
|
||||
console.log('this.codeText',this.codeText);
|
||||
// console.log('this.codeText',this.codeText);
|
||||
this.$emit('closed',this.codeText);
|
||||
this.closed();
|
||||
this.codeText = '';
|
||||
this.visible = !this.closeNow;
|
||||
// this.closed();
|
||||
},
|
||||
closed(){
|
||||
this.codeText = '';
|
||||
// this.visible = false;
|
||||
this.visible = !this.closeNow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,16 +19,15 @@
|
|||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="printSetting"
|
||||
>打印机</el-button
|
||||
icon="el-icon-plus"
|
||||
@click="table_add(50)"
|
||||
v-auth="'handover.create'"
|
||||
>改版</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add(30)"
|
||||
v-auth="'handover.create'"
|
||||
v-if="mgroup_name=='一次超洗'||mgroup_name=='二次超洗'"
|
||||
>检验</el-button
|
||||
@click="printSetting"
|
||||
>打印机</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="type==30">
|
||||
<!-- <el-col :md="12" :sm="24" v-if="type==30">
|
||||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
|
@ -112,15 +112,25 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="更改批次">
|
||||
<el-switch v-model="change_batch"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
<el-col :md="12" :sm="24" v-if="type==50">
|
||||
<el-form-item label="更改物料">
|
||||
<xtSelect
|
||||
:apiObj="apiObj"
|
||||
:params="paramsM"
|
||||
v-model="form.material_changed"
|
||||
v-model:label="material_changed_name"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="工序" prop="process_name"></el-table-column>
|
||||
<el-table-column label="规格" prop="specification"></el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
|
@ -128,6 +138,11 @@
|
|||
<el-input v-model="form.note" placeholder="处理备注"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-if="change_batch">
|
||||
<el-form-item label="新批次号">
|
||||
<el-input v-model="form.new_batch" placeholder="新批次号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="交接物料">
|
||||
|
@ -223,6 +238,63 @@
|
|||
<el-row>
|
||||
<div class="total-count">总计:{{ totalCount }}</div>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24" v-if="type==30">
|
||||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
placeholder="接收部门"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="getUserList3"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-else>
|
||||
<el-form-item label="接收工段" prop="recive_mgroup">
|
||||
<el-select
|
||||
v-model="form.recive_mgroup"
|
||||
placeholder="接收工段"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
:disabled="type==40"
|
||||
@change="getUserList2"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="接收人" prop="recive_user">
|
||||
<el-select
|
||||
v-model="form.recive_user"
|
||||
placeholder="接收人"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userList2"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-footer v-if="mode!=='show'">
|
||||
<el-button type="primary" v-loading="isSaveing" @click="submit">确定</el-button>
|
||||
|
@ -322,6 +394,12 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
apiObj:this.$API.mtm.material.list,
|
||||
paramsM:{
|
||||
type:20,
|
||||
is_hidde:true,
|
||||
},
|
||||
materials:[],
|
||||
totalCount: 0,
|
||||
deptID:'',
|
||||
bwIndex:0,
|
||||
|
@ -416,9 +494,12 @@ export default {
|
|||
let that = this;
|
||||
var req = {
|
||||
page: 0,
|
||||
state:10,
|
||||
// state:10,
|
||||
mgroupx:that.mgroupId
|
||||
};
|
||||
if(that.type!==50){
|
||||
req.state = 10;
|
||||
}
|
||||
that.materialOptions = [];
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
that.materialOptions = res;
|
||||
|
@ -512,6 +593,15 @@ export default {
|
|||
let data = that.materialOptions.filter((item) => {
|
||||
return that.selectItems.indexOf(item.id)>-1;
|
||||
});
|
||||
let materialId = data[0].material;
|
||||
let params = {
|
||||
material: materialId,
|
||||
type: that.type,
|
||||
};
|
||||
console.log('params',params);
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
data.forEach((item,index)=>{
|
||||
item.wm = item.id;
|
||||
item.count = item.count_cando;
|
||||
|
@ -655,6 +745,10 @@ export default {
|
|||
// console.log('2',that.form);
|
||||
}
|
||||
}else{//handoverb里没有有这个物料批次
|
||||
let params = {material: res.material,type: that.type,};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.id == res.wm){
|
||||
let obj2 = {};
|
||||
|
@ -682,6 +776,10 @@ export default {
|
|||
if(arr.length>0){
|
||||
that.$message.error("该批次已存在")
|
||||
}else{
|
||||
let params = {material: res.material,type: that.type,};
|
||||
that.$API.wpm.handover.mgroups.req(params).then((res) => {
|
||||
that.mgroupOptions = res;
|
||||
})
|
||||
that.materialOptions.forEach((item) => {
|
||||
if(item.batch == res.batch){
|
||||
let obj = {};
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<scan-dialog ref="scanDialog" @closed="scanClose"> </scan-dialog>
|
||||
<scan-dialog ref="scanDialog" :closeNow="closeNow" @closed="scanClose"> </scan-dialog>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次" v-if="cate == 'do_out'">
|
||||
<el-select
|
||||
|
@ -139,6 +139,7 @@ export default {
|
|||
return {
|
||||
type: "do_in",
|
||||
loading: false,
|
||||
closeNow:true,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
do_out: "生产领料",
|
||||
|
@ -232,16 +233,45 @@ export default {
|
|||
let that = this;
|
||||
let obj = {};
|
||||
obj.page = 0;
|
||||
obj.state = 10;
|
||||
obj.material = that.form.material;
|
||||
this.$API.inm.warehouse.batch.req(obj).then((res) => {
|
||||
this.batchOptions = res;
|
||||
that.$API.inm.warehouse.batch.req(obj).then((res) => {
|
||||
that.batchOptions = res.filter((item) => {
|
||||
return item.state == 10;
|
||||
});
|
||||
});
|
||||
},
|
||||
scanClose(data){
|
||||
let that = this;
|
||||
let id = data.split('#')[1];
|
||||
console.log('id',id);
|
||||
that.form.batch = id;
|
||||
// that.form.batch = id;
|
||||
that.$API.cm.labelmat.item.req(id).then((res) => {
|
||||
that.form.mb = res.id;
|
||||
that.form.batch = res.batch;
|
||||
that.form.warehouse = res.warehouse;
|
||||
|
||||
let arr = that.mioitemlist.filter((mioitem) => {
|
||||
return mioitem.batch == res.batch;
|
||||
});
|
||||
if(arr.length > 0){
|
||||
that.$message.error('该批次已存在');
|
||||
that.selectBatchClear();
|
||||
}else{
|
||||
let arr2 = that.batchOptions.filter((batchitem) => {
|
||||
return batchitem.batch == res.batch;
|
||||
})
|
||||
if(arr2.length > 0){
|
||||
that.selectBatch = arr2[0].batch;
|
||||
that.form.batch = arr2[0].batch;
|
||||
that.form.mb = arr2[0].id;
|
||||
that.form.warehouse = arr2[0].warehouse;
|
||||
that.$refs.scanDialog.visible = false;
|
||||
}else{
|
||||
that.$message.error('该批次不存在');
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
selectMaterialChange() {
|
||||
this.getBatchOptions();
|
||||
|
|
|
@ -356,7 +356,6 @@
|
|||
ref="checkDialogSingle"
|
||||
:mlogb="mlogb"
|
||||
:wm = "wm"
|
||||
:qct="qct"
|
||||
:handle_user="handle_user"
|
||||
:handle_date="handle_date"
|
||||
@success="handlesCheckSuccess"
|
||||
|
@ -479,6 +478,7 @@ export default {
|
|||
mlogb: "",
|
||||
isEdit: true,
|
||||
},
|
||||
qct:null,
|
||||
defectlist:[],
|
||||
};
|
||||
},
|
||||
|
@ -545,25 +545,7 @@ export default {
|
|||
table_in_edit(row) {
|
||||
this.saveInForm = row;
|
||||
this.saveInDialog = true;
|
||||
// this.getdefects(row.qct);
|
||||
},
|
||||
// getdefects(qct){
|
||||
// let that = this;
|
||||
// that.$API.qm.qct.item.req(qct).then((res) => {
|
||||
// that.defectOptions = [];
|
||||
// that.defectOptions = res.qct_defects;
|
||||
// })
|
||||
// },
|
||||
// formTableSave(row){
|
||||
// let that = this;
|
||||
// let obj = new Object();
|
||||
// obj.count = row.count;
|
||||
// obj.defect = row.defect;
|
||||
// obj.mlogb = that.saveInForm.id;
|
||||
// that.$API.wpm.mlogbdefect.create.req(obj).then((res) => {
|
||||
|
||||
// })
|
||||
// },
|
||||
//提交自检
|
||||
saveInSubmit() {
|
||||
let that = this;
|
||||
|
@ -610,15 +592,32 @@ export default {
|
|||
});
|
||||
},
|
||||
table_out_check_single(row,type){
|
||||
this.mlogb = row.id;
|
||||
this.wm = row.wm_in;
|
||||
this.qct = row.qct;
|
||||
this.handle_date=this.mlogItem.handle_date;
|
||||
this.handle_user = this.mlogItem.handle_user;
|
||||
this.dialog.check_single = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialogSingle.open(type);
|
||||
});
|
||||
let that = this;
|
||||
that.mlogb = row.id;
|
||||
that.wm = row.wm_in;
|
||||
that.handle_date=that.mlogItem.handle_date;
|
||||
that.handle_user = that.mlogItem.handle_user;
|
||||
that.dialog.check_single = true;
|
||||
if(row.qct==null){
|
||||
that.$API.qm.qct.list.req({qctmat__material:row.material_out,page:0}).then((res)=>{
|
||||
if(res.length>0){
|
||||
that.qct = res[0].id;
|
||||
console.log('that.qct',that.qct);
|
||||
that.$nextTick(() => {
|
||||
that.$refs.checkDialogSingle.open(type,that.qct);
|
||||
});
|
||||
}else{
|
||||
that.$nextTick(() => {
|
||||
that.$refs.checkDialogSingle.open(type);
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
that.qct = row.qct;
|
||||
that.$nextTick(() => {
|
||||
that.$refs.checkDialogSingle.open(type,that.qct);
|
||||
});
|
||||
}
|
||||
},
|
||||
//表单提交方法
|
||||
mlogSubmit() {
|
||||
|
|
|
@ -173,10 +173,6 @@ export default {
|
|||
type: String,
|
||||
default: "",
|
||||
},
|
||||
qct: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
handle_user:{
|
||||
type: String,
|
||||
default: "",
|
||||
|
@ -197,6 +193,7 @@ export default {
|
|||
mode:'ins',
|
||||
//表单数据
|
||||
form: {},
|
||||
qct:"",
|
||||
mgroup: "",
|
||||
params: {mlogb:'',page:0},
|
||||
visible: false,
|
||||
|
@ -218,13 +215,14 @@ export default {
|
|||
mounted() {
|
||||
let that = this;
|
||||
that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
|
||||
that.getOptions();
|
||||
that.getdefects();
|
||||
},
|
||||
methods: {
|
||||
open(mode = "ins") {
|
||||
open(mode = "ins",qct = '') {
|
||||
let that = this;
|
||||
this.mode = mode;
|
||||
console.log(this.mode);
|
||||
this.qct = qct;
|
||||
that.getOptions();
|
||||
that.getdefects();
|
||||
this.visible = true;
|
||||
setTimeout(() => {
|
||||
this.tableHeight = document.getElementById('mlogbwMain').clientHeight-20;
|
||||
|
|
Loading…
Reference in New Issue