Commit 79d34cd5 authored by 康振飞's avatar 康振飞

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

parents 0b43b02c 271c9c1d
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
<script> <script>
export default { export default {
model: { model: {
prop: 'value', prop: "value",
event: 'on-change' event: "on-change"
}, },
data() { data() {
return { return {
...@@ -24,15 +24,17 @@ export default { ...@@ -24,15 +24,17 @@ export default {
orderId: null, orderId: null,
isCodeIds: [], isCodeIds: [],
codeIds: [] codeIds: []
} };
},
created() {
this.getCodes();
}, },
created() {},
props: { props: {
eid: Number, eid: Number,
value: [String, Number, Array], value: [String, Number, Array],
placeholder: { placeholder: {
type: String, type: String,
default: '请选择产品编号' default: "请选择产品编号"
}, },
multiple: { multiple: {
type: Boolean, type: Boolean,
...@@ -41,71 +43,73 @@ export default { ...@@ -41,71 +43,73 @@ export default {
}, },
methods: { methods: {
change(event) { change(event) {
this.$emit('on-change', event)
this.codeIds = []; this.codeIds = [];
for (let index = 0; index < event.length; index++) { for (let index = 0; index < event.length; index++) {
this.data.forEach((e) => { this.data.forEach(e => {
if (event[index] == e.prefix + e.code) { if (event[index] == e.code) {
this.codeIds.push(e.id) this.codeIds.push(e.id);
} }
}) });
} }
this.$emit("on-change", event);
}, },
getCodes(e) { getCodes(e) {
let url = `${PlanUrl}/orderproductcode/getbyorderid` let url = `${PlanUrl}/orderproductcode/getbyorderid`;
if (this.eid) { if (this.eid) {
this.$api.get(url, { id: this.eid }).then((r) => { this.$api.get(url, { id: this.eid }).then(r => {
if (r.success) { if (r.success) {
this.data = r.result this.data = r.result;
this.orderId = r.result[0].orderId this.orderId = r.result[0].orderId;
} }
}) });
} }
}, },
//获取所有的选中项 //获取所有的选中项
getSelectItems() { getSelectItems() {
var items = [] var items = [];
this.value.forEach((v) => { this.value.forEach(v => {
var item = this.dic.filter((u) => u.value == v) var item = this.dic.filter(u => u.value == v);
if (item && item[0]) { if (item && item[0]) {
items.push(item[0]) items.push(item[0]);
} }
}) });
return items return items;
}, },
//获取所有选中项的名称 //获取所有选中项的名称
getSelectNames() { getSelectNames() {
var names = [] var names = [];
this.getSelectItems().forEach((v) => { this.getSelectItems().forEach(v => {
names.push(v.label) names.push(v.label);
}) });
return names return names;
} }
}, },
computed: { computed: {
dic() { dic() {
let result = [] let result = [];
this.data.forEach((u) => { this.data.forEach(u => {
result.push({ result.push({
value: u.prefix + u.code, value: u.code,
label: u.prefix + u.code label: u.code
}) // value: u.prefix + u.code,
}) // label: u.prefix + u.code
return result });
});
return result;
} }
}, },
watch: { watch: {
value: { value: {
handler(v, o) { handler(v, o) {
this.name = v this.name = v;
}, },
deep: true deep: true
}, },
eid(e) { eid(e) {
if (e) { if (e) {
this.getCodes(e) this.getCodes(e);
} }
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -7,4 +7,9 @@ export default { ...@@ -7,4 +7,9 @@ export default {
getCardList(params) { getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params); return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
}, },
//过程质量填报表
getentryqcrecordlist_new(params) {
return Api.get(`${PlanUrl}orderexecutequalityrecord/getentryqcrecordlist_new`, params);
},
} }
...@@ -11,43 +11,75 @@ ...@@ -11,43 +11,75 @@
<li><a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}"><Icon type="ios-paper" /> 工艺案例</a></li> <li><a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}"><Icon type="ios-paper" /> 工艺案例</a></li>
<li><a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}"><Icon type="ios-medal" /> 质量判定</a></li> <li><a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}"><Icon type="ios-medal" /> 质量判定</a></li>
<li><a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}"><Icon type="ios-create" /> 数据填报</a></li> <li><a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}"><Icon type="ios-create" /> 数据填报</a></li>
<li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"><Icon type="logo-codepen" /> 测试数据</a></li> --> <li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"><Icon type="logo-codepen" /> 测试数据</a></li>-->
<li><a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}"> <li>
<img src="@/assets/imgicon/execute/ex01.png" alt=""/> 进度汇报</a></li> <a @click="gnFunto(0,'进度汇报')" :class="{active:gnFlag == 0}">
<li><a @click="gnFunto(1,'物料领用')" :class="{active:gnFlag == 1}"> <img src="@/assets/imgicon/execute/ex01.png" alt /> 进度汇报
<img src="@/assets/imgicon/execute/ex02.png" alt=""/> 物料领用</a></li> </a>
<li><a @click="gnFunto(2,'产品装配')" :class="{active:gnFlag == 2}"> </li>
<img src="@/assets/imgicon/execute/ex03.png" alt=""/> 产品装配</a></li> <li>
<li><a @click="gnFunto(3,'工时分配')" :class="{active:gnFlag == 3}"> <a @click="gnFunto(1,'物料领用')" :class="{active:gnFlag == 1}">
<img src="@/assets/imgicon/execute/ex04.png" alt=""/> 工时分配</a></li> <img src="@/assets/imgicon/execute/ex02.png" alt /> 物料领用
<li><a @click="gnFunto(4,'生产准备')" :class="{active:gnFlag == 4}"> </a>
<img src="@/assets/imgicon/execute/ex05.png" alt=""/> 生产准备</a></li> </li>
<li><a @click="gnFunto(5,'工艺查看')" :class="{active:gnFlag == 5}"> <li>
<img src="@/assets/imgicon/execute/ex06.png" alt=""/> 工艺查看</a></li> <a @click="gnFunto(2,'产品装配')" :class="{active:gnFlag == 2}">
<li><a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}"> <img src="@/assets/imgicon/execute/ex03.png" alt /> 产品装配
<img src="@/assets/imgicon/execute/ex07.png" alt=""/> 工艺案例</a></li> </a>
<li><a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}"> </li>
<img src="@/assets/imgicon/execute/ex08.png" alt=""/> 质量判定</a></li> <li>
<li><a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}"> <a @click="gnFunto(3,'工时分配')" :class="{active:gnFlag == 3}">
<img src="@/assets/imgicon/execute/ex09.png" alt=""/> 数据填报</a></li> <img src="@/assets/imgicon/execute/ex04.png" alt /> 工时分配
<li><a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}"> </a>
<img src="@/assets/imgicon/execute/ex10.png" alt=""/> 测试数据</a></li> </li>
<li>
<a @click="gnFunto(4,'生产准备')" :class="{active:gnFlag == 4}">
<img src="@/assets/imgicon/execute/ex05.png" alt /> 生产准备
</a>
</li>
<li>
<a @click="gnFunto(5,'工艺查看')" :class="{active:gnFlag == 5}">
<img src="@/assets/imgicon/execute/ex06.png" alt /> 工艺查看
</a>
</li>
<li>
<a @click="gnFunto(6,'工艺案例')" :class="{active:gnFlag == 6}">
<img src="@/assets/imgicon/execute/ex07.png" alt /> 工艺案例
</a>
</li>
<li>
<a @click="gnFunto(7,'质量判定')" :class="{active:gnFlag == 7}">
<img src="@/assets/imgicon/execute/ex08.png" alt /> 质量判定
</a>
</li>
<li>
<a @click="gnFunto(8,'数据填报')" :class="{active:gnFlag == 8}">
<img src="@/assets/imgicon/execute/ex09.png" alt /> 数据填报
</a>
</li>
<li>
<a @click="gnFunto(9,'测试数据')" :class="{active:gnFlag == 9}">
<img src="@/assets/imgicon/execute/ex10.png" alt /> 测试数据
</a>
</li>
</ul> </ul>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name:'functional', name: "functional",
data(){ props: ["orderId"],
return{ data() {
gnFlag:0, return {
} gnFlag: 0
};
}, },
methods: { methods: {
gnFunto(number,type){ gnFunto(number, type) {
// alert("a"+this.orderId)
this.gnFlag = number; this.gnFlag = number;
this.$emit('changeTitle',number,type); this.$emit("changeTitle", number, type, this.orderId);
} }
}, }
} };
</script> </script>
\ No newline at end of file
<template>
<div class="new_box" style="overflow: hidden;">
<div v-if="isedit" class="photo">
<imgUploadFile
class="tphoto"
ref="refmovieFile1"
v-model="imgName"
:parms="entryMovieparms"
files
@on-change="ok"
/>
</div>
<div class="table">
<Table stripe ref="table" border :columns="moviecolumn" :data="moviedata" class="tableCommon"></Table>
</div>
</div>
</template>
<script>
import service from '@/plugins/request'
import QS from 'querystring'
export default {
name: 'entryrecordMovie',
components: {},
data() {
return {
datasearch: {
ids: 0,
MaxResultCount: 10,
SkipCount: 0
},
entryMovieparms:
'app=orderexecutequalitydataPhoto&eid=1&name=orderexecutequalitydataPhoto',
imgName: '',
photoStyle: null, //传照片box样式
newModel: false,
isedit: true,
ids: [],
datafrom: {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: '',
qc_card_id: 0,
fill_in_user_type: 0,
movie_type: 0,
movie_name: '',
movie_path: '',
data_desc: ''
},
moviedata: [],
moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: '序号', type: 'index', width: '100', align: 'center' },
{
title: '名称',
key: 'movie_name'
},
{
title: '操作',
key: 'id',
align: 'center',
render: (h, params) => {
let id = params.row.id
if (!this.isedit) {
h(
'div',
{
class: 'icon_box'
},
[
h(
'A',
{
attrs: {
href: fileUrlDown + params.row.movie_path,
target: '_blank'
},
props: {},
style: {
color: '#249E91',
marginRight: '5px',
cursor: 'pointer'
}
},
'查看'
)
]
)
}
return h(
'div',
{
class: 'icon_box'
},
[
h(
'A',
{
attrs: {
href: fileUrlDown + params.row.movie_path,
target: '_blank'
},
props: {},
style: {
color: '#249E91',
marginRight: '5px',
cursor: 'pointer'
}
},
'查看'
),
h(
'span',
{
class: 'del_icon',
attrs: { title: '删除' },
on: {
click: () => {
this.deleteFun(params)
}
}
},
'删除'
)
]
)
}
}
]
}
},
mounted() {},
watch: {
imgName(newName, oldName) {
if (newName != '') {
let obj = JSON.parse(newName)
}
}
},
methods: {
loadpage(params, product_code, board_code, isedit) {
this.isedit = isedit
;(this.datafrom.dispatch_id = params.dispatch_id),
(this.datafrom.execute_id = params.execute_id),
(this.datafrom.order_id = params.order_id),
(this.datafrom.qc_card_id = params.qc_card_id),
(this.datafrom.data_type = 1)
if (params.movieid != '') {
this.ids = params.movieid.split(',')
}
this.datafrom.product_code = product_code
this.datafrom.board_code = board_code
this.loaddata()
},
loaddata() {
this.datasearch.ids = this.ids.join(',')
var url =
`${PlanUrl}/orderexecutequalitymovie/getlist?` +
QS.stringify(this.datasearch)
service.get(`${url}`).then((response) => {
if (response.result != null) {
this.moviedata = response.result
}
})
},
ok(files) {
if (files == '') {
return
}
let obj = JSON.parse(files)
this.datafrom.movie_name = obj[0].fileName
this.datafrom.movie_path = obj[0].filePath
var url = `${PlanUrl}/orderexecutequalitymovie/createorupdate`
service
.post(
`${url}`,
{
orderExecuteQualityMovie: this.datafrom
}
)
.then((response) => {
if (response.success) {
this.$Message.success('保存成功')
this.ids.push(response.result.id)
this.moviedata.push(response.result)
this.cleardata()
this.$emit(
'bindPhotoid',
this.datafrom.qc_card_id,
this.ids.join(',')
)
//this.loaddata()
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
},
cancel() {
this.cleardata()
},
cleardata() {
this.datafrom.id = 0
this.datafrom.movie_name = ''
this.datafrom.movie_path = ''
},
editFun(params) {
this.datafrom = params.row
this.newModel = true
},
deleteFun(params) {
let id = params.row.id
this.$Modal.confirm({
title: '提示',
content: '确定要删除当前行?',
onOk: () => {
var url =
`${PlanUrl}/orderexecutequalitymovie/delete?id=` +
params.row.id +
'&record_id=' +
params.row.record_id
service
.delete(`${url}`)
.then((response) => {
if (response.success) {
this.$Message.success('删除成功')
this.ids.splice(this.ids.indexOf(params.row.id), 1)
this.moviedata.splice(this.moviedata.indexOf(params.row), 1)
// this.loaddata()
this.$emit(
'bindPhotoid',
this.datafrom.qc_card_id,
this.ids.join(',')
)
} else {
this.$Message.error('删除失败')
}
})
.catch((error) => {
this.$Message.error('删除失败')
})
},
onCancel: () => {}
})
}
}
}
</script>
\ No newline at end of file
<template>
<div class="new_box">
<div>
<Button v-if="isedit" style=" margin-left:10px" type="primary" @click="handleAdd">添加</Button>
<Table class="tableCommon" stripe ref="table" border :columns="moviecolumn" :data="moviedata">
<template slot-scope="{ row, index }" slot="data_content1">
<Input type="text" v-model="data_content1" v-if="editIndex === index" />
<span v-else>{{ row.data_content1 }}</span>
</template>
<template slot-scope="{ row, index }" slot="data_content2">
<Input type="text" v-model="data_content2" v-if="editIndex === index" />
<span v-else>{{ row.data_content2 }}</span>
</template>
<template slot-scope="{ row, index }" slot="data_content3">
<Input type="text" v-model="data_content3" v-if="editIndex === index" />
<span v-else>{{ row.data_content3 }}</span>
</template>
<template slot-scope="{ row, index }" slot="action">
<div v-if="editIndex === index">
<Button @click="handleSave(index)">保存</Button>
<Button @click="handlecancel(row, index)">取消</Button>
</div>
<div v-else>
<template v-if="isedit">
<Button class="pl10" @click="handleEdit(row, index)">编辑</Button>
<Button @click="handledel(row, index)">删除</Button>
</template>
</div>
</template>
</Table>
</div>
</div>
</template>
<script>
import service from "@/plugins/request";
import QS from "querystring";
export default {
name: "entryrecorddata",
components: {},
data() {
return {
datasearch: {
ids: 0,
MaxResultCount: 10,
SkipCount: 0
},
isedit: true,
editIndex: -1,
isadd: false,
newModel: false,
ids: [],
data_content1: "",
data_content2: "",
data_content3: "",
datafrom: {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: "",
qc_card_id: 0,
fill_in_user_type: 0,
data_type: 4,
data_content1: "",
data_content2: "",
data_content3: "",
data_content4: "",
product_code: "",
board_code: ""
},
moviedata: [],
moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: "序号", type: "index", width: "100", align: "center" },
{
title: "名称",
slot: "data_content1",
key: "data_content1"
},
{
title: "值",
slot: "data_content2",
key: "data_content2"
},
{
title: "备注",
slot: "data_content3",
key: "data_content3"
},
{
title: "操作",
slot: "action",
align: "center",
width: "201"
}
]
};
},
mounted() {},
watch: {},
methods: {
loadpage(params, fill_in_user_type, product_code, board_code, isedit) {
this.isedit = isedit;
this.datafrom.dispatch_id = params.dispatch_id;
this.datafrom.execute_id = params.execute_id;
this.datafrom.order_id = params.order_id;
this.datafrom.qc_card_id = params.qc_card_id;
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 &&
params.selfchecklist.fill_in_content != null &&
params.selfchecklist.fill_in_content != ""
) {
this.ids = params.selfchecklist.fill_in_content.split(",");
this.datafrom.record_id = params.selfchecklist.record_id == null
? 0
: params.selfchecklist.record_id;
} else if (
fill_in_user_type == 2 && //互检
params.mutualchecklist != null &&
params.mutualchecklist.fill_in_content != null &&
params.mutualchecklist.fill_in_content != ""
) {
this.ids = params.mutualchecklist.fill_in_content.split(",");
this.datafrom.record_id =
params.mutualchecklist.record_id == null
? 0
: params.mutualchecklist.record_id;
} else if (
fill_in_user_type == 3 && //专检
params.seizurechecklist != null &&
params.seizurechecklist.fill_in_content != null &&
params.seizurechecklist.fill_in_content != ""
) {
this.ids = params.seizurechecklist.fill_in_content.split(",");
this.datafrom.record_id =
params.seizurechecklist.record_id == null
? 0
: params.seizurechecklist.record_id;
}
this.datafrom.product_code = product_code.join(",");
// this.datafrom.board_code = board_code
alert(2)
this.loaddata();
},
loaddata() {
this.moviedata = [];
this.datasearch.ids = this.ids.join(",");
var url =
`${PlanUrl}/orderexecutequalitydata/getlist?` +
QS.stringify(this.datasearch);
service.get(`${url}`).then(response => {
if (response.result != null) {
this.moviedata = response.result;
}
});
},
handlecancel(row, index) {
this.editIndex = -1;
this.isadd = false;
if (row.isnewadd) {
this.data01.splice(index, 1);
}
},
handleAdd() {
if (this.isadd == false) {
let row = {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: "",
qc_card_id: 0,
fill_in_user_type: 0,
data_type: 0,
data_content1: "",
data_content2: "",
data_content3: "",
data_content4: "",
product_code: "",
board_code: "",
isnewadd: true
};
this.data_content1 = "";
this.data_content2 = "";
this.data_content3 = "";
this.isadd = true;
this.moviedata.push(row);
this.editIndex = this.moviedata.length - 1;
} else {
let lastindex = this.moviedata.length - 1;
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.data_content2 = row.data_content2;
this.data_content3 = row.data_content3;
this.editIndex = index;
},
handleSave(index) {
this.datafrom.data_content1 = this.data_content1;
this.datafrom.data_content2 = this.data_content2;
this.datafrom.data_content3 = this.data_content3;
this.datafrom.id = this.moviedata[index].id;
this.ok(index);
if (this.editIndex == this.moviedata.length - 1) {
this.isadd = false;
this.moviedata[index].isnewadd = false;
}
this.editIndex = -1;
},
ok(index) {
// this.datafrom.product_code=this.datafrom.product_code.join(',')
var url = `${PlanUrl}/orderexecutequalitydata/createorupdate`;
service
.post(`${url}`, {
OrderExecuteQualityData: this.datafrom
})
.then(response => {
if (response.success) {
this.$Message.success("保存成功");
this.ids.push(response.result.id);
this.moviedata.splice(index, 1);
this.moviedata.push(response.result);
this.cleardata();
this.$emit(
"binddataid",
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(","),
true
);
// this.loaddata();
}
})
.catch(error => {
this.$Message.error("保存失败");
});
},
cancel() {
this.cleardata();
},
cleardata() {
this.datafrom.id = 0;
this.datafrom.data_content1 = "";
this.datafrom.data_content2 = "";
this.datafrom.data_content3 = "";
},
handledel(row, index) {
let id = row.id;
if (id == 0) {
this.moviedata.splice(index, 1);
} else {
this.$Modal.confirm({
title: "提示",
content: "确定要删除当前行?",
onOk: () => {
var url =
`${PlanUrl}/orderexecutequalitydata/delete?id=` +
row.id +
"&record_id=" +
row.record_id;
service
.delete(`${url}`)
.then(response => {
if (response.success) {
this.$Message.success("删除成功");
this.ids.splice(index, 1);
this.moviedata.splice(index, 1);
// this.loaddata()
this.$emit(
"binddataid",
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(",")
);
} else {
this.$Message.error("删除失败");
}
})
.catch(error => {
this.$Message.error("删除失败");
});
},
onCancel: () => {}
});
}
}
}
};
</script>
\ No newline at end of file
<template>
<div class="new_box">
<div v-if="isedit">
<inputFile
class="tphoto"
ref="refmovieFile1"
v-model="imgName"
:parms="entryMovieparms"
files
@on-change="ok"
/>
</div>
<div >
<Table stripe ref="table" border :columns="moviecolumn" :data="moviedata" class="tableCommon"></Table>
</div>
</div>
</template>
<script>
import service from '@/plugins/request'
import QS from 'querystring'
export default {
name: 'entryrecordfiles',
components: {},
data() {
return {
datasearch: {
ids: 0,
MaxResultCount: 10,
SkipCount: 0
},
entryMovieparms:
'app=orderexecutequalitydatafile&eid=1&name=orderexecutequalitydatafile',
imgName: '',
photoStyle: null, //传照片box样式
newModel: false,
ids: [],
isedit: false,
datafrom: {
id: 0,
record_id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: '',
qc_card_id: 0,
fill_in_user_type: 0,
data_type: 3,
data_content1: '',
data_content2: '',
data_content3: '',
data_content4: '',
product_code: '',
board_code: ''
},
moviedata: [],
moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: '序号', type: 'index', width: '100', align: 'center' },
{
title: '名称',
key: 'data_content1'
},
{
title: '操作',
key: 'id',
align: 'center',
render: (h, params) => {
let id = params.row.id
if (!this.isedit) {
return h('div', '')
} else {
return h(
'div',
{
class: 'icon_box'
},
[
h(
'A',
{
attrs: {
href: fileUrlDown + params.row.data_content2,
target: '_blank'
},
props: {},
style: {
color: '#249E91',
marginRight: '5px',
cursor: 'pointer'
}
},
'查看'
),
h(
'span',
{
class: 'del_icon',
attrs: { title: '删除' },
on: {
click: () => {
this.deleteFun(params)
}
}
},
'删除'
)
]
)
}
}
}
]
}
},
mounted() {},
watch: {
imgName(newName, oldName) {
if (newName != '') {
let obj = JSON.parse(newName)
}
}
},
methods: {
loadpage(params, fill_in_user_type, product_code, board_code,isedit) {
this.isedit=isedit;
;(this.datafrom.dispatch_id = params.dispatch_id),
(this.datafrom.execute_id = params.execute_id),
(this.datafrom.order_id = params.order_id),
(this.datafrom.qc_card_id = params.qc_card_id),
(this.datafrom.fill_in_user_type = fill_in_user_type),
(this.datafrom.data_type = 3)
this.ids = []
if (
fill_in_user_type == 1 &&
params.selfchecklist != null &&
params.selfchecklist.fill_in_content != null &&
params.selfchecklist.fill_in_content != ''
) {
this.ids = params.selfchecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.selfchecklist.record_id == null
? 0
: params.selfchecklist.record_id
} else if (
fill_in_user_type == 2 &&
params.mutualchecklist != null &&
params.mutualchecklist.fill_in_content != null &&
params.mutualchecklist.fill_in_content != ''
) {
this.ids = params.mutualchecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.mutualchecklist.record_id == null
? 0
: params.mutualchecklist.record_id
} else if (
fill_in_user_type == 3 &&
params.seizurechecklist != null &&
params.seizurechecklist.fill_in_content != null &&
params.seizurechecklist.fill_in_content != ''
) {
this.ids = params.seizurechecklist.fill_in_content.split(',')
this.datafrom.record_id =
params.seizurechecklist.record_id == null
? 0
: params.seizurechecklist.record_id
}
this.datafrom.product_code = product_code
this.datafrom.board_code = board_code
this.loaddata()
},
loaddata() {
this.datasearch.ids = this.ids.join(',')
this.moviedata = []
var url =
`${PlanUrl}/orderexecutequalitydata/getlist?` +
QS.stringify(this.datasearch)
service.get(`${url}`).then((response) => {
if (response.result != null) {
this.moviedata = response.result
}
})
},
ok(files) {
if (files == '') {
return
}
let obj = JSON.parse(files)
this.datafrom.data_content1 = obj[0].fileName
this.datafrom.data_content2 = obj[0].filePath
var url = `${PlanUrl}/orderexecutequalitydata/createorupdate`
service
.post(
`${url}`,
{
OrderExecuteQualityData: this.datafrom
}
)
.then((response) => {
if (response.success) {
this.$Message.success('保存成功')
this.ids.push(response.result.id)
this.moviedata.push(response.result)
this.cleardata()
this.$emit(
'binddataid',
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(',')
)
//this.loaddata()
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
},
cancel() {
this.cleardata()
},
cleardata() {
this.datafrom.id = 0
this.datafrom.data_content1 = ''
this.datafrom.data_content2 = ''
},
editFun(params) {
this.datafrom = params.row
this.newModel = true
},
deleteFun(params) {
let id = params.row.id
this.$Modal.confirm({
title: '提示',
content: '确定要删除当前行?',
onOk: () => {
var url =
`${PlanUrl}/orderexecutequalitydata/delete?id=` +
params.row.id +
'&record_id=' +
params.row.record_id
service
.delete(`${url}`)
.then((response) => {
if (response.success) {
this.$Message.success('删除成功')
this.ids.splice(this.ids.indexOf(params.row.id), 1)
this.moviedata.splice(this.moviedata.indexOf(params.row), 1)
// this.loaddata()
this.$emit(
'binddataid',
this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type,
this.ids.join(',')
)
} else {
this.$Message.error('删除失败')
}
})
.catch((error) => {
this.$Message.error('删除失败')
})
},
onCancel: () => {}
})
}
}
}
</script>
\ No newline at end of file
This diff is collapsed.
<template>
<Form ref="form" :model="user" :label-width="100">
<Row class="rowTitle100">
<Col :span="12">
<Checkbox v-model="isall" @on-change="peoductAllOnchange"></Checkbox>
<span class="ml20">产品号</span>
<Select
:disabled="disabled"
multiple
@on-change="productonchange"
v-model="product_ID"
class="w200"
>
<Option
v-for="item in product_List"
:value="item.productids"
:key="item.index"
>{{ item.productcodes }}</Option>
</Select>
</Col>
</Row>
<Row class="rowTitle100">
<Col :span="12">
<FormItem label="检验员">
<CheckboxGroup v-model="checker" class="radio_option">
<Checkbox v-for="(item,index) in checkerlist" :label="item.id" :key="index">
<span>{{item.userName}}</span>
</Checkbox>
</CheckboxGroup>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit">确定</Button>
</FormItem>
</Form>
</template>
<script>
import service from '@/plugins/request'
import QS from 'querystring'
export default {
name: 'sendCheck',
components: {},
data() {
return {
disabled: false,
isCurrentUser: false,
checkerlist: [],
checker: [],
user: {
id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: '',
routingHeaderId: 0,
routingDetailId: 0,
product_code: '',
board_code: '',
checkerIds: '',
checkerNames: '',
check_Status: 0,
check_Result: '',
checker: 0,
check_time: null
},
isall:[],
isMain: 1,
productisabled: false,
product_ID: [],
board_ID: [],
product_List: [],
board_List: []
}
},
mounted() {},
watch: {},
methods: {
handleSubmit() {
let state = true
if (this.product_ID.length == 0) {
state = false
this.$Message.error('请选择要送检的产品')
return
}
this.user.product_code = this.product_ID.join(',')
this.user.board_code = this.board_ID.join(',')
if (this.checker.length == 0) {
state = false
this.$Message.error('请选择检验员')
return
} else {
let checkername = []
for (let i = 0; i < this.checker.length; i++) {
for (let j = 0; j < this.checkerlist.length; j++) {
if (this.checkerlist[j].id == this.checker[i]) {
checkername.push(this.checkerlist[j].userName)
}
}
}
this.user.checkerIds = this.checker.join(',')
this.user.checkerNames = checkername.join(',')
}
if (state) {
var url = `${PlanUrl}/ordercheckresult/sendcheck`
service
.post(`${url}`, this.user)
.then((response) => {
if (response.success) {
this.$Message.success('保存成功')
this.$parent.$parent.loadproduct()
this.$parent.$parent.sendCheckModal = false
}
})
.catch((error) => {
this.$Message.error('保存失败')
})
}
},
handleClose() {},
loadentry(entryModel) {
this.user.dispatch_id = entryModel.id
this.user.execute_id = entryModel.executeId
this.user.order_id = entryModel.order_id
this.user.routingHeaderId = entryModel.routingHeaderId
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()
},
loadproduct() {
var url =
`${PlanUrl}/ordercheck/sendcheckproductcode?entryID=` +
this.user.dispatch_id
service.post(`${url}`).then((response) => {
this.product_List = response.result
this.board_List = response.result
})
},
loaduser() {
let params = {
role_type: 1,
name: '检验',
isSelect: 1,
pageSize: 10,
page: 1
}
var url = systemUrl + '/MyRole/GetRolesAsync?' + QS.stringify(params)
service.get(`${url}`).then((response) => {
let roles = response.result.items
let roleids = []
for (let i = 0; i < roles.length; i++) {
roleids.push(roles[i].id)
}
// let userInfo = this.$store.admin.user.info;
// var url =
// `${systemUrl}/myuserrole/GetUsersByRoleAndorgan?ids=` +
// roleids.join(',') +
// '&&organId=0&userid=' +
// userInfo.userId
var url =
`${systemUrl}/myuserrole/GetUsersByRole?ids=` + roleids.join(',')
service.get(`${url}`).then((response) => {
for (let j = 0; j < response.result.length; j++) {
let user = response.result[j]
var index = this.checkerlist.filter(function(item) {
return item.id === user.id
})
if (index.length == 0) {
this.checkerlist.push(user)
}
}
})
})
},
peoductAllOnchange(e) {
if (e) {
// if (!this.isMain) {
// for (let i = 0; i < this.board_List.length; i++) {
// let obj = this.board_List[i]
// this.board_ID.push(obj.boardNumber)
// }
// }
for (let i = 0; i < this.product_List.length; i++) {
let obj = this.product_List[i]
this.product_ID.push(obj.productids)
}
} else {
this.product_ID = []
// this.board_ID = []
}
},
productonchange(e) {},
boardonchange(e) {
this.product_ID = []
for (let i = 0; i < this.board_List.length; i++) {
let obj = this.board_List[i]
for (let j = 0; j < e.length; j++) {
if (obj.boardNumber == e[j]) {
this.product_ID.push(obj.productids)
}
}
}
}
}
}
</script>
\ No newline at end of file
<template>
<div class="new_box">
<Table stripe ref="table" border :columns="moviecolumn" :data="moviedata" class="tableCommon"></Table>
<Page
:total="datatotal"
:current="pageindex"
:page-size="pagesize"
@on-change="onPageChanged"
@on-page-size-change="onPagesizeChanged"
show-sizer
class="pt10 pl10"
show-elevator
show-total
/>
</div>
</template>
<script>
import service from '@/plugins/request'
import QS from 'querystring'
export default {
name: 'sendCheckRecord',
components: {},
data() {
return {
pageindex: 1,
pagesize: 10,
datatotal: 0,
datasearch: {
dispatch_id: 0,
MaxResultCount: 10,
SkipCount: 0
},
moviedata: [],
moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: '序号', type: 'index', width: '100', align: 'center' },
{
title: '产品号',
width: '100',
key: 'product_code'
},
{
title: '板号',
width: '100',
key: 'board_code'
},
{
title: '送检检验员',
width: '150',
key: 'checkerNames'
},
{
title: '送检时间',
width: '180',
key: 'creationTime'
},
{
title: '状态',
key: 'check_Status',
align: 'center',
width: '120',
render: (h, params) => {
let desc = ''
if (params.row.check_Status == 1) {
desc = '待检验'
} else if (params.row.check_Status == 2) {
desc = '检验成功'
} else if (params.row.check_Status == 3) {
desc = '检验打回'
}
return h('div', desc)
}
},
{
title: '检验员',
width: '100',
key: 'checkName'
},
{
title: '检验时间',
width: '180',
key: 'check_time'
},
{
title: '备注',
key: 'check_Result'
}
]
}
},
mounted() {},
methods: {
load(dispatch_id) {
console.log(dispatch_id)
this.datasearch.dispatch_id = dispatch_id
this.loaddata()
},
loaddata() {
this.datasearch.SkipCount =
(this.pageindex - 1) * this.datasearch.MaxResultCount
var url =
`${PlanUrl}/ordercheckresult/getpaged?` + QS.stringify(this.datasearch)
service.get(`${url}`).then((response) => {
if (response.result != null) {
this.moviedata = response.result.items
this.datatotal = response.result.totalCount
}
})
},
onPageChanged(page_index) {
this.pageindex = page_index
this.loaddata()
},
onPagesizeChanged(page_size) {
this.pagesize = page_size
this.loaddata()
}
}
}
</script>
\ No newline at end of file
<template>
<Form ref="form" :model="user" :rules="rules" :label-width="80" class="shua-ka">
<Row class="rowTitle100">
<Col :span="24">
<Checkbox v-model="isall" @on-change="peoductAllOnchange" class="check"></Checkbox>
<span>产品号</span>
<Select multiple @on-change="productonchange" v-model="product_ID" class="w200">
<Option
v-for="item in product_List"
:value="item.value"
:key="item.index"
>{{ item.label }}</Option>
</Select>
</Col>
</Row>
<Row class="rowTitle100">
<Col :span="24">
<FormItem label="员工编号" prop="cardno">
<Input v-model="user.cardno"></Input>
<Checkbox v-model="isCurrentUser" @on-change="getCurrentUser">当前用户</Checkbox>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">确定</Button>
</FormItem>
</Form>
</template>
<script>
import service from "@/plugins/request";
export default {
name: "usercard",
components: {},
data() {
const validateCarNo = (rule, value, callback) => {
if (!value) {
return callback(new Error("员工编号不能为空"));
}
var params = {
conditions: [
{
fieldName: "cardNo",
fieldValue: value,
conditionalType: "Equal"
}
],
pageSize: 3
};
service.post(`${systemUrl}/user/list`, params).then(response => {
if (response.result.length > 0) {
this.user.user_name = response.result[0].userName;
this.user.user_id = response.result[0].id;
callback();
} else {
this.user.cardno = "";
return callback(new Error("员工编号不存在"));
}
});
};
return {
disabled: false,
isCurrentUser: false,
isall: false,
width1: "400",
user: {
dispatch_id: 0,
execute_id: 0,
order_id: "",
routingHeaderId: 0,
routingDetailId: 0,
product_code: [],
// board_code: [],
cardno: "",
user_id: "",
user_name: "",
remarks: "",
fill_in_user_type: 0,
reportdate: null,
isreplace: 0
},
recordList: [],
isMain: 1,
productisabled: false,
product_ID: [],
// board_ID: [],
product_List: [],
board_List: [],
rules: {
cardno: [
{ required: true, message: "必填", trigger: "blur" },
{ validator: validateCarNo, trigger: "blur" }
]
}
};
},
mounted() {},
watch: {},
methods: {
handleSubmit() {
let state = true;
if (this.product_ID.length == 0) {
state = false;
this.$Message.error("请选择要送检的产品");
return;
}
this.user.product_code = this.product_ID.join(",");
// this.user.board_code = this.board_ID.join(",");
if (state) {
this.$refs.form.validate(v => {
if (v) {
var url = `${PlanUrl}/orderexecutequalityrecord/qccardchecker`;
service
.post(`${url}`, {
user: this.user,
card: this.recordList
})
.then(response => {
if (response.success) {
this.$Message.success("保存成功");
// this.$parent.loadproduct();
// this.$parent.$parent.usercardModal = false;
this.$emit('on-ok')
}
})
.catch(error => {
this.$Message.error("保存失败");
});
}
});
}
},
handleClose() {},
loadentry(entryModel, fillModel, recordList) {
this.user.dispatch_id = recordList[0].dispatch_id
this.user.execute_id = entryModel.executeId;
this.user.order_id = entryModel.order_id;
this.user.routingHeaderId = entryModel.routingHeaderId;
this.user.routingDetailId = entryModel.routingDetailId;
this.user.fill_in_user_type = fillModel.fill_in_user_type;
this.user.cardno = "";
this.user.user_id = "";
this.user.user_name = "";
this.product_code = "";
// this.board_code = "";
this.isCurrentUser = false;
// this.isMain = entryModel.isMain;
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;
} 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);
}
}
}
this.recordList = recordList;
},
peoductAllOnchange(e) {
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);
}
} else {
this.product_ID = [];
// this.board_ID = [];
}
},
productonchange(e) {},
getCurrentUser(e) {
if (e) {
console.log(this.$store.state.admin.user.info);
let userInfo = this.$store.state.admin.user.info;
this.user.cardno = userInfo.cardNo;
this.user.user_name = userInfo.name;
this.user.user_id = userInfo.id;
} else {
this.user.cardno = "";
}
}
}
};
</script>
<style lang="less">
.shua-ka {
padding: 0 20px;
.rowTitle100 {
margin-top: 10px;
.w200 {
width: 330px;
}
}
}
</style>
\ No newline at end of file
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
.execute_box{ .execute_box{
position: relative; position: relative;
margin: 0px -10px; margin: 0px -10px;
// .top_title{ height:88vh;
// height: 50px; .top_title{
// line-height: 49px; height: 50px;
// text-align: center; line-height: 49px;
// font-weight: 600; text-align: center;
// padding: 0 15px; font-weight: 600;
// border-bottom: 1px solid #CACBD0; padding: 0 15px;
// } border-bottom: 1px solid #CACBD0;
}
.star{ .star{
height: 33vh; height: 33vh;
padding: 6vh 0; padding: 6vh 0;
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
</style> </style>
<template> <template>
<div class="execute_box"> <div class="execute_box">
<!-- <div class="top_title"> <div class="top_title">
<span class="fl">{{orderTitle}}</span> <span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div> <div>工单编号: 12001011</div>
</div> --> </div>
<component :is="detail" :gdid="gdId"/> <component :is="detail" :gdid="gdId" :row="row"/>
<a class="gd_list" @click="orderlistMode = true">工单列表</a> <a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a> <a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 --> <!-- 工单列表 -->
...@@ -24,19 +24,30 @@ ...@@ -24,19 +24,30 @@
ref="state" class="fr" ref="state" class="fr"
:value="item.value" :value="item.value"
type="text" type="text"
></state> --> ></state>-->
<!-- </Option> </Option>
</Select> --> </Select>
<!-- <a class="openAll"><Icon type="ios-list" size="18" /> 展开全部列表</a> -->
</div> </div>
<div class="select_t"> <div class="select_t">
<Button class="">时间正序排列</Button> <!-- <Select v-model="odermodel" style="width:100px" @on-change="searchOrder">
<Option v-for="item in oderList" :value="item.value" :key="item.index">{{ item.label }}</Option>
</Select>-->
<!-- <span class="gd_length">{{listLength}}</span> -->
<Button class>时间正序排列</Button>
</div> </div>
</div> </div>
<orderlist ref="orderlist"/> <orderlist ref="orderlist" />
</Drawer> </Drawer>
<!-- title="功能区" --> <!-- title="功能区" -->
<Drawer class="gn_box" :closable="false" :inner="true" :transfer="false" v-model="functionalMode"> <Drawer
<functional @changeTitle='changeTitle' ref="functional" /> class="gn_box"
:closable="false"
:inner="true"
:transfer="false"
v-model="functionalMode"
>
<functional @changeTitle="changeTitle" ref="functional" />
</Drawer> </Drawer>
</div> </div>
</template> </template>
...@@ -44,41 +55,49 @@ ...@@ -44,41 +55,49 @@
import functional from "./components/functional"; import functional from "./components/functional";
import orderlist from "./components/orderlist"; import orderlist from "./components/orderlist";
export default { export default {
components: { functional, orderlist,}, components: { functional, orderlist },
data(){ data() {
return{ return {
orderTitle:'进度汇报', orderTitle: "进度汇报",
orderindex:0, orderindex: 0,
gdId:0, gdId: 0,
listLength:0,//工单数量 listLength: 0, //工单数量
starmodal: true, starmodal: true,
orderlistMode:false, orderlistMode: false,
functionalMode:false, functionalMode: false,
detail: null, detail: null,
odermodel: -9, odermodel: -9,
oderList:[ orderId: null,
row:{},
oderList: [
{ {
value: -9, value: -9,
label: '全部' label: "全部"
},{ },
{
value: 12, value: 12,
label: '未开工' label: "未开工"
},{ },
{
value: 14, value: 14,
label: '执行中' label: "执行中"
},{ },
{
value: 0, value: 0,
label: '已完成' label: "已完成"
},{ },
{
value: 5, value: 5,
label: '暂停中' label: "暂停中"
},{ },
{
value: 7, value: 7,
label: '已终止' label: "已终止"
},{
value: -1,
label: '待派工'
}, },
{
value: -1,
label: "待派工"
}
// value: '交检中', // value: '交检中',
// label: '交检中' // label: '交检中'
// },{ // },{
...@@ -86,49 +105,67 @@ export default { ...@@ -86,49 +105,67 @@ export default {
// label: '交接中' // label: '交接中'
// },{ // },{
], ],
condition:[] condition: []
} };
}, },
created() { created() {
this.detail = () => import("./starOrder/index"); // this.orderId = this.$route.query.orderId;
this.row = this.$route.query.row;
this.detail = () => import("./starOrder/index");
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {},
comments: {},
},
comments:{ },
methods: { methods: {
starFun(){ starFun() {
this.$Message.success("开工...") this.$Message.success("开工...");
}, },
// getListLength(len){ this.listLength = len }, // getListLength(len){ this.listLength = len },
// 返回工单列表 // 返回工单列表
goToOrder(){ goToOrder() {
this.$router.push("/produce/orderlist"); this.$router.push("/produce/orderlist");
}, },
searchOrder(value){ searchOrder(value) {
this.$refs.orderlist.loadTree(value); this.$refs.orderlist.loadTree(value);
}, },
changeTitle(number,type){ changeTitle(number, type) {
this.orderTitle = type this.orderTitle = type;
this.orderindex = number this.orderindex = number;
if(number==0){ this.detail = () => import("./starOrder/index");}//进度汇报 if (number == 0) {
if(number==1){ this.detail = () => import("./MaterialCollec/index");}//物料领用 this.detail = () => import("./starOrder/index");
if(number==2){ this.detail = () => import("./productSet/index");}//产品装配 } //进度汇报
if(number==3){ this.detail = () => import("./taskTime/index");}//工时分配 if (number == 1) {
if(number==4){ this.detail = () => import("./preparation/index");}//生产准备 this.detail = () => import("./MaterialCollec/index");
if(number==5){ this.detail = () => import("./ProcessCheck/index");}//工艺查看 } //物料领用
if(number==6){ this.detail = () => import("./ProcessCase/index");}//工艺案例 if (number == 2) {
if(number==7){ this.detail = () => import("./judgment/index");}//质量判定 this.detail = () => import("./productSet/index");
if(number==8){ this.detail = () => import("./datafilling/index");}//数据填报 } //产品装配
if(number==9){ this.detail = () => import("./testdata/index");}//测试数据 if (number == 3) {
}, this.detail = () => import("./taskTime/index");
}, } //工时分配
watch:{ if (number == 4) {
this.detail = () => import("./preparation/index");
} //生产准备
if (number == 5) {
this.detail = () => import("./ProcessCheck/index");
} //工艺查看
if (number == 6) {
this.detail = () => import("./ProcessCase/index");
} //工艺案例
if (number == 7) {
this.detail = () => import("./judgment/index");
} //质量判定
if (number == 8) {
this.detail = () => import("./datafilling/index");
} //数据填报
if (number == 9) {
this.detail = () => import("./testdata/index");
} //测试数据
}
}, },
} watch: {}
};
</script> </script>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button> <Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
</template> </template>
<template slot="card" slot-scope="{row}"> <template slot="card" slot-scope="{row}">
<div class="body" @click="toExecute(row.id)"> <div class="body" @click="toExecute(row.id,row.orderId,row)">
<Row class="title-i"> <Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col> <Col :span="10" class="order-code">{{row.productName}}</Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col> <Col :span="10" class="order-code">{{row.mesCode}}</Col>
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.toExecute(params.row.id) } on: { click: () => this.toExecute(params.row.id,row) }
}, },
"查看" "查看"
) )
...@@ -184,11 +184,11 @@ export default { ...@@ -184,11 +184,11 @@ export default {
} }
} }
], ],
set:false, set: false,
typeInfo: "card", typeInfo: "card",
iconInfo: "md-apps", iconInfo: "md-apps",
titleInfo: "卡片模式", titleInfo: "卡片模式",
nowTime: new Date().getTime()//页面当前打开时间 nowTime: new Date().getTime() //页面当前打开时间
}; };
}, },
created() { created() {
...@@ -209,9 +209,12 @@ export default { ...@@ -209,9 +209,12 @@ export default {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
toExecute(id) { toExecute(id, orderId,row) {
//跳转到对应操作页面 获取id:this.$route.query.id //跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({ path:"/produce/execute",query: { id:id}}); this.$router.push({
path: "/produce/execute",
query: { id: id, orderId: orderId,row }
});
}, },
tdStyle(val) { tdStyle(val) {
//动态根据状态值加载状态值对应的颜色 //动态根据状态值加载状态值对应的颜色
...@@ -229,12 +232,12 @@ export default { ...@@ -229,12 +232,12 @@ export default {
changeShwo() { changeShwo() {
//显示模式切换 //显示模式切换
if (this.typeInfo == "card") { if (this.typeInfo == "card") {
this.set=true; this.set = true;
this.typeInfo = "table"; this.typeInfo = "table";
this.iconInfo = "md-list"; this.iconInfo = "md-list";
this.titleInfo = "列表模式"; this.titleInfo = "列表模式";
} else { } else {
this.set=false; this.set = false;
this.typeInfo = "card"; this.typeInfo = "card";
this.iconInfo = "md-apps"; this.iconInfo = "md-apps";
this.titleInfo = "卡片模式"; this.titleInfo = "卡片模式";
...@@ -270,7 +273,7 @@ export default { ...@@ -270,7 +273,7 @@ export default {
} else { } else {
res = false; res = false;
} }
return res return res;
}, },
getUrl(url) { getUrl(url) {
//返回img需要显示的src值 //返回img需要显示的src值
......
...@@ -200,7 +200,8 @@ export default { ...@@ -200,7 +200,8 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}, },
this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : "" '编辑'
// this.headerStatus == 4||this.headerStatus == 0 ? "编辑" : ""
), ),
h( h(
"op", "op",
......
...@@ -309,7 +309,8 @@ export default { ...@@ -309,7 +309,8 @@ export default {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) } on: { click: () => this.edit(params.row) }
}, },
params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : "" '编辑'
// params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : ""
), ),
h( h(
"op", "op",
......
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