Commit 8372cf81 authored by kangzhenfei's avatar kangzhenfei

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product

parents 707b74cb 11b4138f
<template> <template>
<div>
<span v-if="type=='date'"> <span>
<Tooltip :content="value"> <Tooltip :content="value">
{{value.substr(0,10)}} {{date}}
</Tooltip> </Tooltip>
</span> </span>
<span v-else>{{value.substr(0,19)}}</span>
</div>
</template> </template>
<script> <script>
export default { export default {
name: 'dtSpan', name: 'dtSpan',
data() { data() {
return { return {
date:""
} }
}, },
props: { props: {
...@@ -25,10 +24,22 @@ export default { ...@@ -25,10 +24,22 @@ export default {
default: '2001-01-01 00:00:00' default: '2001-01-01 00:00:00'
}, },
}, },
created() {}, created() {
this.init()
},
methods: { methods: {
init(){
if(this.value&&this.value.length>=19){
this.date=this.value.substr(0,this.type=='date'?10:19)
}
return this.date;
}
}, },
computed: {}, computed: {},
watch: {} watch: {
value(){
this.init()
}
}
} }
</script> </script>
\ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"vue-i18n": "^8.15.5", "vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8", "vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3", "vue-slider-component": "^3.1.5",
"vue-switches": "^2.0.1", "vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1", "vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2", "vue2-editor": "^2.10.2",
......
...@@ -27,5 +27,7 @@ export default { ...@@ -27,5 +27,7 @@ export default {
terminate(params) { terminate(params) {
return Api.post(`${workflowUrl}/instance/terminate`, params); return Api.post(`${workflowUrl}/instance/terminate`, params);
}, },
listTable(params){
return Api.post(`${systemUrl}/custompropertydefinition/list`,params); //物料扩展属性
},
} }
\ No newline at end of file
<template>
<div class="new-detail" style="width:90%;margin:0 auto">
<Row>
<Filed :span="8" name="编码:">{{entity.code}}</Filed>
<Filed :span="8" name="名称:">{{entity.name}}</Filed>
<Filed :span="8" name="状态:">
<State code="materail.category.status" :value="parseInt(entity.status)" />
</Filed>
<Filed :span="8" name="版本:">{{entity.version}}</Filed>
<Filed :span="8" name="描述:">{{entity.description}}</Filed>
</Row>
<Divider orientation="left">扩展属性</Divider>
<Row>
<Filed v-for="li in fileds" :key="li.field" :span="li.span" :name="li.title+':'">
<State v-if="li.dataType==3" :code="li.note" :value="entity[li.field]" />
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div>
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div>
<span v-else>{{entity[li.field]}}</span>
<span v-if="li.unitName" v-text="li.unitName" class="ml10"></span>
</Filed>
</Row>
</div>
</template>
<script>
import Api from "../api";
export default {
name: "detail",
components: {},
props: {
idVal: {
type: String,
default: ""
}
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
entity: {
state: ""
},
fileds: []
};
},
created() {
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then(r => {
console.log(r);
if (r.success) {
let farmData = {};
farmData = JSON.parse(r.result.formData);
console.log(farmData);
this.entity = farmData;
let conditions = [
{
conditionalType: "Equal",
fieldName: "categoryId",
fieldValue: farmData.rootCategoryId
}
];
Api.listTable({
conditions: conditions,
sortBy: "id",
isDesc: false
}).then(r => {
if (r.result) {
this.fileds = r.result.filter(function(item) {
item.span = 8;
if (item.dataType == 8 || item.dataType == 5) {
item.span = 24;
}
return item.fieldType != 1;
});
this.fileds.map(u => {
let v = "";
if (u.dataType == 1 || u.dataType == 2) {
v = 0;
}
this.$set(this.entity, u.filed, v);
});
}
});
} else {
this.$Message.error("加载失败");
}
});
},
methods: {
load(v) {}
},
watch: {}
};
</script>
\ No newline at end of file
<template>
<div style="padding:40px 0">
<Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" />
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
<Form :model="formMyCheck" :label-width="100" :rules="ruleValidate" inline ref="formValidate">
<Row>
<Col span="18">
<FormItem label="审批意见:">
<RadioGroup v-model="formMyCheck.radioSp" style="width:200px">
<Radio label="通过"></Radio>
<Radio label="驳回"></Radio>
<Radio label="终止"></Radio>
</RadioGroup>
</FormItem>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.rejectToNodeId"
>
<Option value class="option-text">请选择驳回节点</Option>
<Option
v-for="(item, index) in nodeList"
:value="item.value"
:label="item.label"
:key="index"
:disabled="item.statu > 0 ? false : true"
></Option>
</Select>
<RadioGroup type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio>
</RadioGroup>
</FormItem>
<FormItem
label="原因:"
v-if="
formMyCheck.radioSp === '驳回' || formMyCheck.radioSp === '终止'
"
prop="comment"
>
<Input
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请输入原因"
/>
</FormItem>
</Col>
<Col span="6" style="text-align:right;padding-right:40px">
<Button type="primary" @click="nextCheckOk">下一步</Button>
</Col>
</Row>
</Form>
</div>
<Modal v-model="modalCheckNo" title="切片文件审批" width="800" :scrollable="true">
<br />
<h4>
您确定
<span class="new-red">{{ statuTitle }}</span> 此物料审批?
</h4>
<br />
<div slot="footer">
<Button @click="modalCheckNo = false">取消</Button>
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
import Process from '../process'
export default {
layout: 'empty',
name: 'Index',
components: {
Detail,
Process
},
data() {
return {
currentUserId: 0,
formMyCheck: {
radioSp: '通过',
comment: '',
workHours: 0, //工时
printPeriod: 0, //打印周期
equipment: '', //设备
materialWeight: 0, //材料重量
rejectToNodeId: null
},
modalCheckOk: false,
modalCheckNo: false,
detailId: null,
statuTitle: '',
footerStatu: null, //是否显示footer
getDetailResults: [], //getdetail返回数据
getDetailResultOrder: [], //getdetail返回订单detail数据
getDetailProcess: [], //getdetail返回process信息
getDetailRecords: [], //getdetail返回当前records信息
passId: null, //通过审批/驳回/终止接口 id,
nodeList: [], //返回节点
currentNodeID: null, //当前节点
firstNodeID: null, //第一个节点
preNodeID: null, //上一个节点
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
ruleValidate: {
rejectToNodeId: [
{
required: true,
message: '请选择驳回节点',
type: 'number',
trigger: 'change'
}
],
comment: [
{
required: true,
message: '请输入原因',
trigger: 'blur'
}
]
}
}
},
props: {},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
this.currentUserId=this.$store.state.userInfo.userId
this.detailId = this.$http.common.getquerystring('id')
this.footerStatu = this.$http.common.getquerystring('statu')
this.getDetailInfos(this.detailId)
},
methods: {
nextCheckOk() {
if (this.formMyCheck.radioSp == '通过') {
this.modalCheckNo = true
} else if (this.formMyCheck.radioSp == '驳回') {
this.$refs['formValidate'].validate((valid) => {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '驳回'
} else {
}
})
} else {
this.$refs['formValidate'].validate((valid) => {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '终止'
} else {
}
})
}
},
getDetailInfos(idVal) {
this.getDetailRecords = []
let param = {
Id: idVal
}
Api.getdetail(param).then((r) => {
this.testObj = r
if (r.success) {
this.currentNodeID = r.result.currentNodeId
this.passId=r.result.currentRecordId
this.nextNodeUserIdList=this.$refs.userProcess.immutData//获取下一节点的审核人
this.getNodes(r.result.nodes)
} else {
this.$Message.error('加载失败')
}
})
},
//获取流程节点
getNodes(nodes) {
this.nodeList = []
nodes.forEach((data) => {
let nodeObj = {}
nodeObj.value = data.id
nodeObj.label = data.name
nodeObj.statu = 1
this.nodeList.push(nodeObj)
})
//第一节点node的ID
this.firstNodeID = this.nodeList[0].value
//根据当前nodeid找到上一节点的nodeId
var index = this.nodeList.findIndex(
(item) => item.value == this.currentNodeID
)
if (index > 0) {
this.preNodeID = this.nodeList[index - 1].value
} else {
this.preNodeID = this.nodeList[0].value
}
},
changeToNode(val) {
if (val == '1') {
this.formMyCheck.rejectToNodeId = this.preNodeID
} else {
this.formMyCheck.rejectToNodeId = this.firstNodeID
}
},
//审批通过
checkOk() {
// alert(this.passId)
let param = {
id: this.passId,
comment: '',
nextOperationIdList: this.nextNodeUserIdList,
data: {}
}
// alert(JSON.stringify(param))
Api.pass(param).then((r) => {
if (r.success) {
this.$Message.success('审批通过成功')
this.modalCheckNo = false
} else {
this.$Message.error('审批通过失败')
this.modalCheckNo = true
}
})
},
//审批驳回
checkNo() {
// alert(this.passId)
let param = {
id: this.passId,
comment: this.formMyCheck.comment,
rejectToNodeId: this.formMyCheck.rejectToNodeId
}
// alert(JSON.stringify(param))
Api.reject(param).then((r) => {
if (r.success) {
this.$Message.success('驳回审批成功')
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
this.modalCheckNo = true
}
})
},
//审批终止
checkCancel() {
// alert(this.passId)
let param = {
id: this.passId,
comment: this.formMyCheck.comment
}
//alert(JSON.stringify(param))
Api.terminate(param).then((r) => {
if (r.success) {
this.$Message.success('终止审批成功')
this.modalCheckNo = false
} else {
this.$Message.error('加载失败')
this.modalCheckNo = true
}
})
},
//终止或驳回
checkFalse() {
if (this.formMyCheck.radioSp == '驳回') {
this.checkNo()
} else if (this.formMyCheck.radioSp == '终止') {
this.checkCancel()
} else if (this.formMyCheck.radioSp == '通过') {
this.checkOk()
}
this.footerStatu = 3
},
l(key) {
key = 'OrderDataReview' + '.' + key
return this.$t(key)
}
},
watch: {}
}
</script>
...@@ -167,7 +167,7 @@ export default { ...@@ -167,7 +167,7 @@ export default {
{ {
attrs: { attrs: {
oprate: "detail", oprate: "detail",
title: this.tabIndex == 2? "审核": "查看" title: this.tabIndex == 2 ? "审核" : "查看"
}, },
on: { on: {
click: () => { click: () => {
...@@ -294,6 +294,9 @@ export default { ...@@ -294,6 +294,9 @@ export default {
case "bd2cb81a-d955-4b68-ae67-bcf7f92e8cb8": //切片文件审批 case "bd2cb81a-d955-4b68-ae67-bcf7f92e8cb8": //切片文件审批
types = 12; types = 12;
break; break;
case "b6303ddc-8b5e-40a3-a51b-294657d1d913": //物料审批
types = 13;
break;
default: default:
types = 1; types = 1;
break; break;
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> --> <!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile> <InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input> <Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName" :value="li.unitName" code="material.main.unitName" type="tag"></state> <state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="24"> <!-- <Col :span="24">
......
...@@ -2,23 +2,18 @@ ...@@ -2,23 +2,18 @@
<div> <div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col :span="12"> <!-- <Col :span="12">
<FormItem label="编码" prop="code"> <FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input> <Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem> </FormItem>
</Col> </Col>-->
<Col :span="12"> <Col :span="12">
<FormItem label="名称" prop="name"> <FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input> <Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <!-- <Col :span="12">
<FormItem <FormItem label="状态" prop="status" placeholder="请选择">
label="状态"
prop="status"
placeholder="请选择"
v-if="entity.status==3||entity.status==2"
>
<Dictionary <Dictionary
code="material.main.status" code="material.main.status"
v-model="entity.status" v-model="entity.status"
...@@ -27,7 +22,7 @@ ...@@ -27,7 +22,7 @@
:key="entity.status" :key="entity.status"
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
</Col> </Col>-->
<Col :span="12"> <Col :span="12">
<FormItem label="版本" prop="version"> <FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input> <Input v-model="entity.version" placeholder="请输入"></Input>
...@@ -52,9 +47,9 @@ ...@@ -52,9 +47,9 @@
class="w100" class="w100"
></InputNumber> ></InputNumber>
<Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary> <Dictionary v-if="li.dataType==3" v-model="entity[li.field]" :code="li.note"></Dictionary>
<Input v-if="li.dataType==4" v-model="entity[li.filed]"></Input> <Input v-if="li.dataType==5" type="textarea" v-model="entity[li.filed]"></Input>
<DatePicker <DatePicker
v-if="li.dataType==5" v-if="li.dataType==4"
v-model="entity[li.field]" v-model="entity[li.field]"
type="date" type="date"
:placeholder="'选择'+li.title" :placeholder="'选择'+li.title"
...@@ -63,6 +58,7 @@ ...@@ -63,6 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> --> <!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile> <InputFile v-if="li.dataType==7" v-model="entity[li.field]"></InputFile>
<Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input> <Input v-if="li.dataType==8" type="textarea" v-model="entity[li.field]"></Input>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem> </FormItem>
</Col> </Col>
<!-- <Col :span="24"> <!-- <Col :span="24">
......
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.send(params.row) } on: { click: () => this.send(params.row) }
}, },
"送审" params.row.status == 0 || params.row.status == 1 ? "送审" : ""
) )
]); ]);
} }
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
initCols() { initCols(delay) {
let conditions = [ let conditions = [
{ {
conditionalType: "Equal", conditionalType: "Equal",
...@@ -252,6 +252,7 @@ export default { ...@@ -252,6 +252,7 @@ export default {
}); });
this.cols = this.$u.clone(this.columns); this.cols = this.$u.clone(this.columns);
let extra = items.map(u => { let extra = items.map(u => {
// console.log(u);
var col = { var col = {
key: u.field, key: u.field,
title: u.title title: u.title
...@@ -259,20 +260,29 @@ export default { ...@@ -259,20 +260,29 @@ export default {
if (u.dataType == 3) { if (u.dataType == 3) {
col.code = u.note; col.code = u.note;
} }
if(u.unitName){ if (u.dataType == 4) {
var units= this.$store.getters.dictionaryByKey("material.main.unitName"); col.type = 'date';
}
if (u.unitName&&(u.dataType==1||u.dataType==2)) {
var units = this.$store.getters.dictionaryByKey(
"material.main.unitName"
);
let item=units.filter(p=>{ let item = units.filter(p => {
return p.code==u.unitName; return p.code == u.unitName;
}) });
console.log(units,item) // console.log(units, item);
col.title+="("+item[0].name+")"; col.title += "(" + item[0].name + ")";
} }
return col; return col;
}); });
this.cols = this.cols.concat(extra); this.cols = this.cols.concat(extra);
var action = this.cols.splice(this.columns.length - 1, 1); var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length - 1]); this.cols.push(this.columns[this.columns.length - 1]);
if(delay){
delay();
}
// console.log(this.cols)
} }
}); });
}, },
...@@ -339,12 +349,14 @@ export default { ...@@ -339,12 +349,14 @@ export default {
handler(newName, oldName) { handler(newName, oldName) {
console.log("ovo", newName, oldName); console.log("ovo", newName, oldName);
if (newName.rootCategoryId) { if (newName.rootCategoryId) {
this.initCols(); this.initCols(()=>{
}
if (newName.categoryId) { if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids; this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
} else { }
});
}
if (!newName.categoryId) {
this.easySearch.categoryId.value = "-1"; this.easySearch.categoryId.value = "-1";
} }
}, },
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
<div v-else-if="li.dataType==8">{{entity[li.field]}}</div> <div v-else-if="li.dataType==8">{{entity[li.field]}}</div>
<div v-else-if="li.dataType==5" v-html="entity[li.field]"></div> <div v-else-if="li.dataType==5" v-html="entity[li.field]"></div>
<span v-else>{{entity[li.field]}}</span> <span v-else>{{entity[li.field]}}</span>
<span v-if="li.unitName" v-text="li.unitName" class="ml10"></span> <State v-if="li.unitName" :code="li.note" :value="entity[li.field]" />
<!-- <span v-if="li.unitName" v-text="li.unitName" class="ml10"></span> -->
</Filed> </Filed>
</Row> </Row>
</div> </div>
...@@ -277,7 +278,7 @@ export default { ...@@ -277,7 +278,7 @@ export default {
.replace("]", "") .replace("]", "")
.replace(/\"/g, ""); .replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview"; this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定物料 " + metCodesStr + "?"; this.metCodesStrTxt = "确定送审此物料 " + metCodesStr + "?";
this.ModalInfo = true; this.ModalInfo = true;
}, },
modalInfoOk() { modalInfoOk() {
......
...@@ -56,6 +56,11 @@ ...@@ -56,6 +56,11 @@
<a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}"> <a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 数据填报 <img src="@/assets/imgicon/execute/ex09.png" alt /> 数据填报
</a> </a>
</li>
<li>
<a @click="gnFunto(10,'质量检验')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 质量检验
</a>
</li> </li>
<li> <li>
<a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"> <a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}">
......
<template>
<h2>数据检验</h2>
</template>
<script>
export default {
name: '',
data() {
return {
}
}
}
</script>
<style lang="" scoped>
</style>
\ No newline at end of file
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
this.datafrom.fill_in_user_type = fill_in_user_type; this.datafrom.fill_in_user_type = fill_in_user_type;
this.datafrom.data_type = 4; this.datafrom.data_type = 4;
this.ids = []; this.ids = [];
console.log(params);
if ( if (
fill_in_user_type == 1 && //自检 fill_in_user_type == 1 && //自检
params.selfchecklist != null && params.selfchecklist != null &&
...@@ -151,9 +151,9 @@ export default { ...@@ -151,9 +151,9 @@ export default {
: params.seizurechecklist.record_id; : params.seizurechecklist.record_id;
} }
this.datafrom.product_code = product_code.join(","); this.datafrom.product_code = product_code;
// this.datafrom.board_code = board_code // this.datafrom.board_code = board_code
alert(2)
this.loaddata(); this.loaddata();
}, },
loaddata() { loaddata() {
...@@ -204,14 +204,20 @@ alert(2) ...@@ -204,14 +204,20 @@ alert(2)
this.moviedata.push(row); this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1; this.editIndex = this.moviedata.length - 1;
} else { } else {
let lastindex = this.moviedata.length - 1; let lastindex = this.moviedata.length - 1;
if(lastindex<0)
{
lastindex=0;
}
this.data_content1 = this.moviedata[lastindex].data_content1; this.data_content1 = this.moviedata[lastindex].data_content1;
this.data_content2 = this.moviedata[lastindex].data_content2; this.data_content2 = this.moviedata[lastindex].data_content2;
this.data_content3 = this.moviedata[lastindex].data_content3; this.data_content3 = this.moviedata[lastindex].data_content3;
this.editIndex = lastindex; this.editIndex = lastindex;
} }
this.datafrom.product_code = this.datafrom.product_code.join(",");
}, },
handleEdit(row, index) { handleEdit(row, index) {
this.data_content1 = row.data_content1; this.data_content1 = row.data_content1;
......
...@@ -4,29 +4,30 @@ ...@@ -4,29 +4,30 @@
<div class="data-title flex"> <div class="data-title flex">
<div class="fg"> <div class="fg">
<span class="ml20">产品号</span> <span class="ml20">产品号</span>
<ProductNumberSelect
v-model="product_ID" <Select
:eid="row.orderId"
ref="codes"
@on-change="change"
:multiple="false" :multiple="false"
class="select-produt-name" class="select-produt-name"
/> @on-change="productonchange"
</div> v-model="product_ID"
>
<!-- <template v-if="datasearch.isMain!=1"> <!-- <Option value="" class="option_text">请选择</Option> -->
<span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200">
<Option <Option
v-for="item in board_List" v-for="item in product_List"
:value="item.boardNumber" :value="item.productids"
:key="item.index" :key="item.index"
>{{ item.boardNumber }}</Option> >{{ item.productcodes }}</Option>
</Select> </Select>
</template>--> </div>
<div class="tr"> <div class="tr">
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button> <Button type="primary" :disabled="ishavself" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button> <Button
type="primary"
:disabled="ishavhj"
@click="QcCardChecker(2)"
class="title_btn ml10"
>互检</Button>
<Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button> <Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button <Button
type="primary" type="primary"
...@@ -35,12 +36,12 @@ ...@@ -35,12 +36,12 @@
class="title_btn ml10" class="title_btn ml10"
>送检记录</Button> >送检记录</Button>
</div> </div>
</div> </div>
<div class="table-i"> <div class="table-i">
<Table border :columns="columns12" :data="recorddata"> <Table border :columns="columns12" :data="recorddata">
<!-- 自检 --> <!-- 自检 -->
<template slot-scope="{ row,index }" slot="selffillin"> <template slot-scope="{ row,index }" slot="selffillin">
<template v-if="row.inspect_type.split(',').indexOf('1')>-1">
<template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4"> <template v-if="row.selfchecklist.fillinstatus==0||productobj.productstatus==4">
<Checkbox <Checkbox
v-model="row.selfchecklist.checkstatus" v-model="row.selfchecklist.checkstatus"
...@@ -80,9 +81,10 @@ ...@@ -80,9 +81,10 @@
</template> </template>
</template> </template>
</template> </template>
</template>
<!--互检--> <!--互检-->
<template slot-scope="{ row,index }" slot="mutualfillin"> <template slot-scope="{ row,index }" slot="mutualfillin">
<template v-if="row.check_type==2||row.check_type==4"> <template v-if="row.inspect_type.split(',').indexOf('2')>-1">
<!--未填报--> <!--未填报-->
<template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4"> <template v-if="row.mutualchecklist.fillinstatus==0||productobj.productstatus==4">
<!--自检完成--> <!--自检完成-->
...@@ -129,7 +131,7 @@ ...@@ -129,7 +131,7 @@
</template> </template>
<!-- 检验员 --> <!-- 检验员 -->
<template slot-scope="{ row,index }" slot="seizurefillin"> <template slot-scope="{ row,index }" slot="seizurefillin">
<template v-if="row.check_type==3||row.check_type==4"> <template v-if="row.inspect_type.split(',').indexOf('3')>-1">
<template v-if="row.seizurechecklist.fillinstatus==1"> <template v-if="row.seizurechecklist.fillinstatus==1">
<template <template
v-if="row.fillintype == 1" v-if="row.fillintype == 1"
...@@ -236,9 +238,11 @@ export default { ...@@ -236,9 +238,11 @@ export default {
}, },
data() { data() {
return { return {
product_List: [],
product_ID: "", product_ID: "",
disabled: false, disabled: false,
ishavhj: false, ishavself: true,
ishavhj: true,
ishavzj: true, ishavzj: true,
board_ID: "", board_ID: "",
board_List: [], board_List: [],
...@@ -386,6 +390,13 @@ export default { ...@@ -386,6 +390,13 @@ export default {
}; };
}, },
created() { created() {
this.entryModel.executeId=this.row.executeId;
this.entryModel.order_id=this.row.order_id;
this.entryModel.id=this.row.id;
this.entryModel.routingHeaderId=this.row.headid;
this.entryModel.routingDetailId=this.row.routingdetailId;
this.entryModel.isMain=1;
this.datasearch.entryID = this.row.id; this.datasearch.entryID = this.row.id;
this.datasearch.isMain = 1; this.datasearch.isMain = 1;
this.datasearch.productcode = this.datasearch.productcode; this.datasearch.productcode = this.datasearch.productcode;
...@@ -396,40 +407,60 @@ export default { ...@@ -396,40 +407,60 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
this.loaddata(); this.loadproduct();
}, },
methods: { methods: {
loaddata() { loaddata() {
// if ( var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist`;
// this.datasearch.productcode == '' ||
// typeof this.datasearch.productcode == 'undefined'
// ) {
// return
// }
var url = `${PlanUrl}/orderexecutequalityrecord/getentryqcrecordlist_new`;
service.get(url, this.datasearch).then(response => { service.get(url, this.datasearch).then(response => {
this.recorddata = response.result; this.recorddata = response.result;
let gh = this.recorddata.filter(function(obj) { this.ishavself = true;
return obj.check_type === 2;
});
if (gh != null && gh.length > 0) {
this.ishavhj = false;
} else {
this.ishavhj = true; this.ishavhj = true;
} this.ishavzj = true;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
let gh1 = this.recorddata.filter(function(obj) { let checktypes = obj.inspect_type.split(",");
return obj.check_type === 3 || obj.check_type === 4; if (checktypes.indexOf("1") > -1) {
}); this.ishavself = false;
if (gh1 != null && gh1.length > 0) { }
if (checktypes.indexOf("2") > -1) {
this.ishavhj = false;
}
if (checktypes.indexOf("3") > -1) {
this.ishavzj = false; this.ishavzj = false;
} else { }
this.ishavzj = true;
} }
}); });
}, },
change(v) { loadproduct() {
let entry = {
dispatch_id: this.row.id,
execute_id: this.row.executeId,
order_id: this.row.orderId,
routingHeaderId: this.row.headid,
routingDetailId: this.row.routingdetailId
};
var url = `${PlanUrl}/orderexecutequalityrecord/getentryproductcode`;
service.get(url, entry).then(response => {
this.product_List = response.result;
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i];
if (obj.productstatus == 1 || obj.productstatus == 2) {
this.datasearch.productcode = obj.productids;
this.product_ID = obj.productids;
this.productobj = obj;
break;
}
}
this.loaddata();
});
},
productonchange(v) {
this.datasearch.productcode = v; this.datasearch.productcode = v;
this.loaddata(); this.loaddata();
}, },
...@@ -474,57 +505,7 @@ export default { ...@@ -474,57 +505,7 @@ export default {
} }
} }
}, },
// loadproduct() {
// var url =
// `${PlanUrl}/orderexecutequalityrecord/getentryproductcode?entryID=` +
// this.datasearch.entryID;
// service.get(`${url}`).then(response => {
// this.product_List = response.result;
// this.board_List = response.result;
// for (let i = 0; i < this.product_List.length; i++) {
// let obj = this.product_List[i];
// if (obj.productstatus == 1 || obj.productstatus == 2) {
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// break;
// }
// if (
// this.productobj == null ||
// this.datasearch.productcode == "" ||
// typeof this.datasearch.productcode == "undefined"
// ) {
// let obj = this.product_List[0];
// if (this.datasearch.isMain == 1) {
// this.datasearch.productcode = obj.productids;
// this.product_ID = obj.productids;
// this.disabled = false;
// } else {
// this.datasearch.productcode = obj.boardNumber;
// // this.board_ID = obj.boardNumber;
// this.product_ID = obj.productids;
// this.disabled = true;
// }
// this.productobj = obj;
// }
// }
// this.loaddata();
// });
// },
showPhoto(params, isedit) { showPhoto(params, isedit) {
this.entryrecordmovieModal = true; this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage( this.$refs.entryrecordMovie.loadpage(
...@@ -536,7 +517,8 @@ export default { ...@@ -536,7 +517,8 @@ export default {
}, },
ok() { ok() {
this.usercardModal = false; this.usercardModal = false;
this.loaddata(); this.loadproduct();
// this.loaddata();
}, },
bindPhotoid(qc_card_id, content) { bindPhotoid(qc_card_id, content) {
for (let i = 0; i < this.recorddata.length; i++) { for (let i = 0; i < this.recorddata.length; i++) {
...@@ -548,7 +530,7 @@ export default { ...@@ -548,7 +530,7 @@ export default {
}, },
handleselfCheckAll() { handleselfCheckAll() {
this.isselfCheckAll = !this.isselfCheckAll; this.isselfCheckAll = !this.isselfCheckAll;
console.log(this.recorddata);
for (let i = 0; i < this.recorddata.length; i++) { for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i]; let obj = this.recorddata[i];
if (obj.fillintype == 1) { if (obj.fillintype == 1) {
...@@ -597,32 +579,37 @@ export default { ...@@ -597,32 +579,37 @@ export default {
// this.entity.productQuantity = e.length + '' // this.entity.productQuantity = e.length + ''
// }, // },
QcCardChecker(fill_in_user_type) { QcCardChecker(fill_in_user_type) {
// console.log(this.$refs.codes.dic); this.$refs.usercard.product_List = this.product_List;
this.$refs.usercard.product_List = this.$refs.codes.dic;
this.usercardModal = true;
let fillModel = { let fillModel = {
fill_in_user_type: fill_in_user_type, //自检,互检 fill_in_user_type: fill_in_user_type, //自检,互检
// productisabled: this.productisabled, // productisabled: this.productisabled,
product_ID: this.product_ID, product_ID: this.product_ID,
// board_ID: this.board_ID, // board_ID: this.board_ID,
product_List: this.$refs.codes.dic product_List: this.product_List
// board_List: this.board_List // board_List: this.board_List
}; };
let recordList = []; let recordList = [];
for (let i = 0; i < this.recorddata.length; i++) { for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i]; let obj = this.recorddata[i];
console.log(obj);
let checktypes = obj.inspect_type.split(",");
if (fill_in_user_type == 1) { if (fill_in_user_type == 1) {
//自检 //自检
if (checktypes.indexOf("1") > -1) {
// && // &&
// obj.selfchecklist != null && // obj.selfchecklist != null &&
// obj.selfchecklist.fill_in_content != null && // obj.selfchecklist.fill_in_content != null &&
// obj.selfchecklist.fill_in_content != "" // obj.selfchecklist.fill_in_content != ""
if ( if (
obj.selfchecklist.fillinstatus == "0" || ( obj.selfchecklist != null &&
obj.selfchecklist.fill_in_content != null &&
obj.selfchecklist.fill_in_content != ""&&
obj.selfchecklist.fillinstatus == "0") ||
this.productobj.productstatus == 4 //打回重写填报 this.productobj.productstatus == 4 //打回重写填报
) { ) {
let qc = { let qc = {
...@@ -635,9 +622,11 @@ export default { ...@@ -635,9 +622,11 @@ export default {
}; };
recordList.push(qc); recordList.push(qc);
} }
}
} else if (fill_in_user_type == 2) { } else if (fill_in_user_type == 2) {
//互检 //互检
if (obj.check_type == 2 || obj.check_type == 3) {
if (checktypes.indexOf("2") > -1) {
//是否需要互检,2和3需要互检和专检 inspect_type //是否需要互检,2和3需要互检和专检 inspect_type
if ( if (
(obj.mutualchecklist.fillinstatus == "0" && (obj.mutualchecklist.fillinstatus == "0" &&
...@@ -657,7 +646,7 @@ export default { ...@@ -657,7 +646,7 @@ export default {
recordList.push(qc); recordList.push(qc);
} }
} }
} else if (inspect_type == 3) { } else if (fill_in_user_type == 3) {
} }
} }
...@@ -665,7 +654,7 @@ export default { ...@@ -665,7 +654,7 @@ export default {
this.$Message.success("填报项为空,请进行填报"); this.$Message.success("填报项为空,请进行填报");
return; return;
} }
this.usercardModal = true;
this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList); this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList);
}, },
selfchecklistcheck(index, e) { selfchecklistcheck(index, e) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<span class="ml20">产品号</span> <span class="ml20">产品号</span>
<Select <Select
:disabled="disabled"
multiple multiple
@on-change="productonchange" @on-change="productonchange"
v-model="product_ID" v-model="product_ID"
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
}, },
handleClose() {}, handleClose() {},
loadentry(entryModel) { loadentry(entryModel) {
this.user.dispatch_id = entryModel.id this.user.dispatch_id = entryModel.id
this.user.execute_id = entryModel.executeId this.user.execute_id = entryModel.executeId
this.user.order_id = entryModel.order_id this.user.order_id = entryModel.order_id
...@@ -128,14 +129,11 @@ export default { ...@@ -128,14 +129,11 @@ export default {
this.user.routingDetailId = entryModel.routingDetailId this.user.routingDetailId = entryModel.routingDetailId
this.isMain = entryModel.isMain this.isMain = entryModel.isMain
if (this.isMain == 1) {
this.disabled = false this.checker = [];
} else { this.product_ID = [];
this.disabled = true this.loadproduct();
} this.loaduser();
this.checker = []
;(this.product_ID = []), (this.board_ID = []), this.loadproduct()
this.loaduser()
}, },
loadproduct() { loadproduct() {
var url = var url =
...@@ -144,7 +142,7 @@ export default { ...@@ -144,7 +142,7 @@ export default {
service.post(`${url}`).then((response) => { service.post(`${url}`).then((response) => {
this.product_List = response.result this.product_List = response.result
this.board_List = response.result
}) })
}, },
loaduser() { loaduser() {
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
<Select multiple @on-change="productonchange" v-model="product_ID" class="w200"> <Select multiple @on-change="productonchange" v-model="product_ID" class="w200">
<Option <Option
v-for="item in product_List" v-for="item in product_List"
:value="item.value" :value="item.productids"
:key="item.index" :key="item.index"
>{{ item.label }}</Option> >{{ item.productcodes }}</Option>
</Select> </Select>
</Col> </Col>
</Row> </Row>
...@@ -152,29 +152,26 @@ export default { ...@@ -152,29 +152,26 @@ export default {
this.product_ID = []; this.product_ID = [];
// this.board_ID = []; // this.board_ID = [];
this.productisabled = fillModel.productisabled; this.productisabled = fillModel.productisabled;
this.product_List = fillModel.product_List;
console.log(this.product_List);
// if (this.isMain == 1) {
// this.productdisabled = false;
// } else {
// this.productdisabled = true;
// }
this.product_ID.push(fillModel.product_ID); this.product_ID.push(fillModel.product_ID);
alert(this.product_ID);
// this.board_ID.push(fillModel.board_ID);
if ( if (
fillModel.fill_in_user_type == 1 || fillModel.fill_in_user_type == 1 ||
fillModel.fill_in_user_type == 3 fillModel.fill_in_user_type == 3
) { ) {
this.board_List = fillModel.board_List; //自检或专检取全部产品
this.product_List = fillModel.product_List;
} else { } else {
this.board_List = []; //互检只取待互检和打回的
this.product_List = []; this.product_List = [];
for (let i = 0; i < fillModel.product_List.length; i++) { for (let i = 0; i < fillModel.product_List.length; i++) {
let obj = fillModel.product_List[i]; let obj = fillModel.product_List[i];
if (obj.productstatus == 2 || obj.productstatus == 4) { if (obj.productstatus == 2 || obj.productstatus == 4) {
this.board_List.push(obj);
this.product_List.push(obj); this.product_List.push(obj);
} }
} }
...@@ -185,8 +182,8 @@ export default { ...@@ -185,8 +182,8 @@ export default {
if (e) { if (e) {
this.product_ID = []; this.product_ID = [];
for (let i = 0; i < this.product_List.length; i++) { for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i]; let obj = this.product_List[i]
this.product_ID.push(obj.value); this.product_ID.push(obj.productids)
} }
} else { } else {
this.product_ID = []; this.product_ID = [];
...@@ -197,7 +194,7 @@ export default { ...@@ -197,7 +194,7 @@ export default {
getCurrentUser(e) { getCurrentUser(e) {
if (e) { if (e) {
console.log(this.$store.state.admin.user.info); //console.log(this.$store.state.admin.user.info);
let userInfo = this.$store.state.admin.user.info; let userInfo = this.$store.state.admin.user.info;
this.user.cardno = userInfo.cardNo; this.user.cardno = userInfo.cardNo;
......
...@@ -81,6 +81,10 @@ export default { ...@@ -81,6 +81,10 @@ export default {
row.id = this.$route.query.id; row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId; row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId; row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid;
row.routingdetailId=this.$route.query.routid;
this.row = row; this.row = row;
this.inputId = this.$route.query.id; this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index"); this.detail = () => import("./starOrder/index");
...@@ -136,6 +140,9 @@ export default { ...@@ -136,6 +140,9 @@ export default {
if (number == 8) { if (number == 8) {
this.detail = () => import("./datafilling/index"); this.detail = () => import("./datafilling/index");
} //数据填报 } //数据填报
if (number == 10) {
this.detail = () => import("./datafilling/check");
} //质量检验
if (number == 9) { if (number == 9) {
this.$Message.info("尊敬的用户,您没有该权限!"); this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./testdata/index"); // this.detail = () => import("./testdata/index");
......
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