Commit 2acaad05 authored by 沈翠玲's avatar 沈翠玲

fqc更新

parent 9e9fe00a
......@@ -73,10 +73,11 @@ export function unschedule(arrangeCode) {
}
// 选择工单
export function getWorkOrderListByTaskWorkunitId(taskWorkunitId) {
export function getWorkOrderListByObj(data) {
return request({
url: "/mes/pro/taskWorkunit/getWorkOrderListByTaskWorkunitId/" + taskWorkunitId,
method: "get",
url: "/mes/pro/taskWorkunit/getWorkOrderListByObj",
method: "post",
data: data
});
}
......
......@@ -9,6 +9,15 @@ export function listIqc(query) {
})
}
// 查询来料检验单列表
export function listBack(query) {
return request({
url: '/md/back/list',
method: 'get',
params: query
})
}
// 查询来料检验单详细
export function getIqc(iqcId) {
return request({
......
......@@ -169,7 +169,7 @@
type="primary"
plain
size="mini"
:disabled='single'
:disabled='this.selectedRows.length !== 1'
@click="handleSplitWorkstation"
>工序新增</el-button>
</el-col>
......@@ -551,6 +551,7 @@
<el-input-number
:step="1"
:min="0"
:disabled="Assignform.splitWorkorder"
v-model="Assignform.quantity"
placeholder="请输入排产数量"
/>
......@@ -698,7 +699,7 @@ import {
postAssistMark,
getavailableToolCount,
getdefaultWorkCenterList} from '@/api/mes/pro/scheduleList'
import {putProtaskSplit, splitWorkstation, deleteTask, unschedule, updateProTaskWorkunitApi, getWorkOrderListByTaskWorkunitId} from '@/api/mes/pro/protask'
import {putProtaskSplit, splitWorkstation, deleteTask, unschedule, updateProTaskWorkunitApi, getWorkOrderListByObj} from '@/api/mes/pro/protask'
import BrandSelect from "@/components/TmTool/index.vue";
import shiftSelectMixin from '@/utils/shiftSelectMixin'
import OrderList from './orderList.vue'
......@@ -803,16 +804,22 @@ export default {
},
methods: {
selectWorkorder() {
getWorkOrderListByTaskWorkunitId(this.selectedRows[0].taskWorkunitId).then(response => {
getWorkOrderListByObj({taskWorkunitId: this.selectedRows[0].taskWorkunitId}).then(response => {
if (response.code === 200) {
this.$refs.workorderSelect.showFlag = true
}
});
},
onWorkorderSelect(rows){
console.log('rows', rows)
if(!rows || rows.length === 0) this.Assignform.splitWorkorder = ''
this.Assignform.splitWorkorder = rows.map(v => v.workorderCode).join(',')
if (rows && rows.length > 0) {
this.Assignform.splitWorkorder = rows.map(v => v.workorderCode).join(',')
this.Assignform.quantity = rows.reduce((pre, cur) => {
return pre + (cur.quantity || 0)
}, 0)
} else {
this.Assignform.quantity = 0
this.Assignform.splitWorkorder = null
}
},
handleSelectionChange(selection) {
this.ids = selection.map(item => item.taskId);
......
......@@ -6,55 +6,23 @@
width="80%"
center
>
<!-- <el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工单编码" prop="workorderCode">
<el-form :model="queryParams" @submit.native.prevent ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工单编码" prop="workorderCodes">
<el-input
v-model="queryParams.workorderCode"
v-model="queryParams.workorderCodes"
type="textarea" :rows="2"
resize="none"
placeholder="请输入工单编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单名称" prop="workorderName">
<el-input
v-model="queryParams.workorderName"
placeholder="请输入工单名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编号" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="客户名称" prop="clientName">
<el-input
v-model="queryParams.clientName"
placeholder="请输入客户名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form> -->
</el-form>
<el-table v-loading="loading" :data="workorderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工单编码" width="180" prop="workorderCode" >
......@@ -87,7 +55,7 @@
</template>
<script>
import { getWorkOrderListByTaskWorkunitId} from "@/api/mes/pro/protask";
import { getWorkOrderListByObj} from "@/api/mes/pro/protask";
export default {
name: 'WorkOrderSelectSingle',
components: {},
......@@ -129,7 +97,7 @@
open: false,
// 查询参数
queryParams: {
workorderCode: null,
workorderCodes: null,
workorderName: null,
taskWorkunitId: this.workorder.taskWorkunitId,
orderSource: null,
......@@ -162,7 +130,11 @@
getList() {
this.loading = true;
if (!this.workorder || !this.workorder.taskWorkunitId) return
getWorkOrderListByTaskWorkunitId(this.workorder.taskWorkunitId).then(response => {
const params = {
taskWorkunitId: this.workorder.taskWorkunitId,
workorderCodes: this.queryParams.workorderCodes ? this.queryParams.workorderCodes.split(/[\n,;,、;。]/).filter(item => item) : null,
}
getWorkOrderListByObj(params).then(response => {
this.workorderList = response.data;
this.loading = false;
});
......
......@@ -1060,9 +1060,10 @@ export default {
})
});
checkArrangeRulesApi(cparams).then(res => {
if(res.msg && res.msg !== '操作成功') {
if(res.data && typeof res.data == 'object') {
const text = res.data.join('\n')
this.$confirm(
res.msg,
text,
'提示',
{
distinguishCancelAndClose: true,
......
This diff is collapsed.
This diff is collapsed.
<template>
<div class="productOrderSpecification">
<table border class="form-header font-size-16" style="table-layout: fixed;width: 100%;border:1px solid #000000;font-size:14px;line-height: 25px; margin: 8px 10px 5px 10px;">
<!-- -->
<tr height="30" class="color000">
<td colspan="6" align="center"><img width="140" src="@/assets/logo/logo.png" alt=""></td>
<td colspan="18" align="center"><div class="titles">广州市宝绅科技应用有限公司</div>Guangzhou Baoshen Science & Applied Technologies Co., Ltd.</td>
</tr>
<tr height="35" class="color000">
<td colspan="24" align="center"><div class="titles" style="line-height: 40px;height:40px">原材料检验记录表({{body.vendorName}})</div></td>
</tr>
<tr height="20" class="color000">
<td colspan="3" align="center">采购单号</td>
<td colspan="3" align="center">{{ body.saleNo }}</td>
<td colspan="2" align="center">送货数量</td>
<td colspan="2" align="center">{{ body.quantity }}</td>
<td colspan="2" align="center">不良品数</td>
<td colspan="2" align="center" style="word-wrap:break-word;word-break:break-all">{{ body.quantityUnqualified }}</td>
<td colspan="2" align="center">单位</td>
<td colspan="2" align="center">{{ body.unit }}</td>
<td colspan="2" align="center">报检日期</td>
<td colspan="4" align="center">{{ body.checkTime }}</td>
</tr>
<tr height="20" class="color000">
<td colspan="3" align="center">产品编号</td>
<td colspan="3" align="center">{{ body.sapItemCode }}</td>
<td colspan="2" align="center">检验判定</td>
<td colspan="2" align="center"><dict-tag :options="dict.type.mes_qc_result" :value="body.checkResult" /></td>
<td colspan="2" align="center">处理措施</td>
<td colspan="2" align="center">{{ body.checkStatus }}</td>
<td colspan="2" align="center">产品名称</td>
<td colspan="2" align="center">{{ body.itemName }}</td>
<td colspan="2" align="center">供应商名称</td>
<td colspan="4" align="center" style="word-wrap:break-word;word-break:break-all">{{ body.vendorName }}</td>
</tr>
<tr height="20" class="color000" style="font-weight: 400">
<td colspan="1" align="center">序号</td>
<td colspan="2" align="center">检验项目</td>
<td colspan="15" align="center">检验标准</td>
<td colspan="4" align="center">检验结果</td>
<td colspan="2" align="center">判定</td>
</tr>
<tr height="20" v-for="(item,index) in body.lineList" :key="'processes' + index" class="color000">
<td colspan="1" align="center">{{index + 1}}</td>
<td colspan="2" align="center">{{item.qcTool}}</td>
<td colspan="15" align="center">{{item.indexName}}</td>
<td colspan="4" align="center">{{item.qualityCheckResults}} </td>
<td colspan="2" align="center"><dict-tag :options="dict.type.ver_item_determination" :value="item.status" /></td>
</tr>
<tr height="40" class="color000">
<td colspan="2" align="center">备注</td>
<td colspan="22" align="center" style="word-wrap:break-word;word-break:break-all; height: 40px;line-height:15px;font-size: 13px">
(1)品牌或客户指定材料供应商的,按照其标准或要求执行: (2)品牌或客户的标准高于内部标准的,按照品牌或客户的标准执行:<br>
(3)品牌或客户无具体标准要求的,按照内部标准执行;(4)★表示月度抽检测试项目,※表示周抽检项目;●表示年度测试项目;
</td>
</tr>
</table>
</div>
</template>
<script>
import dayjs from 'dayjs'
export default {
props: ['iqcTable'],
dicts: [
"ver_item_determination",
"mes_qc_result"
],
data() {
return {
date: dayjs().format('YYYY-MM-DD'),
// body: {
// "saleNo": "采购单号/purchaseOrderNo",
// "quantity": "1",
// "unit": "单位/baseunit",
// "sapItemCode": "产品编码",
// "vendorCode": "工银上编码",
// "vendorName": "供应商名称/vendorName",
// "logoUrl": "http://192.168.3.181:81/downdir/logo444.png",
// "itemName": "产品名称",
// "quantityUnqualified":"1",
// "checkTime": "报检日期/提交时间",
// "lineList": [
// {
// "seqNo": "序号",
// "iqcItemName": "检验项目/qcIqcLineList.",
// "iqcItemBaseDesc": "检验标准/qcIqcLineList.",
// "checkResult": "检测结果/qcIqcLineList.",
// "checkStatus": "判定/qcIqcLineList."
// }
// ]
// }
}
},
computed: {
body (){
return this.iqcTable
}
}
}
</script>
<style scoped lang="scss">
.productOrderSpecification{
position: relative;
width: 920px;
height: 1300px;
padding: 0 49px;
padding-top:20px;
box-sizing: border-box;
}
.titles{
text-align: center;
font-size:22px;
font-weight: 500;
}
.pageBottom{
display: flex;
justify-content: flex-end;
width: 850px;
padding: 0px 49px;
color: #000;
div{
margin-left:100px;
min-width: 200px;
}
}
[text-center]{
text-align: center;
}
.color000{
color: #000;
td {
word-wrap:break-word;
word-break:break-all
}
}
</style>
<template>
<div class="app-container">
<el-table v-loading="loading" :data="iqclineList" @selection-change="handleSelectionChange">
<el-table-column label="检验名称" width="100px" align="center" prop="qcTool" />
<el-table-column label="检验要求" align="center" prop="indexName">
</el-table-column>
<el-table-column label="项目判定" width="100px"align="center" prop="qualityCheckResults" />
<el-table-column label="判定" width="100px" align="center" prop="checkMethod" >
<template slot-scope="scope">
<dict-tag :options="dict.type.ver_item_determination" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<Defectrecord ref="defectDialog" :qcId="defect_iqcid" :lineId="defect_lineid" :qcType="defect_qctype" :optType="optType"></Defectrecord>
</div>
</template>
<script>
import { listIqcline, getIqcline, delIqcline, addIqcline, updateIqcline } from "@/api/mes/qc/iqcline";
import Defectrecord from "../defectrecord/index.vue"
export default {
name: "IqcLine",
dicts: ['mes_index_type', 'ver_item_determination'],
props:{
iqcId: null,
optType: null,
},
components:{Defectrecord},
data() {
return {
defect_iqcid:null,
defect_lineid:null,
defect_qctype: 'IQC',
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 来料检验单行表格数据
iqclineList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
iqcId: this.iqcId,
indexId: null,
indexCode: null,
indexName: null,
indexType: null,
qcTool: null,
checkMethod: null,
standerVal: null,
unitOfMeasure: null,
thresholdMax: null,
thresholdMin: null,
crQuantity: null,
majQuantity: null,
minQuantity: null,
},
// 表单参数
form: {},
};
},
created() {
this.getList();
},
methods: {
/** 查询来料检验单行列表 */
getList() {
debugger;
this.loading = true;
listIqcline(this.queryParams).then(response => {
this.iqclineList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
lineId: null,
iqcId: this.iqcId,
indexId: null,
indexCode: null,
indexName: null,
indexType: null,
qcTool: null,
checkMethod: null,
standerVal: null,
unitOfMeasure: null,
thresholdMax: null,
thresholdMin: null,
crQuantity: null,
majQuantity: null,
minQuantity: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.lineId)
this.single = selection.length!==1
this.multiple = !selection.length
},
handleDefect(row){
this.defect_iqcid = row.iqcId;
this.defect_lineid = row.lineId;
this.$nextTick(() => {
this.$refs.defectDialog.showFlag = true;
this.$refs.defectDialog.getList();
})
}
}
};
</script>
......@@ -34,6 +34,12 @@
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="产品/原料" prop="iqcType">
<el-select v-model="queryParams.iqcType" placeholder="请选择产品/原料" clearable>
<el-option v-for="dict in dict.type.IQC_TYPE" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="检测日期">
<el-date-picker v-model="daterangePurchaseDate" value-format="yyyy-MM-dd" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
......@@ -282,7 +288,7 @@ export default {
name: "Ipqc",
directives: { print },
components: { WorkorderSelect, WorkuintSelect, iqcline, iqcTable },
dicts: ['mes_ipqc_type_pc', 'mes_qc_result', 'mes_order_status'],
dicts: ['mes_ipqc_type_pc', 'mes_qc_result', 'mes_order_status', 'IQC_TYPE'],
data() {
return {
autoGenFlag: false,
......@@ -365,6 +371,7 @@ export default {
majQuantity: null,
minQuantity: null,
checkResult: null,
type: null,
inspectDate: null,
inspector: null,
status: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment