Commit c796b76e authored by 仇晓婷's avatar 仇晓婷

工单执行

parent 3349e51b
<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> <template>
<div class="new_box"> <div class="new_box">
<div > <div>
<Button v-if="isedit" style=" margin-left:10px" type="primary" @click="handleAdd">添加</Button>
<Button v-if="isedit" style=" margin-left:10px" type="primary" @click="handleAdd">添加</Button>
<Table class="tableCommon" stripe ref="table" border :columns="moviecolumn" :data="moviedata"> <Table class="tableCommon" stripe ref="table" border :columns="moviecolumn" :data="moviedata">
<template slot-scope="{ row, index }" slot="data_content1"> <template slot-scope="{ row, index }" slot="data_content1">
<Input type="text" v-model="data_content1" v-if="editIndex === index" /> <Input type="text" v-model="data_content1" v-if="editIndex === index" />
...@@ -36,10 +35,10 @@ ...@@ -36,10 +35,10 @@
</div> </div>
</template> </template>
<script> <script>
import service from '@/plugins/request' import service from "@/plugins/request";
import QS from 'querystring' import QS from "querystring";
export default { export default {
name: 'entryrecorddata', name: "entryrecorddata",
components: {}, components: {},
data() { data() {
return { return {
...@@ -53,130 +52,130 @@ export default { ...@@ -53,130 +52,130 @@ export default {
isadd: false, isadd: false,
newModel: false, newModel: false,
ids: [], ids: [],
data_content1: '', data_content1: "",
data_content2: '', data_content2: "",
data_content3: '', data_content3: "",
datafrom: { datafrom: {
id: 0, id: 0,
record_id: 0, record_id: 0,
dispatch_id: 0, dispatch_id: 0,
execute_id: 0, execute_id: 0,
order_id: '', order_id: "",
qc_card_id: 0, qc_card_id: 0,
fill_in_user_type: 0, fill_in_user_type: 0,
data_type: 4, data_type: 4,
data_content1: '', data_content1: "",
data_content2: '', data_content2: "",
data_content3: '', data_content3: "",
data_content4: '', data_content4: "",
product_code: '', product_code: "",
board_code: '' board_code: ""
}, },
moviedata: [], moviedata: [],
moviecolumn: [ moviecolumn: [
// { title: '', key: 'organizType1', type: 'expand',width:'60'}, // { title: '', key: 'organizType1', type: 'expand',width:'60'},
{ title: '序号', type: 'index', width: '100', align: 'center' }, { title: "序号", type: "index", width: "100", align: "center" },
{ {
title: '名称', title: "名称",
slot: 'data_content1', slot: "data_content1",
key: 'data_content1' key: "data_content1"
}, },
{ {
title: '值', title: "值",
slot: 'data_content2', slot: "data_content2",
key: 'data_content2' key: "data_content2"
}, },
{ {
title: '备注', title: "备注",
slot: 'data_content3', slot: "data_content3",
key: 'data_content3' key: "data_content3"
}, },
{ {
title: '操作', title: "操作",
slot: 'action', slot: "action",
align: 'center', align: "center",
width: '201' width: "201"
} }
] ]
} };
}, },
mounted() {}, mounted() {},
watch: {}, watch: {},
methods: { methods: {
loadpage(params, fill_in_user_type, product_code, board_code, isedit) { loadpage(params, fill_in_user_type, product_code, board_code, isedit) {
this.isedit = isedit; this.isedit = isedit;
(this.datafrom.dispatch_id = params.dispatch_id), (this.datafrom.dispatch_id = params.dispatch_id),
(this.datafrom.execute_id = params.execute_id), (this.datafrom.execute_id = params.execute_id),
(this.datafrom.order_id = params.order_id), (this.datafrom.order_id = params.order_id),
(this.datafrom.qc_card_id = params.qc_card_id), (this.datafrom.qc_card_id = params.qc_card_id),
(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 = [];
if ( if (
fill_in_user_type == 1 && fill_in_user_type == 1 &&
params.selfchecklist != null && params.selfchecklist != null &&
params.selfchecklist.fill_in_content != null && params.selfchecklist.fill_in_content != null &&
params.selfchecklist.fill_in_content != '' params.selfchecklist.fill_in_content != ""
) { ) {
this.ids = params.selfchecklist.fill_in_content.split(',') this.ids = params.selfchecklist.fill_in_content.split(",");
this.datafrom.record_id = this.datafrom.record_id =
params.selfchecklist.record_id == null params.selfchecklist.record_id == null
? 0 ? 0
: params.selfchecklist.record_id : params.selfchecklist.record_id;
} else if ( } else if (
fill_in_user_type == 2 && fill_in_user_type == 2 &&
params.mutualchecklist != null && params.mutualchecklist != null &&
params.mutualchecklist.fill_in_content != null && params.mutualchecklist.fill_in_content != null &&
params.mutualchecklist.fill_in_content != '' params.mutualchecklist.fill_in_content != ""
) { ) {
this.ids = params.mutualchecklist.fill_in_content.split(',') this.ids = params.mutualchecklist.fill_in_content.split(",");
this.datafrom.record_id = this.datafrom.record_id =
params.mutualchecklist.record_id == null params.mutualchecklist.record_id == null
? 0 ? 0
: params.mutualchecklist.record_id : params.mutualchecklist.record_id;
} else if ( } else if (
fill_in_user_type == 3 && fill_in_user_type == 3 &&
params.seizurechecklist != null && params.seizurechecklist != null &&
params.seizurechecklist.fill_in_content != null && params.seizurechecklist.fill_in_content != null &&
params.seizurechecklist.fill_in_content != '' params.seizurechecklist.fill_in_content != ""
) { ) {
this.ids = params.seizurechecklist.fill_in_content.split(',') this.ids = params.seizurechecklist.fill_in_content.split(",");
this.datafrom.record_id = this.datafrom.record_id =
params.seizurechecklist.record_id == null params.seizurechecklist.record_id == null
? 0 ? 0
: params.seizurechecklist.record_id : params.seizurechecklist.record_id;
} }
this.datafrom.product_code = product_code this.datafrom.product_code = product_code.join(",");
this.datafrom.board_code = board_code // this.datafrom.board_code = board_code
this.loaddata() this.loaddata();
}, },
loaddata() { loaddata() {
this.moviedata = [] this.moviedata = [];
this.datasearch.ids = this.ids.join(',') this.datasearch.ids = this.ids.join(",");
var url = var url =
`${PlanUrl}/orderexecutequalitydata/getlist?` + `${PlanUrl}/orderexecutequalitydata/getlist?` +
QS.stringify(this.datasearch) QS.stringify(this.datasearch);
service.get(`${url}`).then((response) => { service.get(`${url}`).then(response => {
if (response.result != null) { if (response.result != null) {
this.moviedata = response.result this.moviedata = response.result;
} }
}) });
}, },
handlecancel(row, index) { handlecancel(row, index) {
this.editIndex = -1 this.editIndex = -1;
this.isadd = false this.isadd = false;
if (row.isnewadd) { if (row.isnewadd) {
this.data01.splice(index, 1) this.data01.splice(index, 1);
} }
}, },
handleAdd() { handleAdd() {
...@@ -186,137 +185,136 @@ export default { ...@@ -186,137 +185,136 @@ export default {
record_id: 0, record_id: 0,
dispatch_id: 0, dispatch_id: 0,
execute_id: 0, execute_id: 0,
order_id: '', order_id: "",
qc_card_id: 0, qc_card_id: 0,
fill_in_user_type: 0, fill_in_user_type: 0,
data_type: 0, data_type: 0,
data_content1: '', data_content1: "",
data_content2: '', data_content2: "",
data_content3: '', data_content3: "",
data_content4: '', data_content4: "",
product_code: '', product_code: "",
board_code: '', board_code: "",
isnewadd: true isnewadd: true
} };
;(this.data_content1 = ''), this.data_content1 = "";
(this.data_content2 = ''), this.data_content2 = "";
(this.data_content3 = ''), this.data_content3 = "";
(this.isadd = true) this.isadd = true;
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;
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;
this.data_content2 = row.data_content2 this.data_content2 = row.data_content2;
this.data_content3 = row.data_content3 this.data_content3 = row.data_content3;
this.editIndex = index this.editIndex = index;
}, },
handleSave(index) { handleSave(index) {
this.datafrom.data_content1 = this.data_content1 this.datafrom.data_content1 = this.data_content1;
this.datafrom.data_content2 = this.data_content2 this.datafrom.data_content2 = this.data_content2;
this.datafrom.data_content3 = this.data_content3 this.datafrom.data_content3 = this.data_content3;
this.datafrom.id = this.moviedata[index].id this.datafrom.id = this.moviedata[index].id;
this.ok(index) this.ok(index);
if (this.editIndex == this.moviedata.length - 1) { if (this.editIndex == this.moviedata.length - 1) {
this.isadd = false this.isadd = false;
this.moviedata[index].isnewadd = false this.moviedata[index].isnewadd = false;
} }
this.editIndex = -1 this.editIndex = -1;
}, },
ok(index) { ok(index) {
var url = `${PlanUrl}/orderexecutequalitydata/createorupdate` // this.datafrom.product_code=this.datafrom.product_code.join(',')
var url = `${PlanUrl}/orderexecutequalitydata/createorupdate`;
service service
.post( .post(`${url}`, {
`${url}`, OrderExecuteQualityData: this.datafrom
{ })
OrderExecuteQualityData: this.datafrom .then(response => {
}
)
.then((response) => {
if (response.success) { if (response.success) {
this.$Message.success('保存成功') this.$Message.success("保存成功");
this.ids.push(response.result.id) this.ids.push(response.result.id);
this.moviedata.splice(index, 1) this.moviedata.splice(index, 1);
this.moviedata.push(response.result) this.moviedata.push(response.result);
this.cleardata() this.cleardata();
this.$emit( this.$emit(
'binddataid', "binddataid",
this.datafrom.qc_card_id, this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type, this.datafrom.fill_in_user_type,
this.ids.join(','), this.ids.join(","),
true true
) );
//this.loaddata() // this.loaddata();
} }
}) })
.catch((error) => { .catch(error => {
this.$Message.error('保存失败') this.$Message.error("保存失败");
}) });
}, },
cancel() { cancel() {
this.cleardata() this.cleardata();
}, },
cleardata() { cleardata() {
this.datafrom.id = 0 this.datafrom.id = 0;
this.datafrom.data_content1 = '' this.datafrom.data_content1 = "";
this.datafrom.data_content2 = '' this.datafrom.data_content2 = "";
this.datafrom.data_content3 = '' this.datafrom.data_content3 = "";
}, },
handledel(row, index) { handledel(row, index) {
let id = row.id let id = row.id;
if (id == 0) { if (id == 0) {
this.moviedata.splice(index, 1) this.moviedata.splice(index, 1);
} else { } else {
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: "提示",
content: '确定要删除当前行?', content: "确定要删除当前行?",
onOk: () => { onOk: () => {
var url = var url =
`${PlanUrl}/orderexecutequalitydata/delete?id=` + `${PlanUrl}/orderexecutequalitydata/delete?id=` +
row.id + row.id +
'&record_id=' + "&record_id=" +
row.record_id row.record_id;
service service
.delete(`${url}`) .delete(`${url}`)
.then((response) => { .then(response => {
if (response.success) { if (response.success) {
this.$Message.success('删除成功') this.$Message.success("删除成功");
this.ids.splice(index, 1) this.ids.splice(index, 1);
this.moviedata.splice(index, 1) this.moviedata.splice(index, 1);
// this.loaddata() // this.loaddata()
this.$emit( this.$emit(
'binddataid', "binddataid",
this.datafrom.qc_card_id, this.datafrom.qc_card_id,
this.datafrom.fill_in_user_type, this.datafrom.fill_in_user_type,
this.ids.join(',') this.ids.join(",")
) );
} else { } else {
this.$Message.error('删除失败') this.$Message.error("删除失败");
} }
}) })
.catch((error) => { .catch(error => {
this.$Message.error('删除失败') this.$Message.error("删除失败");
}) });
}, },
onCancel: () => {} onCancel: () => {}
}) });
} }
} }
} }
} };
</script> </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
...@@ -22,7 +22,13 @@ ...@@ -22,7 +22,13 @@
</template>--> </template>-->
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button> <Button type="primary" @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" @click="SendCheck()" class="title_btn ml10">送检</Button> <Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button
type="primary"
:disabled="ishavzj"
@click="SendCheckRecord()"
class="title_btn ml10"
>送检记录</Button>
</div> </div>
<div class="table-i"> <div class="table-i">
<Table border :columns="columns12" :data="recorddata"> <Table border :columns="columns12" :data="recorddata">
...@@ -135,6 +141,14 @@ ...@@ -135,6 +141,14 @@
</template> </template>
</template> </template>
</template> </template>
<template slot-scope="{ row,index }" slot="isPhotograph">
<template v-if="row.isPhotograph==0">
<op class="view"></op>
</template>
<template v-else>
<op class="view" @click="showPhoto(row,false)">查看</op>
</template>
</template>
</Table> </Table>
</div> </div>
<Modal <Modal
...@@ -144,7 +158,7 @@ ...@@ -144,7 +158,7 @@
:footer-hide="true" :footer-hide="true"
:mask-closable="false" :mask-closable="false"
> >
<usercard ref="usercard"></usercard> <usercard ref="usercard" @on-ok="ok"></usercard>
</Modal> </Modal>
<Modal <Modal
v-model="sendCheckModal" v-model="sendCheckModal"
...@@ -164,6 +178,34 @@ ...@@ -164,6 +178,34 @@
> >
<entryrecorddata ref="entryrecorddata" @binddataid="binddataid"></entryrecorddata> <entryrecorddata ref="entryrecorddata" @binddataid="binddataid"></entryrecorddata>
</Modal> </Modal>
<Modal
v-model="entryrecordfilesModal"
title="附件列表"
width="940"
:footer-hide="true"
:mask-closable="false"
>
<entryrecordfiles @binddataid="binddataid" ref="entryrecordfiles"></entryrecordfiles>
</Modal>
<Modal
v-model="entryrecordmovieModal"
title="上传照片"
width="1340"
height="500"
:footer-hide="true"
:mask-closable="false"
>
<entryrecordMovie @bindPhotoid="bindPhotoid" ref="entryrecordMovie"></entryrecordMovie>
</Modal>
<Modal
v-model="sendCheckRecordModal"
title="送检记录"
width="1340"
:footer-hide="true"
:mask-closable="false"
>
<sendCheckRecord ref="sendCheckRecord"></sendCheckRecord>
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -171,13 +213,19 @@ import service from "@/plugins/request"; ...@@ -171,13 +213,19 @@ import service from "@/plugins/request";
import usercard from "./usercard.vue"; import usercard from "./usercard.vue";
import sendCheck from "./sendCheck.vue"; import sendCheck from "./sendCheck.vue";
import entryrecorddata from "./entryrecorddata.vue"; import entryrecorddata from "./entryrecorddata.vue";
import entryrecordMovie from "./entryrecordMovie.vue";
import sendCheckRecord from "./sendCheckRecord.vue";
import entryrecordfiles from "./entryrecordfiles.vue";
export default { export default {
name: "starOrder", name: "starOrder",
props: ["row"], props: ["row"],
components: { components: {
usercard, usercard,
sendCheck, sendCheck,
entryrecorddata entryrecorddata,
entryrecordMovie,
sendCheckRecord,
entryrecordfiles
}, },
data() { data() {
return { return {
...@@ -190,6 +238,9 @@ export default { ...@@ -190,6 +238,9 @@ export default {
usercardModal: false, usercardModal: false,
sendCheckModal: false, sendCheckModal: false,
entryrecorddataModal: false, entryrecorddataModal: false,
entryrecordfilesModal: false,
entryrecordmovieModal: false,
sendCheckRecordModal: false,
recorddata: [], recorddata: [],
entryModel: {}, entryModel: {},
look: "查看", look: "查看",
...@@ -368,15 +419,16 @@ export default { ...@@ -368,15 +419,16 @@ export default {
showrecordData(params, fill_in_user_type, isedit) { showrecordData(params, fill_in_user_type, isedit) {
this.qc_show_data = params; //表格列表row this.qc_show_data = params; //表格列表row
this.qc_show_fill_in_user_type = fill_in_user_type; //1,2,3;自检,互检,检验员 this.qc_show_fill_in_user_type = fill_in_user_type; //1,2,3;自检,互检,检验员
alert(params.fillintype);
if (params.fillintype == 3) { if (params.fillintype == 3) {
//fillintype 1 选择框 2 输入框 3 附件 4 键值对数据
//附件页面 //附件页面
this.entryrecordfilesModal = true; this.entryrecordfilesModal = true;
this.$refs.entryrecordfiles.loadpage( this.$refs.entryrecordfiles.loadpage(
params, params,
fill_in_user_type, fill_in_user_type,
this.product_ID, this.product_ID,
// this.board_ID, this.board_ID,
isedit isedit
); );
} else if (params.fillintype == 4) { } else if (params.fillintype == 4) {
...@@ -386,7 +438,7 @@ export default { ...@@ -386,7 +438,7 @@ export default {
params, params,
fill_in_user_type, fill_in_user_type,
this.product_ID, this.product_ID,
// this.board_ID, this.board_ID,
isedit isedit
); );
} }
...@@ -405,56 +457,114 @@ export default { ...@@ -405,56 +457,114 @@ export default {
} }
} }
}, },
loadproduct() { // loadproduct() {
var url = // var url =
`${PlanUrl}/orderexecutequalityrecord/getentryproductcode?entryID=` + // `${PlanUrl}/orderexecutequalityrecord/getentryproductcode?entryID=` +
this.datasearch.entryID; // this.datasearch.entryID;
service.get(`${url}`).then(response => { // service.get(`${url}`).then(response => {
this.product_List = response.result; // this.product_List = response.result;
this.board_List = response.result; // this.board_List = response.result;
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];
if (obj.productstatus == 1 || obj.productstatus == 2) { // if (obj.productstatus == 1 || obj.productstatus == 2) {
if (this.datasearch.isMain == 1) { // if (this.datasearch.isMain == 1) {
this.datasearch.productcode = obj.productids; // this.datasearch.productcode = obj.productids;
this.product_ID = obj.productids; // this.product_ID = obj.productids;
this.disabled = false; // this.disabled = false;
} else { // } else {
this.datasearch.productcode = obj.boardNumber; // this.datasearch.productcode = obj.boardNumber;
// this.board_ID = obj.boardNumber; // // this.board_ID = obj.boardNumber;
this.product_ID = obj.productids; // this.product_ID = obj.productids;
this.disabled = true; // this.disabled = true;
} // }
this.productobj = obj; // this.productobj = obj;
break; // break;
} // }
if ( // if (
this.productobj == null || // this.productobj == null ||
this.datasearch.productcode == "" || // this.datasearch.productcode == "" ||
typeof this.datasearch.productcode == "undefined" // typeof this.datasearch.productcode == "undefined"
) { // ) {
let obj = this.product_List[0]; // let obj = this.product_List[0];
if (this.datasearch.isMain == 1) { // if (this.datasearch.isMain == 1) {
this.datasearch.productcode = obj.productids; // this.datasearch.productcode = obj.productids;
this.product_ID = obj.productids; // this.product_ID = obj.productids;
this.disabled = false; // this.disabled = false;
} else { // } else {
this.datasearch.productcode = obj.boardNumber; // this.datasearch.productcode = obj.boardNumber;
// this.board_ID = obj.boardNumber; // // this.board_ID = obj.boardNumber;
this.product_ID = obj.productids; // this.product_ID = obj.productids;
this.disabled = true; // this.disabled = true;
} // }
this.productobj = obj; // this.productobj = obj;
} // }
// }
// this.loaddata();
// });
// },
showPhoto(params, isedit) {
this.entryrecordmovieModal = true;
this.$refs.entryrecordMovie.loadpage(
params,
this.product_ID,
this.board_ID,
isedit
);
},
ok() {
this.usercardModal = false;
this.loaddata();
},
bindPhotoid(qc_card_id, content) {
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.qc_card_id == qc_card_id) {
obj.movieid = content;
} }
}
},
handleselfCheckAll() {
this.isselfCheckAll = !this.isselfCheckAll;
this.loaddata(); for (let i = 0; i < this.recorddata.length; i++) {
}); let obj = this.recorddata[i];
if (obj.fillintype == 1) {
obj.selfchecklist.fill_in_content = this.isselfCheckAll ? "1" : "0";
obj.selfchecklist.checkstatus = this.isselfCheckAll;
}
}
},
handlemutualCheckAll() {
this.ismutualCheckAll = !this.ismutualCheckAll;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.fillintype == 1) {
obj.mutualchecklist.fill_in_content = this.ismutualCheckAll
? "1"
: "0";
obj.mutualchecklist.checkstatus = this.ismutualCheckAll;
}
}
},
handleseizureCheckAll() {
this.isseizureCheckAll = !this.isseizureCheckAll;
for (let i = 0; i < this.recorddata.length; i++) {
let obj = this.recorddata[i];
if (obj.fillintype == 1) {
obj.seizurechecklist.fill_in_content = this.isseizureCheckAll
? "1"
: "0";
obj.seizurechecklist.checkstatus = this.isseizureCheckAll;
}
}
}, },
show(index) { show(index) {
this.$Modal.info({ this.$Modal.info({
...@@ -473,7 +583,6 @@ export default { ...@@ -473,7 +583,6 @@ export default {
// console.log(this.$refs.codes.dic); // console.log(this.$refs.codes.dic);
this.$refs.usercard.product_List = this.$refs.codes.dic; this.$refs.usercard.product_List = this.$refs.codes.dic;
this.usercardModal = true; this.usercardModal = true;
let fillModel = { let fillModel = {
fill_in_user_type: fill_in_user_type, //自检,互检 fill_in_user_type: fill_in_user_type, //自检,互检
...@@ -487,7 +596,7 @@ export default { ...@@ -487,7 +596,7 @@ export default {
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);
if (fill_in_user_type == 1) { if (fill_in_user_type == 1) {
//自检 //自检
...@@ -510,8 +619,8 @@ export default { ...@@ -510,8 +619,8 @@ export default {
} }
} else if (fill_in_user_type == 2) { } else if (fill_in_user_type == 2) {
//互检 //互检
if (obj.inspect_type == 2 || obj.inspect_type == 3) { if (obj.check_type == 2 || obj.check_type == 3) {
//是否需要互检,2和3需要互检和专检 //是否需要互检,2和3需要互检和专检 inspect_type
if ( if (
(obj.mutualchecklist.fillinstatus == "0" && (obj.mutualchecklist.fillinstatus == "0" &&
obj.mutualchecklist != null && obj.mutualchecklist != null &&
...@@ -532,20 +641,47 @@ export default { ...@@ -532,20 +641,47 @@ export default {
} else if (inspect_type == 3) { } else if (inspect_type == 3) {
} }
} }
if (recordList.length == 0) { if (recordList.length == 0) {
this.$Message.success("填报项为空,请进行填报"); this.$Message.success("填报项为空,请进行填报");
return; return;
} }
this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList); this.$refs.usercard.loadentry(this.entryModel, fillModel, recordList);
}, },
selfchecklistcheck(index, e) {
this.recorddata[index].selfchecklist.checkstatus = e;
this.recorddata[index].selfchecklist.fill_in_content = e ? "1" : "0";
},
selfchecklistinput(index, e) {
this.recorddata[index].selfchecklist.fill_in_content = e.target.value;
},
mutualchecklistcheck(index, e) {
this.recorddata[index].mutualchecklist.checkstatus = e;
this.recorddata[index].mutualchecklist.fill_in_content = e ? "1" : "0";
},
mutualchecklistinput(index, e) {
this.recorddata[index].mutualchecklist.fill_in_content = e.target.value;
},
seizurechecklistcheck(index, e) {
this.recorddata[index].seizurechecklist.checkstatus = e;
this.recorddata[index].seizurechecklist.fill_in_content = e ? "1" : "0";
},
seizurechecklistinput(index, e) {
this.recorddata[index].seizurechecklist.fill_in_content = e.target.value;
},
SendCheck() { SendCheck() {
this.sendCheckModal = true; this.sendCheckModal = true;
this.$refs.sendCheck.loadentry(this.entryModel); this.$refs.sendCheck.loadentry(this.entryModel);
}, },
selfchecklistinput() {} selfchecklistinput() {},
SendCheckRecord() {
this.sendCheckRecordModal = true;
this.$refs.sendCheckRecord.load(this.entryModel.id);
}
} }
}; };
</script> </script>
......
<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
...@@ -120,8 +120,9 @@ export default { ...@@ -120,8 +120,9 @@ export default {
.then(response => { .then(response => {
if (response.success) { if (response.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$parent.$parent.loadproduct(); // this.$parent.loadproduct();
this.$parent.$parent.usercardModal = false; // this.$parent.$parent.usercardModal = false;
this.$emit('on-ok')
} }
}) })
.catch(error => { .catch(error => {
...@@ -133,7 +134,6 @@ export default { ...@@ -133,7 +134,6 @@ export default {
}, },
handleClose() {}, handleClose() {},
loadentry(entryModel, fillModel, recordList) { loadentry(entryModel, fillModel, recordList) {
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;
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
// } // }
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); // this.board_ID.push(fillModel.board_ID);
if ( if (
fillModel.fill_in_user_type == 1 || fillModel.fill_in_user_type == 1 ||
...@@ -182,6 +182,7 @@ export default { ...@@ -182,6 +182,7 @@ export default {
}, },
peoductAllOnchange(e) { peoductAllOnchange(e) {
if (e) { if (e) {
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.value);
...@@ -192,7 +193,7 @@ export default { ...@@ -192,7 +193,7 @@ export default {
} }
}, },
productonchange(e) {}, productonchange(e) {},
getCurrentUser(e) { getCurrentUser(e) {
if (e) { if (e) {
console.log(this.$store.state.admin.user.info); console.log(this.$store.state.admin.user.info);
......
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