Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
f1482c2a7f
|
@ -113,4 +113,13 @@ export function saleMtest(id, data) {
|
|||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//复验上传
|
||||
export function itemfiles(id, data) {
|
||||
return request({
|
||||
url: `/inm/fifoitem/${id}/`,
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -132,7 +132,6 @@
|
|||
<el-form-item label="图表">
|
||||
<div>
|
||||
<img id="canvasImg" :src="img" style="width:500px;height: 300px;display: none">
|
||||
<!--<img id="canvasImg" src="./../../assets/glass.png" style="width:500px;height: 300px;display: none">-->
|
||||
<div style="position: relative;display: flex;flex-direction: column;
|
||||
border: 1px solid #DCDFE6;">
|
||||
<canvas id="canvas" width="500" height="300">
|
||||
|
@ -200,6 +199,8 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
debugger;
|
||||
debugger;
|
||||
let that = this;
|
||||
that.checkForm = {};
|
||||
this.form = this.formID;
|
||||
|
@ -232,17 +233,20 @@
|
|||
let listJudge = this.formData.filter(item => {
|
||||
return item.need_judge === true;
|
||||
});
|
||||
debugger;
|
||||
listJudge.forEach(item => {
|
||||
let obj = new Object();
|
||||
obj = item;
|
||||
that.judgeList.push(obj)
|
||||
});
|
||||
debugger;
|
||||
let imag= this.formData.filter(item => {
|
||||
return item.field_type === 'draw';
|
||||
});
|
||||
that.img = new Image();
|
||||
that.img.crossOrigin = '';
|
||||
that.img = 'http://47.95.0.242:2222'+imag[0].draw_template;
|
||||
that.img.crossOrigin = 'anonymous';
|
||||
let value = imag[0].field_value?imag[0].field_value:imag[0].draw_template;
|
||||
that.img = 'http://47.95.0.242:2222'+value;
|
||||
setTimeout(function(){
|
||||
that.canvasInit();
|
||||
},500);
|
||||
|
|
|
@ -48,20 +48,24 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="文件">
|
||||
<template slot-scope="scope" v-if="scope.row.files">
|
||||
|
||||
<div v-for="item in scope.row.files_" v-bind:key="item.id">
|
||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||
item.name
|
||||
}}</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
|
||||
type="primary"
|
||||
@click="handleMaterial(scope)"
|
||||
<el-link type="primary" @click="handleMaterial(scope)" v-if="scope.row.need_test"
|
||||
>复验</el-link
|
||||
>
|
||||
<el-link
|
||||
|
||||
type="primary"
|
||||
@click="handlefile(scope)"
|
||||
>上传</el-link
|
||||
>
|
||||
|
||||
<el-link type="primary" @click="handleEdit(scope)">上传</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -73,8 +77,65 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
title="上传文件"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="FIFOItem"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
|
||||
>
|
||||
<el-form-item label="是否需要复验" prop="need_test">
|
||||
<el-switch v-model="FIFOItem.need_test"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
|
||||
<el-form-item label="文件列表">
|
||||
<el-upload
|
||||
|
||||
ref="upload"
|
||||
:action="upUrl"
|
||||
:before-upload="beforeUpload"
|
||||
:on-success="handleUpSuccess"
|
||||
:headers="upHeaders"
|
||||
multiple
|
||||
accept="image/*,.ppt,.pdf,.doc,.docx,.xls,.xlsx"
|
||||
>
|
||||
<el-button size="small" type="primary">上传文件</el-button>
|
||||
<span class="el-upload__tip">
|
||||
可上传多个pdf,word,ppt,excel,图片文件,单文件大小不超过50M
|
||||
</span>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<div
|
||||
v-for="(item, index) in fileList"
|
||||
v-bind:key="item.id"
|
||||
style="margin-top: 2px;"
|
||||
>
|
||||
<i
|
||||
class="el-icon-delete"
|
||||
@click="deleteFile(index)"
|
||||
style="color: red"
|
||||
|
||||
></i>
|
||||
<el-link :href="item.path" target="_blank" type="primary">{{
|
||||
item.name
|
||||
}}</el-link>
|
||||
</div>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="物料检查表"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="outerVisible"
|
||||
>
|
||||
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in recordformList"
|
||||
|
@ -209,14 +270,18 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import { getfifodetailList,itemfiles } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||
import { createTestrecord } from "@/api/inm";
|
||||
import { getUserList } from "@/api/user";
|
||||
|
||||
import { upUrl, upHeaders } from "@/api/file";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
const defaultfile = {
|
||||
files:[],
|
||||
need_test:false,
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
|
@ -227,6 +292,10 @@ export default {
|
|||
fifodetailList: {
|
||||
count: 0,
|
||||
},
|
||||
upHeaders: upHeaders(),
|
||||
upUrl: upUrl(),
|
||||
fileList: [],
|
||||
FIFOItem:defaultfile,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
|
@ -242,18 +311,26 @@ export default {
|
|||
listQueryrecordform: {
|
||||
page: 0,
|
||||
},
|
||||
fileData:{},
|
||||
outerVisible: false,
|
||||
innerVisible: false,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
testrecord: {},
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
},
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
@ -269,11 +346,75 @@ export default {
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
//上传物料文件
|
||||
handlefile(scope)
|
||||
{
|
||||
|
||||
|
||||
|
||||
handleUpSuccess(res, file, filelist) {
|
||||
this.fileList.push({
|
||||
id: res.data.id,
|
||||
name: res.data.name,
|
||||
path: res.data.path,
|
||||
});
|
||||
this.handleRemove(file);
|
||||
},
|
||||
handleRemove(file) {
|
||||
// 实现删除文件
|
||||
let fileList = this.$refs.upload.uploadFiles;
|
||||
let index = fileList.findIndex((fileItem) => {
|
||||
return fileItem.uid === file.uid;
|
||||
});
|
||||
fileList.splice(index, 1);
|
||||
},
|
||||
beforeUpload(file) {
|
||||
const isLt2M = file.size / 1024 / 1024 < 50;
|
||||
if (!isLt2M) {
|
||||
this.$message.error("单文件不能超过50MB!");
|
||||
}
|
||||
return isLt2M;
|
||||
},
|
||||
deleteFile(index) {
|
||||
this.$confirm("确定删除该文件, 是否继续?", { type: "error" })
|
||||
.then(() => {
|
||||
this.fileList.splice(index, 1);
|
||||
})
|
||||
.catch((e) => {});
|
||||
},
|
||||
yeschange(val) {
|
||||
if (!val) {
|
||||
this.fileList = [];
|
||||
}
|
||||
},
|
||||
handleEdit(scope) {
|
||||
this.FIFOItem = Object.assign({}, scope.row); // copy obj
|
||||
this.fileList=[],
|
||||
this.dialogVisible = true;
|
||||
for (var i = 0; i < this.FIFOItem.files_.length; i++) {
|
||||
this.fileList.push({
|
||||
id: this.FIFOItem.files_[i].id,
|
||||
name: this.FIFOItem.files_[i].name,
|
||||
path: this.FIFOItem.files_[i].path,
|
||||
});
|
||||
}
|
||||
},
|
||||
confirm() {
|
||||
var files = [];
|
||||
for (var i = 0; i < this.fileList.length; i++) {
|
||||
files.push(this.fileList[i].id);
|
||||
}
|
||||
|
||||
this.fileData.files=files;
|
||||
this.fileData.need_test=this.FIFOItem.need_test;
|
||||
console.log(this.fileData)
|
||||
itemfiles(this.FIFOItem.id,this.fileData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
handleMaterial(scope) {
|
||||
//调该物料对应的检查表
|
||||
this.outerVisible = true;
|
||||
|
@ -302,10 +443,9 @@ export default {
|
|||
let _this = this;
|
||||
_this.field = []; //检查项目
|
||||
this.fieldList.forEach((item) => {
|
||||
|
||||
_this.field.push({
|
||||
form_field:item.id,
|
||||
field_value:item.sort
|
||||
form_field: item.id,
|
||||
field_value: item.sort,
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
:results="fieldList.results"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="formID"
|
||||
:isDisabled="isDisabled"
|
||||
@formFunc="formFunc"
|
||||
/>
|
||||
<!--<el-form ref="Forms" label-width="100px" :model="checkForm">
|
||||
|
@ -695,7 +696,8 @@
|
|||
imgData: '',
|
||||
canvasImg: '',
|
||||
judgeList: [],
|
||||
limitedPhoto:false
|
||||
limitedPhoto:false,
|
||||
isDisabled:true,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
|
|
@ -1,152 +1,136 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
|
||||
<el-table
|
||||
|
||||
:data="wproductList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column label="产品编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="任务编号">
|
||||
<template slot-scope="scope" v-if="scope.row.subproduction_plan_">{{ scope.row.subproduction_plan_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="军检状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="军检结论">
|
||||
|
||||
<template slot-scope="scope"><el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtestok==true">合格</el-tag></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库">
|
||||
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ scope.row.warehouse_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查表">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查状态">
|
||||
<template slot-scope="scope">{{ actstate_[scope.row.act_state]}}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30&&scope.row.is_mtested==false"
|
||||
@click="handleMtest(scope)"
|
||||
>军检
|
||||
</el-link>
|
||||
<el-link
|
||||
|
||||
@click="checkRecord(scope)"
|
||||
>检验记录
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="wproductList.count > 0"
|
||||
:total="wproductList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||
<el-form :model="mtestform" label-width="130px"
|
||||
label-position="right">
|
||||
<el-form-item label="是否军检合格" prop="name">
|
||||
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="军检备注" prop="name">
|
||||
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submtest">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="检验记录" :close-on-click-modal="false" :visible.sync="limitedCheckRecord">
|
||||
<el-table
|
||||
:data="recordList"
|
||||
:data="wproductList.results"
|
||||
border
|
||||
height="400"
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="表单名称">
|
||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column label="产品编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
<span v-else>未提交</span>
|
||||
<el-table-column label="任务编号">
|
||||
<template slot-scope="scope" v-if="scope.row.subproduction_plan_">{{ scope.row.subproduction_plan_.number }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<el-table-column label="产品名称">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="军检状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="军检结论">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtestok==true">合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库">
|
||||
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ scope.row.warehouse_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查表">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查状态">
|
||||
<template slot-scope="scope">{{ actstate_[scope.row.act_state]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30&&scope.row.is_mtested==false"
|
||||
@click="handleMtest(scope)"
|
||||
>军检
|
||||
</el-link>
|
||||
<el-link
|
||||
@click="checkRecord(scope)"
|
||||
>检验记录
|
||||
</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
width="60%"
|
||||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<customForm
|
||||
v-if="recordVisible"
|
||||
:results="fieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="recordform"
|
||||
:wproduct="wproduct"
|
||||
:recordId="recordId"
|
||||
:isDisabled="isDisabled"
|
||||
@recordSubmit="recordSubmit"
|
||||
@recordSave="recordSave"
|
||||
@recordCancel="recordCancel"
|
||||
<pagination
|
||||
v-show="wproductList.count > 0"
|
||||
:total="wproductList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||
<el-form
|
||||
:model="mtestform"
|
||||
label-width="130px"
|
||||
label-position="right"
|
||||
>
|
||||
<el-form-item label="是否军检合格" prop="name">
|
||||
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="军检备注" prop="name">
|
||||
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submtest">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog title="检验记录" :close-on-click-modal="false" :visible.sync="limitedCheckRecord">
|
||||
<el-table
|
||||
:data="recordList"
|
||||
border
|
||||
height="400"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="表单名称">
|
||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
<span v-else>未提交</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<el-row>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_value}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -164,12 +148,10 @@ export default {
|
|||
wproductList: {
|
||||
count: 0,
|
||||
},
|
||||
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
checkTypes: {
|
||||
10: "子工序检验",
|
||||
20: "工序检验",
|
||||
|
@ -177,26 +159,25 @@ export default {
|
|||
36: "夹层检验",
|
||||
40: "成品检验",
|
||||
},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
activeName:"1",
|
||||
saleproduct:"",
|
||||
dialogVisible:false,
|
||||
mtestform:{
|
||||
is_mtestok:false,
|
||||
},
|
||||
wproduct: null,
|
||||
limitedCheckRecord: false,
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
activeName: "1",
|
||||
saleproduct: "",
|
||||
dialogVisible: false,
|
||||
mtestform: {
|
||||
is_mtestok: false,
|
||||
},
|
||||
wproduct: null,
|
||||
recordList: [],
|
||||
fieldList: [],
|
||||
is_testok: "true",
|
||||
|
@ -215,103 +196,77 @@ export default {
|
|||
dialogFormVisibles: false,
|
||||
limitedCheckRecord: false,
|
||||
testrecord: {},
|
||||
|
||||
WarehouseData: "",
|
||||
formName: '项目检查表',
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
|
||||
|
||||
//待检成品列表
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//待检成品列表
|
||||
getList() {
|
||||
|
||||
|
||||
this.listQuery.material__type = 1;
|
||||
getwproductList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproductList = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
handleMtest(scope){
|
||||
|
||||
this.saleproduct=scope.row.id;
|
||||
this.dialogVisible=true;
|
||||
},
|
||||
submtest(){
|
||||
mtest(this.saleproduct,this.mtestform).then((res)=>{
|
||||
if(res.code >= 200)
|
||||
{
|
||||
this.$message.success("提交成功!");
|
||||
this.dialogVisible=false;
|
||||
}
|
||||
handleMtest(scope) {
|
||||
this.saleproduct = scope.row.id;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submtest() {
|
||||
mtest(this.saleproduct, this.mtestform).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.$message.success("提交成功!");
|
||||
this.dialogVisible = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
//检验记录
|
||||
checkRecord(scope){
|
||||
checkRecord(scope) {
|
||||
let that = this;
|
||||
that.wproduct = scope.row.id;//成品ID
|
||||
that.limitedCheckRecord = true;
|
||||
getTestRecord({wproduct:scope.row.id,page:0}).then(res=>{
|
||||
if(res.code==200){
|
||||
getTestRecord({wproduct: scope.row.id, page: 0}).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.recordList = res.data;
|
||||
}else{
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击记录里的查看
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
that.recordVisible = false;
|
||||
that.recordId = scope.row.id;
|
||||
that.recordform = scope.row.form;
|
||||
that.formName = scope.row.form_.name;
|
||||
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
|
||||
if (response.data) {
|
||||
that.hasPicture = false;
|
||||
let fieldList = response.data.results;
|
||||
that.fieldList = [...fieldList];
|
||||
let arr = fieldList.filter(item => {
|
||||
return item.field_type === 'draw'
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
that.hasPicture = true;
|
||||
}
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
let arr = [];
|
||||
let fieldList = res.data.record_data;
|
||||
for (let i = 0; i < that.fieldList.length; i++) {
|
||||
let obj = that.fieldList[i];
|
||||
obj.is_testok = null;
|
||||
for (let j = 0; j < fieldList.length; j++) {
|
||||
if (that.fieldList[i].field_key === fieldList[j].field_key) {
|
||||
obj.id = fieldList[j].id;
|
||||
obj.is_testok = fieldList[j].is_testok;
|
||||
obj.field_value = fieldList[j].field_value;
|
||||
}
|
||||
}
|
||||
arr.push(obj)
|
||||
}
|
||||
that.fieldList = arr;
|
||||
that.$nextTick(() => {
|
||||
that.isDisabled = true;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
})
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
debugger;
|
||||
that.recordVisible = true;
|
||||
that.formName = res.data.form_.name;
|
||||
that.fieldList = res.data.record_data;
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.items {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.itemLabel {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格品数量">{{productionplan.count_notok}}</el-descriptions-item>
|
||||
<el-descriptions-item label="玻璃编号">{{wproductnumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="玻璃所在子工序">{{process}}</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格品数量">{{productionplan.count_notok}}</el-descriptions-item>
|
||||
<el-descriptions-item label="玻璃编号">{{wproductnumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="玻璃所在子工序">{{process}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
:data="recordList.results"
|
||||
border
|
||||
|
@ -21,14 +20,14 @@
|
|||
style="width: 100%"
|
||||
height="300"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="表单名称">
|
||||
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{
|
||||
checkTypes[scope.row.type]
|
||||
}}</template>
|
||||
<template slot-scope="scope">
|
||||
{{checkTypes[scope.row.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
|
@ -38,153 +37,132 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-link @click="handleRecordDetail(scope)">查看 </el-link>
|
||||
<el-link @click="handleRecordDetail(scope)">查看</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--非检查表显示-->
|
||||
<el-dialog
|
||||
width="60%"
|
||||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<customForm
|
||||
v-if="recordVisible"
|
||||
:results="fieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="recordform"
|
||||
:wproduct="wproduct"
|
||||
:recordId="recordId"
|
||||
:isDisabled="isDisabled"
|
||||
@recordSubmit="recordSubmit"
|
||||
@recordSave="recordSave"
|
||||
@recordCancel="recordCancel"
|
||||
/>
|
||||
<el-row>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<div class="items" v-if="item.field_type!=='draw'">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_value}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="24">
|
||||
<div class="items" v-if="item.field_type==='draw'" style="height: 400px">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||
import customForm from "@/components/customForm/index";
|
||||
import { getTestRecord ,getTestRecordItem} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {getProductionplan} from "@/api/pm";
|
||||
import {getTestRecord, getTestRecordItem} from "@/api/qm";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
recordList: "",
|
||||
checkTypes: {
|
||||
10: "子工序检验",
|
||||
20: "工序检验",
|
||||
30: "工序复检",
|
||||
36: "夹层检验",
|
||||
40: "成品检验",
|
||||
},
|
||||
state_: {
|
||||
10: '制定中',
|
||||
20: '已下达',
|
||||
30: '已接受',
|
||||
40: '生产中',
|
||||
50: '已完成',
|
||||
60: '军检完成'
|
||||
},
|
||||
recordVisible: false,
|
||||
customfieldList: [],
|
||||
recordform: null,
|
||||
recordId: null,
|
||||
fifo_detail: "",
|
||||
formName: "项目检查表",
|
||||
hasPicture: false,
|
||||
fieldList: [],
|
||||
isDisabled: false,
|
||||
productionplan: {
|
||||
number: ""
|
||||
},
|
||||
wproductnumber: null,
|
||||
process: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.productionplanid = this.$route.params.productionplanid;
|
||||
this.wproductnumber = this.$route.params.number;
|
||||
this.process = this.$route.params.process;
|
||||
|
||||
export default {
|
||||
components: { Pagination, customForm },
|
||||
data() {
|
||||
return {
|
||||
recordList: "",
|
||||
checkTypes: {
|
||||
10: "子工序检验",
|
||||
20: "工序检验",
|
||||
30: "工序复检",
|
||||
36: "夹层检验",
|
||||
40: "成品检验",
|
||||
},
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成',
|
||||
60:'军检完成'},
|
||||
recordVisible: false,
|
||||
customfieldList: [],
|
||||
recordform: null,
|
||||
recordId: null,
|
||||
fifo_detail: "",
|
||||
formName: "项目检查表",
|
||||
hasPicture: false,
|
||||
fieldList: [],
|
||||
isDisabled: false,
|
||||
productionplan:{
|
||||
number:""
|
||||
},
|
||||
wproductnumber:null,
|
||||
process:null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.productionplanid = this.$route.params.productionplanid;
|
||||
this.wproductnumber=this.$route.params.number;
|
||||
this.process=this.$route.params.process;
|
||||
|
||||
this.getListp();
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
getListp() {
|
||||
|
||||
getProductionplan(this.productionplanid).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
}
|
||||
});
|
||||
this.getList();
|
||||
|
||||
},
|
||||
getList() {
|
||||
getTestRecord({ wproduct: this.id }).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.recordList = res.data;
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.recordVisible = false;
|
||||
that.recordId = scope.row.id;
|
||||
that.recordform = scope.row.form;
|
||||
that.formName = scope.row.form_.name;
|
||||
getrffieldList({ form: this.recordform, page: 1, page_size: 100 }).then(
|
||||
(response) => {
|
||||
methods: {
|
||||
checkPermission,
|
||||
getListp() {
|
||||
|
||||
getProductionplan(this.productionplanid).then((response) => {
|
||||
if (response.data) {
|
||||
that.hasPicture = false;
|
||||
let fieldList = response.data.results;
|
||||
that.fieldList = [...fieldList];
|
||||
let arr = fieldList.filter((item) => {
|
||||
return item.field_type === "draw";
|
||||
});
|
||||
if (arr.length > 0) {
|
||||
that.hasPicture = true;
|
||||
}
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
let arr = [];
|
||||
let fieldList = res.data.record_data;
|
||||
for (let i = 0; i < that.fieldList.length; i++) {
|
||||
let obj = that.fieldList[i];
|
||||
obj.is_testok = null;
|
||||
for (let j = 0; j < fieldList.length; j++) {
|
||||
if (that.fieldList[i].field_key === fieldList[j].field_key) {
|
||||
obj.id = fieldList[j].id;
|
||||
obj.is_testok = fieldList[j].is_testok;
|
||||
obj.field_value = fieldList[j].field_value;
|
||||
}
|
||||
}
|
||||
arr.push(obj);
|
||||
}
|
||||
that.fieldList = arr;
|
||||
that.$nextTick(() => {
|
||||
that.isDisabled = true;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
});
|
||||
this.productionplan = response.data;
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
getTestRecord({wproduct: this.id}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.recordList = res.data;
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
debugger;
|
||||
that.recordVisible = true;
|
||||
that.formName = res.data.form_.name;
|
||||
that.fieldList = res.data.record_data;
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.items {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.itemLabel {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -938,12 +938,11 @@
|
|||
//批量入库
|
||||
putins() {
|
||||
let _this = this;
|
||||
_this.mutipID = []
|
||||
_this.mutipID = [];
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.mutipID.push(item.id);
|
||||
|
||||
});
|
||||
console.log(_this.mutipID);
|
||||
createputins({
|
||||
warehouse: this.form.warehouse,
|
||||
wproducts: _this.mutipID,
|
||||
|
@ -1185,6 +1184,7 @@
|
|||
that.formName = res.data.form_.name;
|
||||
let fieldList = res.data.record_data;
|
||||
that.fieldList = [...fieldList];
|
||||
debugger;
|
||||
let arr = fieldList.filter(item => {
|
||||
return item.field_type === 'draw'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue