Commit 5344bfc1 authored by renjintao's avatar renjintao

质控卡

parent 744115f9
......@@ -210,7 +210,7 @@ export default {
"op",
{
props: { oprate: "edit", title: "分卡" },
// style: params.row.status == 5 ? "" : "display:none",
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.split(params.row) }
},
"分卡"
......
......@@ -59,7 +59,7 @@
</Col>
-->
<Col :span="8">
<Col :span="12">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
......@@ -70,22 +70,42 @@
</Select>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<Col :span="24">
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement" type="textarea" :rows="2"></Input>
<Input v-model="entity.productionRequirement"></Input>
</FormItem>
</Col>
<Col :span="12">
<Col :span="24">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
......@@ -95,6 +115,7 @@
<files ref="refFile" :parms="parms" files singleFile />
</FormItem>
</Col>
<!--
<Col :span="12">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
......@@ -131,32 +152,20 @@
<Input v-model="entity.measurementUnit"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -172,6 +181,7 @@ export default {
data() {
return {
disabled: false,
raidoDis: false,
entity: {
routingHeaderId: null,
routingDetailId: null,
......@@ -197,26 +207,29 @@ export default {
samplingBatch: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
app: 'qccard',
parms: {
app: "qccard",
eid: null,
name: '',
field: ''
name: "",
field: ""
}
};
},
props: {
v: Object,
eid: Number,
headid:Number,
headid: Number
},
mounted() {
this.loadDetails();
this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles()
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
methods: {
handleSubmit() {
......@@ -224,20 +237,26 @@ export default {
if (v) {
this.disabled = true;
this.entity.qualityTemplateName = ''
this.entity.qualityTemplate=''
this.entity.qualityTemplateName = "";
this.entity.qualityTemplate = "";
if (this.$refs.refFile.nameList.length > 0) {
let nameList=this.$refs.refFile.nameList
let names=[]
let url=[]
let nameList = this.$refs.refFile.nameList;
let names = [];
let url = [];
nameList.forEach(e => {
names.push(e.fileName)
url.push(e.filePath)
names.push(e.fileName);
url.push(e.filePath);
});
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
this.entity.qualityTemplateName = JSON.stringify(names)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, ""); //附件本地库暂存文件名称
this.entity.qualityTemplate = JSON.stringify(url)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, "");
}
this.entity.routingHeaderId=this.headid
this.entity.routingHeaderId = this.headid;
Api.create(this.entity)
.then(r => {
......@@ -285,19 +304,34 @@ export default {
this.routingDetailList = tempD;
});
},
//新增时将uid转为eid
//新增时将uid转为eid
updateEid(newId) {
let parms = {
eid: this.parms.eid,
id: newId + ''
}
this.$http.sysUser.updateEid(parms).then((res) => {
id: newId + ""
};
this.$http.sysUser.updateEid(parms).then(res => {
if (res.status) {
// this.$Message.success('修改成功!')
} else {
//this.$Message.error('修改失败!')
}
})
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
clearCheck() {
this.raidoDis = false;
this.entity.isphotograph = null;
},
l(key) {
key = "routing_qc_card" + "." + key;
......@@ -310,7 +344,7 @@ export default {
},
eid(v) {
if (v > 0) {
// this.load(v);
// this.load(v);
}
}
}
......
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('routingHeaderName')" v-if="false">{{entity.routingHeaderId}}</Filed>
<Filed :span="12" :name="l('routingDetailName')">{{entity.routingDetailId}}</Filed>
<Filed :span="12" :name="l('standard')">{{entity.standard}}</Filed>
<Filed :span="12" :name="l('fillintype')">
<state code="QC.fillintype" :value="entity.fillintype+''" type="text"></state>
......@@ -10,28 +8,11 @@
<Filed :span="12" :name="l('productionRequirement')">{{entity.productionRequirement}}</Filed>
<Filed :span="12" :name="l('checkContent')">{{entity.checkContent}}</Filed>
<Filed :span="12" :name="l('qualityTemplateName')"><a :href="downUrl+entity.qualityTemplate" target="_blank">{{entity.qualityTemplateName}}</a></Filed>
<Filed :span="12" :name="l('isImportant')">
<state code="Process.state" :value="entity.isImportant+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('firstCheck')">
<state code="Process.state" :value="entity.firstCheck+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('inspection')">
<state code="Process.state" :value="entity.inspection+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('inspectionTime')">{{entity.inspectionTime}}</Filed>
<Filed :span="12" :name="l('sampling')">
<state code="Process.state" :value="entity.sampling+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<Filed :span="12" :name="l('checkType')">
<state code="QC.checktype" :value="entity.checkType+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed>
<Filed :span="12" :name="l('checkParams')">{{entity.checkParams}}</Filed>
<Filed :span="12" :name="l('measurementUnit')">{{entity.measurementUnit}}</Filed>
<Filed :span="12" :name="l('isphotograph')">
<state
code="Process.state"
......@@ -39,12 +20,6 @@
type="text"
></state>
</Filed>
<Filed :span="12" :name="l('status')">
<state code="Process.state" :value="entity.status+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('extend')" v-if="false">{{entity.extend}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<!--
<Col :span="12">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<Input v-model="entity.isDeleted"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingStepId')" prop="routingStepId">
<InputNumber v-model="entity.routingStepId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('extend')" prop="extend">
<Input v-model="entity.extend"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
......@@ -59,91 +12,56 @@
</Select>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<files ref="refFile" :parms="parms" files singleFile />
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('firstCheck')" prop="firstCheck">
<Dictionary code="Process.state" v-model="entity.firstCheck" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspection')" prop="inspection">
<Dictionary code="Process.state" v-model="entity.inspection" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspectionTime')" prop="inspectionTime">
<InputNumber v-model="entity.inspectionTime"></InputNumber>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('sampling')" prop="sampling">
<Dictionary code="Process.state" v-model="entity.sampling" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('samplingBatch')" prop="samplingBatch">
<Input v-model="entity.samplingBatch"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('measurementUnit')" prop="measurementUnit">
<Input v-model="entity.measurementUnit"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType"></Dictionary>
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="entity.status" type="radio"></Dictionary>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams" type="textarea" :rows="2"></Input>
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<files ref="refFile" :parms="parms" files singleFile />
<!--
<a
:href="fileUrlPath"
@click="downFile(entity.qualityTemplate)"
target="_blank"
>{{entity.qualityTemplateName}}</a>
-->
</FormItem>
</Col>
</Row>
......@@ -161,12 +79,18 @@ export default {
data() {
return {
disabled: false,
raidoDis: false,
downUrl: fileUrlDown,
fileUrlPath: "",
entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
......@@ -192,9 +116,20 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = v;
this.entity = r.result;
if (r.result.checkType == 1 || r.result.checkType == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
}
});
},
downFile(path) {
this.fileUrlPath = this.downUrl + path;
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
......@@ -257,7 +192,17 @@ export default {
this.routingDetailList = tempD;
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
l(key) {
key = "routing_qc_card" + "." + key;
return this.$t(key);
......
......@@ -21,7 +21,7 @@
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<Modal v-model="modal" :title="title" width="1000" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
......@@ -58,7 +58,6 @@ export default {
curId: 0,
hid: 0,
columns: [
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
......@@ -71,30 +70,16 @@ export default {
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
high: true
},
{
key: "checkType",
title: this.l("checkType"),
align: "left",
high: true,
code: "QC.checktype",
width:100,
tooltip:true,
},
{
key: "checkParams",
title: this.l("checkParams"),
align: "left",
easy: true,
high: true
},
{
key: "measurementUnit",
title: this.l("measurementUnit"),
align: "left",
easy: true,
high: true,
hide:true,
tooltip:true,
},
{
key: "fillintype",
......@@ -103,6 +88,14 @@ export default {
high: true,
code: "QC.fillintype",
width:140,
},
{
key: "checkType",
title: this.l("checkType"),
align: "center",
high: true,
code: "QC.checktype",
width:100,
},
{
key: "isphotograph",
......@@ -113,12 +106,12 @@ export default {
width:100,
},
{
key: "status",
title: this.l("status"),
align: "center",
key: "standard",
title: this.l("standard"),
align: "left",
easy: true,
high: true,
code: "Process.Status",
width:80,
tooltip:true,
},
{
key: "productionRequirement",
......@@ -126,15 +119,16 @@ export default {
align: "left",
easy: true,
high: true,
hide: true
tooltip:true,
},
{
key: "checkContent",
title: this.l("checkContent"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
// {
// key: "standard",
// title: this.l("standard"),
// align: "left",
// easy: true,
// high: true,
// },
{
key: "qualityTemplateName",
title: this.l("qualityTemplateName"),
......@@ -155,53 +149,6 @@ export default {
]);
}
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "center",
high: true,
code: "Process.state",
width:100,
},
{
key: "firstCheck",
title: this.l("firstCheck"),
align: "center",
high: true,
code: "Process.state",
width:100,
},
{
key: "inspection",
title: this.l("inspection"),
align: "center",
high: true,
code: "Process.state",
width:80,
},
{
key: "inspectionTime",
title: this.l("inspectionTime"),
align: "left",
high: true,
hide: true
},
{
key: "sampling",
title: this.l("sampling"),
align: "center",
high: true,
code: "Process.state",
width:80,
},
{
key: "samplingBatch",
title: this.l("samplingBatch"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "creationTime",
title: this.l("creationTime"),
......
......@@ -23,10 +23,15 @@
<Dictionary code="QC.checktype" v-model="condition.checkType.value"></Dictionary>
</FormItem>
</Col>
<Col :span="24" v-if="condition.checkParams.show">
<Col :span="12" v-if="condition.checkParams.show">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="condition.checkParams.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.standard.show">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="condition.standard.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.measurementUnit.show">
<FormItem :label="l('measurementUnit')" prop="measurementUnit">
......@@ -63,11 +68,7 @@
<Input v-model="condition.productionRequirement.value"></Input>
</FormItem>
</Col>
<Col :span="24" v-if="condition.standard.show">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="condition.standard.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.qualityTemplateName.show">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<Input v-model="condition.qualityTemplateName.value"></Input>
......@@ -153,22 +154,22 @@ export default {
routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true },
checkParams: { op: "Equal", value: null, show: false },
measurementUnit: { op: "Equal", value: null, show: true },
checkParams: { op: "Equal", value: null, show: true },
measurementUnit: { op: "Equal", value: null, show: false },
fillintype: { op: "Equal", value: null, show: true },
qualityTemplate: { op: "Equal", value: null, show: false },
isphotograph: { op: "Equal", value: null, show: true },
status: { op: "Equal", value: null, show: true },
status: { op: "Equal", value: null, show: false },
remark: { op: "Equal", value: null, show: false },
productionRequirement: { op: "Equal", value: null, show: false },
standard: { op: "Equal", value: null, show: false },
productionRequirement: { op: "Equal", value: null, show: true },
standard: { op: "Equal", value: null, show: true },
qualityTemplateName: { op: "Equal", value: null, show: false },
isImportant: { op: "Equal", value: null, show: true },
firstCheck: { op: "Equal", value: null, show: true },
inspection: { op: "Equal", value: null, show: true },
inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true }
isImportant: { op: "Equal", value: null, show: false },
firstCheck: { op: "Equal", value: null, show: false },
inspection: { op: "Equal", value: null, show: false },
inspectionTime: { op: "Equal", value: null, show: false },
sampling: { op: "Equal", value: null, show: false },
samplingBatch: { op: "Equal", value: null, show: false }
},
routingDetailList: [],
};
......
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