Commit 8372cf81 authored by kangzhenfei's avatar kangzhenfei

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

parents 707b74cb 11b4138f
<template>
<div>
<span v-if="type=='date'">
<span>
<Tooltip :content="value">
{{value.substr(0,10)}}
{{date}}
</Tooltip>
</span>
<span v-else>{{value.substr(0,19)}}</span>
</div>
</template>
<script>
export default {
name: 'dtSpan',
data() {
return {
date:""
}
},
props: {
......@@ -25,10 +24,22 @@ export default {
default: '2001-01-01 00:00:00'
},
},
created() {},
created() {
this.init()
},
methods: {
init(){
if(this.value&&this.value.length>=19){
this.date=this.value.substr(0,this.type=='date'?10:19)
}
return this.date;
}
},
computed: {},
watch: {}
watch: {
value(){
this.init()
}
}
}
</script>
\ No newline at end of file
......@@ -48,7 +48,7 @@
"vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3",
"vue-slider-component": "^3.1.5",
"vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2",
......
......@@ -27,5 +27,7 @@ export default {
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 {
{
attrs: {
oprate: "detail",
title: this.tabIndex == 2? "审核": "查看"
title: this.tabIndex == 2 ? "审核" : "查看"
},
on: {
click: () => {
......@@ -294,6 +294,9 @@ export default {
case "bd2cb81a-d955-4b68-ae67-bcf7f92e8cb8": //切片文件审批
types = 12;
break;
case "b6303ddc-8b5e-40a3-a51b-294657d1d913": //物料审批
types = 13;
break;
default:
types = 1;
break;
......
......@@ -58,7 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<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>
<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>
</Col>
<!-- <Col :span="24">
......
......@@ -2,23 +2,18 @@
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row>
<Col :span="12">
<!-- <Col :span="12">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" placeholder="请输入" disabled></Input>
</FormItem>
</Col>
</Col>-->
<Col :span="12">
<FormItem label="名称" prop="name">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem
label="状态"
prop="status"
placeholder="请选择"
v-if="entity.status==3||entity.status==2"
>
<!-- <Col :span="12">
<FormItem label="状态" prop="status" placeholder="请选择">
<Dictionary
code="material.main.status"
v-model="entity.status"
......@@ -27,7 +22,7 @@
:key="entity.status"
></Dictionary>
</FormItem>
</Col>
</Col>-->
<Col :span="12">
<FormItem label="版本" prop="version">
<Input v-model="entity.version" placeholder="请输入"></Input>
......@@ -52,9 +47,9 @@
class="w100"
></InputNumber>
<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
v-if="li.dataType==5"
v-if="li.dataType==4"
v-model="entity[li.field]"
type="date"
:placeholder="'选择'+li.title"
......@@ -63,6 +58,7 @@
<!-- <files ref="refFile" :parms="parms" fileFormat :Photos="true" @clickItem="clickData" /> -->
<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>
<state v-if="li.unitName&&(li.dataType==1||li.dataType==2)" :value="li.unitName" code="material.main.unitName" type="tag"></state>
</FormItem>
</Col>
<!-- <Col :span="24">
......
......@@ -182,7 +182,7 @@ export default {
attrs: { oprate: "edit" },
on: { click: () => this.send(params.row) }
},
"送审"
params.row.status == 0 || params.row.status == 1 ? "送审" : ""
)
]);
}
......@@ -228,7 +228,7 @@ export default {
search() {
this.$refs.grid.reload(this.easySearch);
},
initCols() {
initCols(delay) {
let conditions = [
{
conditionalType: "Equal",
......@@ -252,6 +252,7 @@ export default {
});
this.cols = this.$u.clone(this.columns);
let extra = items.map(u => {
// console.log(u);
var col = {
key: u.field,
title: u.title
......@@ -259,23 +260,32 @@ export default {
if (u.dataType == 3) {
col.code = u.note;
}
if(u.unitName){
var units= this.$store.getters.dictionaryByKey("material.main.unitName");
let item=units.filter(p=>{
return p.code==u.unitName;
})
console.log(units,item)
col.title+="("+item[0].name+")";
if (u.dataType == 4) {
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 => {
return p.code == u.unitName;
});
// console.log(units, item);
col.title += "(" + item[0].name + ")";
}
return col;
});
this.cols = this.cols.concat(extra);
var action = this.cols.splice(this.columns.length - 1, 1);
this.cols.push(this.columns[this.columns.length - 1]);
if(delay){
delay();
}
// console.log(this.cols)
}
});
},
},
add() {
if (this.nodeInfo.categoryId) {
if (this.nodeInfo.addChange == true) {
......@@ -339,12 +349,14 @@ export default {
handler(newName, oldName) {
console.log("ovo", newName, oldName);
if (newName.rootCategoryId) {
this.initCols();
this.initCols(()=>{
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
}
});
}
if (newName.categoryId) {
this.easySearch.categoryId.value = newName.ids;
this.$refs.grid.reload(this.easySearch);
} else {
if (!newName.categoryId) {
this.easySearch.categoryId.value = "-1";
}
},
......
......@@ -18,7 +18,8 @@
<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>
<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>
</Row>
</div>
......@@ -277,7 +278,7 @@ export default {
.replace("]", "")
.replace(/\"/g, "");
this.ModalInfoStaut = "orderSendReview";
this.metCodesStrTxt = "确定物料 " + metCodesStr + "?";
this.metCodesStrTxt = "确定送审此物料 " + metCodesStr + "?";
this.ModalInfo = true;
},
modalInfoOk() {
......
......@@ -56,6 +56,11 @@
<a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 数据填报
</a>
</li>
<li>
<a @click="gnFunto(10,'质量检验')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 质量检验
</a>
</li>
<li>
<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 {
this.datafrom.fill_in_user_type = fill_in_user_type;
this.datafrom.data_type = 4;
this.ids = [];
console.log(params);
if (
fill_in_user_type == 1 && //自检
params.selfchecklist != null &&
......@@ -151,9 +151,9 @@ export default {
: params.seizurechecklist.record_id;
}
this.datafrom.product_code = product_code.join(",");
this.datafrom.product_code = product_code;
// this.datafrom.board_code = board_code
alert(2)
this.loaddata();
},
loaddata() {
......@@ -204,14 +204,20 @@ alert(2)
this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1;
} else {
let lastindex = this.moviedata.length - 1;
if(lastindex<0)
{
lastindex=0;
}
this.data_content1 = this.moviedata[lastindex].data_content1;
this.data_content2 = this.moviedata[lastindex].data_content2;
this.data_content3 = this.moviedata[lastindex].data_content3;
this.editIndex = lastindex;
}
this.datafrom.product_code = this.datafrom.product_code.join(",");
},
handleEdit(row, index) {
this.data_content1 = row.data_content1;
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
<span class="ml20">产品号</span>
<Select
:disabled="disabled"
multiple
@on-change="productonchange"
v-model="product_ID"
......@@ -121,6 +121,7 @@ export default {
},
handleClose() {},
loadentry(entryModel) {
this.user.dispatch_id = entryModel.id
this.user.execute_id = entryModel.executeId
this.user.order_id = entryModel.order_id
......@@ -128,14 +129,11 @@ export default {
this.user.routingDetailId = entryModel.routingDetailId
this.isMain = entryModel.isMain
if (this.isMain == 1) {
this.disabled = false
} else {
this.disabled = true
}
this.checker = []
;(this.product_ID = []), (this.board_ID = []), this.loadproduct()
this.loaduser()
this.checker = [];
this.product_ID = [];
this.loadproduct();
this.loaduser();
},
loadproduct() {
var url =
......@@ -144,7 +142,7 @@ export default {
service.post(`${url}`).then((response) => {
this.product_List = response.result
this.board_List = response.result
})
},
loaduser() {
......
......@@ -7,9 +7,9 @@
<Select multiple @on-change="productonchange" v-model="product_ID" class="w200">
<Option
v-for="item in product_List"
:value="item.value"
:value="item.productids"
:key="item.index"
>{{ item.label }}</Option>
>{{ item.productcodes }}</Option>
</Select>
</Col>
</Row>
......@@ -152,29 +152,26 @@ export default {
this.product_ID = [];
// this.board_ID = [];
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);
alert(this.product_ID);
// this.board_ID.push(fillModel.board_ID);
if (
fillModel.fill_in_user_type == 1 ||
fillModel.fill_in_user_type == 3
) {
this.board_List = fillModel.board_List;
//自检或专检取全部产品
this.product_List = fillModel.product_List;
} else {
this.board_List = [];
//互检只取待互检和打回的
this.product_List = [];
for (let i = 0; i < fillModel.product_List.length; i++) {
let obj = fillModel.product_List[i];
if (obj.productstatus == 2 || obj.productstatus == 4) {
this.board_List.push(obj);
this.product_List.push(obj);
}
}
......@@ -185,8 +182,8 @@ export default {
if (e) {
this.product_ID = [];
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i];
this.product_ID.push(obj.value);
let obj = this.product_List[i]
this.product_ID.push(obj.productids)
}
} else {
this.product_ID = [];
......@@ -197,7 +194,7 @@ export default {
getCurrentUser(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;
this.user.cardno = userInfo.cardNo;
......
......@@ -81,6 +81,10 @@ export default {
row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid;
row.routingdetailId=this.$route.query.routid;
this.row = row;
this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index");
......@@ -136,6 +140,9 @@ export default {
if (number == 8) {
this.detail = () => import("./datafilling/index");
} //数据填报
if (number == 10) {
this.detail = () => import("./datafilling/check");
} //质量检验
if (number == 9) {
this.$Message.info("尊敬的用户,您没有该权限!");
// 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