coding入场检验
This commit is contained in:
parent
34e8573531
commit
508803abcf
|
@ -79,7 +79,14 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
v-if="scope.row.need_test"
|
v-if="scope.row.need_test&&scope.row.test.length>0"
|
||||||
|
type="primary"
|
||||||
|
@click="handleRecord(scope)"
|
||||||
|
>
|
||||||
|
复验记录
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-else-if="scope.row.need_test&&scope.row.test==[]"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleMaterial(scope)"
|
@click="handleMaterial(scope)"
|
||||||
>
|
>
|
||||||
|
@ -112,7 +119,7 @@
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
<el-form-item label="采购订单项目" :prop="pu_order_item">
|
<el-form-item label="采购订单项目">
|
||||||
<el-select v-model="inpur.pu_order_item" @change="showmessage">
|
<el-select v-model="inpur.pu_order_item" @change="showmessage">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in puorderTtemoptions"
|
v-for="item in puorderTtemoptions"
|
||||||
|
@ -128,7 +135,7 @@
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="grid-content bg-purple">
|
<div class="grid-content bg-purple">
|
||||||
<el-form-item label="采购数量">
|
<el-form-item label="采购数量">
|
||||||
<el-input v-model="puorderItemdetial.count" :disabled="true">
|
<el-input v-model="puorderItemdetial.count" disabled>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
@ -140,7 +147,7 @@
|
||||||
<el-form-item label="到货时间">
|
<el-form-item label="到货时间">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="puorderItemdetial.delivery_date"
|
v-model="puorderItemdetial.delivery_date"
|
||||||
:disabled="true"
|
disabled
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -151,14 +158,14 @@
|
||||||
<el-form-item label="到货数量">
|
<el-form-item label="到货数量">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="puorderItemdetial.delivered_count"
|
v-model="puorderItemdetial.delivered_count"
|
||||||
:disabled="true"
|
disabled
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="仓库" :prop="warehouse">
|
<el-form-item label="仓库">
|
||||||
<el-select v-model="inpur.warehouse">
|
<el-select v-model="inpur.warehouse">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in warehouseData"
|
v-for="item in warehouseData"
|
||||||
|
@ -169,10 +176,10 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="批次" :prop="batch">
|
<el-form-item label="批次">
|
||||||
<el-input v-model="inpur.batch" placeholder="批次号"></el-input>
|
<el-input v-model="inpur.batch" placeholder="批次号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="有效期" :prop="expiration_date">
|
<el-form-item label="有效期">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="inpur.expiration_date"
|
v-model="inpur.expiration_date"
|
||||||
type="date"
|
type="date"
|
||||||
|
@ -182,16 +189,16 @@
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="入库数量" :prop="count">
|
<el-form-item label="入库数量">
|
||||||
<el-input-number v-model="inpur.count" :min="0"></el-input-number>
|
<el-input-number v-model="inpur.count" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
<el-button type="danger" @click="dialogVisibles = false"
|
<el-button type="danger" @click="dialogVisibles = false">
|
||||||
>取消
|
取消
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" @click="confirminpur('Form1')"
|
<el-button type="primary" @click="confirminpur('Form1')">
|
||||||
>确认
|
确认
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -382,6 +389,91 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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="检查类型">
|
||||||
|
入场检验
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人">
|
||||||
|
<template slot-scope="scope">{{ scope.row.create_by_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作时间">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.update_time.substring(0,scope.row.update_time.length-3)}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="handleRecordDetail(scope)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-link>
|
||||||
|
<!--<el-link @click="delTestRecord(scope)">
|
||||||
|
删除
|
||||||
|
</el-link>-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="limitedCheckRecord = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="limitedCheckRecord = false">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--已完成检查表查看-->
|
||||||
|
<el-dialog
|
||||||
|
:title="formName"
|
||||||
|
:visible.sync="recordFinishedVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="items">
|
||||||
|
<span class="itemLabel">操作人:</span>
|
||||||
|
<span>{{create_by_}}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="items">
|
||||||
|
<span class="itemLabel">操作时间:</span>
|
||||||
|
<span>{{update_time}}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-for="item in recordFieldList" :key="item.id" :span="12">
|
||||||
|
<div class="items" v-if="item.field_type!=='draw'&&item.field_value!==null&&item.field_value!==''">
|
||||||
|
<span class="itemLabel">{{item.field_name}}:</span>
|
||||||
|
<span>{{item.field_value}}</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-for="item in recordFieldList" :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://49.232.14.174:2222'+item.field_value"/>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<div class="items">
|
||||||
|
<span class="itemLabel">复检结果:</span>
|
||||||
|
<span v-if="is_testOk">合格</span>
|
||||||
|
<span v-else>不合格</span>
|
||||||
|
</div>
|
||||||
|
</el-row>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -393,9 +485,9 @@
|
||||||
} from "@/api/inm";
|
} from "@/api/inm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getPuorderItemList, getpuorder} from "@/api/pum";
|
import {getPuorderItemList, getpuorder} from "@/api/pum";
|
||||||
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
import {createTestrecord} from "@/api/inm";
|
import {createTestrecord} from "@/api/inm";
|
||||||
|
import {getTestRecord,getTestRecordItem} from "@/api/qm";
|
||||||
import {upUrl, upHeaders} from "@/api/file";
|
import {upUrl, upHeaders} from "@/api/file";
|
||||||
import {genTree} from "@/utils";
|
import {genTree} from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
@ -407,14 +499,24 @@
|
||||||
components: {Pagination},
|
components: {Pagination},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
formName:'',
|
||||||
|
create_by_:'',
|
||||||
|
update_time:'',
|
||||||
|
is_testOk:true,
|
||||||
|
recordFieldList:[],
|
||||||
InventoryList: {
|
InventoryList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
fifodetailList: {
|
fifodetailList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
},
|
},
|
||||||
inpur: {},
|
inpur: {
|
||||||
dialogVisibles: false,
|
pu_order_item:null,
|
||||||
|
warehouse:null,
|
||||||
|
batch:null,
|
||||||
|
expiration_date:null,
|
||||||
|
count:null,
|
||||||
|
},
|
||||||
upHeaders: upHeaders(),
|
upHeaders: upHeaders(),
|
||||||
upUrl: upUrl(),
|
upUrl: upUrl(),
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
@ -440,14 +542,18 @@
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogVisibles: false,
|
dialogVisibles: false,
|
||||||
|
limitedCheckRecord: false,
|
||||||
|
recordFinishedVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
|
recordList: [],
|
||||||
puorderItemdetial: [],
|
puorderItemdetial: [],
|
||||||
puorderTtemoptions: [],
|
puorderTtemoptions: [],
|
||||||
rule1: {
|
rule1: {
|
||||||
|
pu_order_item: [{required: true, message: "请选择", trigger: "blur"}],
|
||||||
|
warehouse: [{required: true, message: "请选择", trigger: "blur"}],
|
||||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||||
},
|
},
|
||||||
fileList: [],
|
|
||||||
item: "",
|
item: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -482,7 +588,7 @@
|
||||||
//采购订单项入库
|
//采购订单项入库
|
||||||
|
|
||||||
confirminpur() {
|
confirminpur() {
|
||||||
console.log(this.inpur);
|
// console.log(this.inpur);
|
||||||
this.inpur.material = this.puorderItemdetial.material_.id; //物料类型
|
this.inpur.material = this.puorderItemdetial.material_.id; //物料类型
|
||||||
this.inpur.fifo = this.$route.params.id; //出入库记录
|
this.inpur.fifo = this.$route.params.id; //出入库记录
|
||||||
createfifoitem(this.inpur).then((res) => {
|
createfifoitem(this.inpur).then((res) => {
|
||||||
|
@ -523,7 +629,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleUpSuccess(res, file, filelist) {
|
handleUpSuccess(res, file) {
|
||||||
this.fileList.push({
|
this.fileList.push({
|
||||||
id: res.data.id,
|
id: res.data.id,
|
||||||
name: res.data.name,
|
name: res.data.name,
|
||||||
|
@ -552,6 +658,7 @@
|
||||||
this.fileList.splice(index, 1);
|
this.fileList.splice(index, 1);
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
e;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
yeschange(val) {
|
yeschange(val) {
|
||||||
|
@ -578,7 +685,7 @@
|
||||||
|
|
||||||
this.fileData.files = files;
|
this.fileData.files = files;
|
||||||
this.fileData.need_test = this.FIFOItem.need_test;
|
this.fileData.need_test = this.FIFOItem.need_test;
|
||||||
console.log(this.fileData);
|
// console.log(this.fileData);
|
||||||
itemfiles(this.FIFOItem.id, this.fileData).then((res) => {
|
itemfiles(this.FIFOItem.id, this.fileData).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -622,7 +729,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(this.recordform);
|
// console.log(this.recordform);
|
||||||
this.testrecord.form = this.recordform;
|
this.testrecord.form = this.recordform;
|
||||||
this.testrecord.record_data = _this.field;
|
this.testrecord.record_data = _this.field;
|
||||||
this.testrecord.fifo_item = this.fifo_detail;
|
this.testrecord.fifo_item = this.fifo_detail;
|
||||||
|
@ -636,6 +743,47 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//检验记录
|
||||||
|
handleRecord(scope) {
|
||||||
|
let that = this;
|
||||||
|
that.fifo_item = scope.row.id;
|
||||||
|
that.limitedCheckRecord = true;
|
||||||
|
getTestRecord({fifo_item: scope.row.id}).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
that.recordList = res.data.results;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击记录里的查看
|
||||||
|
handleRecordDetail(scope) {
|
||||||
|
let that = this;
|
||||||
|
that.is_testOk = scope.row.is_testok;
|
||||||
|
that.recordFieldList = [];
|
||||||
|
that.create_by_ = scope.row.create_by_.name;
|
||||||
|
that.update_time = scope.row.update_time;
|
||||||
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.recordFinishedVisible = true;
|
||||||
|
that.formName = res.data.form_.name;
|
||||||
|
that.recordFieldList = res.data.record_data;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.items {
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
padding-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemLabel {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #606266;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue