Browse Source

2023-09-19 设备和质量修改

java8
杨奉源 3 years ago
parent
commit
ac7a6ceeab
  1. 17
      src/api/qc/qc.js
  2. 304
      src/views/modules/qc/FAIResultEntry.vue
  3. 1613
      src/views/modules/qc/FQCResultEntry.vue
  4. 315
      src/views/modules/qc/IPQCResultEntry.vue
  5. 35
      src/views/modules/qc/IQCResultEntry.vue
  6. 376
      src/views/modules/qc/qcFamilyAttribute.vue
  7. 416
      src/views/modules/qc/qcPartAttribute.vue
  8. 4
      src/views/modules/qc/qc_FAI_upload_file.vue

17
src/api/qc/qc.js

@ -98,6 +98,20 @@ export const saveFAISubDetailed = data => createAPI(`/pms/qc/saveFAISubDetailed`
export const selectFAISubDetailedRecord = data => createAPI(`/pms/qc/selectFAISubDetailedRecord`,'post',data)
export const checkFAIIsSubmit = data => createAPI(`/pms/qc/checkFAIIsSubmit`,'post',data)
export const checkFAISubDetailValue = data => createAPI(`/pms/qc/checkFAISubDetailValue`,'post',data)
export const saveFAIInspection = data => createAPI(`/pms/qc/saveFAIInspection`,'post',data)
// ===================================== FQC检验 =====================================
export const qcFQCInspectionSearch = data => createAPI(`/pms/qc/qcFQCInspectionSearch`,'post',data)
export const fqcDetailSearch = data => createAPI(`/pms/qc/fqcDetailSearch`,'post',data)
export const fqcRecordDelete = data => createAPI(`/pms/qc/fqcRecordDelete`,'post',data)
export const saveFQCDetailedRecord = data => createAPI(`/pms/qc/saveFQCDetailedRecord`,'post',data)
export const saveFQCSubmitResult = data => createAPI(`/pms/qc/saveFQCSubmitResult`,'post',data)
export const saveFQCSubDetailed = data => createAPI(`/pms/qc/saveFQCSubDetailed`,'post',data)
export const selectFQCSubDetailedRecord = data => createAPI(`/pms/qc/selectFQCSubDetailedRecord`,'post',data)
export const checkFQCIsSubmit = data => createAPI(`/pms/qc/checkFQCIsSubmit`,'post',data)
export const checkFQCSubDetailValue = data => createAPI(`/pms/qc/checkFQCSubDetailValue`,'post',data)
export const saveFQCInspection = data => createAPI(`/pms/qc/saveFQCInspection`,'post',data)
// ===================================== IPQC检验 =====================================
export const qcIPQCInspectionSearch = data => createAPI(`/pms/qc/qcIPQCInspectionSearch`,'post',data)
@ -113,6 +127,9 @@ export const getOperationList = data => createAPI(`/pms/qc/getOperationList`,'po
export const getResourceList = data => createAPI(`/pms/qc/getResourceList`,'post',data)
export const getPartList = data => createAPI(`/pms/qc/getPartList`,'post',data)
export const saveOsInspection = data => createAPI(`/pms/qc/saveOsInspection`,'post',data)
export const getAllResourceList = data => createAPI(`/pms/qc/getAllResourceList`,'post',data)
export const getOrderNoList = data => createAPI(`/pms/qc/getOrderNoList`,'post',data)
// ===================================== IQC检验 =====================================
export const qcIQCInspectionSearch = data => createAPI(`/pms/qc/qcIQCInspectionSearch`,'post',data)

304
src/views/modules/qc/FAIResultEntry.vue

@ -42,8 +42,8 @@
</el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="doEmpty()">清空</el-button>
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="submitResult()">审核</el-button>
<el-button type="primary" @click="deleteModal()">删除</el-button>
<download-excel
@ -132,6 +132,57 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 新增检验记录 -->
<el-dialog title="新增检验记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="orderNo" :rules="rules.orderNoType">
<span slot="label" @click="getBaseList(1052)"><a herf="#">工单号</a></span>
<el-input v-model="modalData.orderNo" style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="送检数量:" prop="rollQty" :rules="rules.rollQtyType">
<el-input v-model="modalData.rollQty" type="number" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
<el-select v-model="modalData.operationDesc" @change="getResourceList()" placeholder="请选择" style="width: 221px">
<el-option
v-for = "i in operationList"
:key = "i.operationNo"
:label = "i.operationDesc"
:value = "i.operationDesc">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="机台" prop="resourceId" :rules="rules.resourceIdType">
<el-select v-model="modalData.resourceId" placeholder="请选择" style="width: 221px">
<el-option
v-for = "i in resourceList"
:key = "i.resourceId"
:label = "i.resourceDesc"
:value = "i.resourceId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料" prop="partNo" :rules="rules.partNoType">
<el-select v-model="modalData.partNo" placeholder="请选择" style="width: 456px">
<el-option
v-for = "i in partList"
:key = "i.partNo"
:label = "i.partDesc"
:value = "i.partNo">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 检验单详情页 -->
<el-dialog title="检验明细清单" :close-on-click-modal="false" v-drag :visible.sync="detailInformationFlag" width="1200px">
<el-form :inline="true" label-position="top" @keyup.enter.native = "getDataList()">
@ -346,6 +397,9 @@
</el-table>
</el-dialog>
<!-- chooselist模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
<qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getDataList()" v-drag></qcFAIUploadFile>
</div>
@ -362,7 +416,11 @@
saveFAISubDetailed, //
selectFAISubDetailedRecord, //
checkFAIIsSubmit, //
checkFAISubDetailValue //
checkFAISubDetailValue, //
getResourceList, //
getOperationList, //
getPartList, //
saveFAIInspection, // FAI
} from "@/api/qc/qc.js";
import Chooselist from '@/views/modules/common/Chooselist_eam';
import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js';
@ -376,9 +434,6 @@
components: {
Chooselist,
qcFAIUploadFile
},
watch: {
},
data () {
return {
@ -425,16 +480,16 @@
dataListLoading: false,
dataListSelections: [],
modalData: {
flag:'',
flag: '',
site: this.$store.state.user.site,
inspectionNo:'',
inspectionNo: '',
partNo: '',
partDesc: '',
inspectionTypeNo:'102',
inspectionTypeName:'FAI',
inspectorNo:'',
inspectorName:'',
submit_flag:'',
inspectionTypeNo: '106',
inspectionTypeName: '',
inspectorNo: '',
inspectorName: '',
submit_flag: '',
},
//
columnList: [
@ -859,6 +914,47 @@
},
options: [],
FAISelections: [],
modalFlag: false,
rules:{
orderNoType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
operationDescType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
resourceIdType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
partNoType:[
{
required: true,
message: ' ',
trigger: 'change'
}
],
rollQtyType:[
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
resourceList: [],
operationList: [],
partList: [],
}
},
mounted () {
@ -871,20 +967,159 @@
this.favoriteIsOk()
},
methods: {
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 1052) {
strVal = this.modalData.orderNo
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1052) {
this.modalData.orderNo = val.orderno
this.getOperationList()
this.getPartList()
}
},
//
getResourceList(){
getResourceList(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.resourceList = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
getOperationList(){
getOperationList(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
getPartList(){
getPartList(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.partList = data.rows
this.modalData.partNo = this.partList[0].partNo
this.modalData.partDesc = this.partList[0].partDesc
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
// FAI
saveData(){
if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
this.$message.warning('请选择工单!')
return
}
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请选择物料!')
return
}
if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
this.$message.warning('请选择工序!')
return
}
if (this.modalData.resourceId === '' || this.modalData.resourceId == null) {
this.$message.warning('请选择机台!')
return
}
if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
this.$message.warning('请填写送检数量!')
return
}
if(this.modalData.flag === '1'){
saveFAIInspection(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.operationList = []
this.resourceList = []
this.partList = []
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
//
addModal(){
this.modalData = {
flag: '1',
site: this.$store.state.user.site,
inspectionNo: '',
partNo: '',
partDesc: '',
inspectionTypeNo: '106',
inspectionTypeName: '',
inspectorNo: '',
inspectorName: '',
submit_flag: '',
orderNo: '',
operationDesc: '',
operationNo: '',
resourceId: '',
resourceDesc: '',
rollQty: '',
};
this.operationList = [];
this.resourceList = [];
this.partList = [];
this.modalDisableFlag = false;
this.modalFlag = true;
},
selectFlag(){
return true;
},
//
FAIClickRow(row){
this.$refs.FAITable.toggleRowSelection(row);
},
//
selectionFAI(val){
this.FAISelections = val
},
//
getFileContentData(row) {
let currentData = {
orderRef1: row.site,
orderRef2: row.inspectionNo
};
getFileContentList(currentData).then(({data}) => {
@ -897,9 +1132,11 @@
})
this.fileFlag = true;
},
/*新增文件的modal*/
addUploadFileModal(){
let currentData = {
titleCon: 'FAI文件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
@ -911,6 +1148,7 @@
this.$refs.qcFAIUploadFile.init(currentData);
})
},
downloadFile(row){
downLoadObjectFile(row)
.then(({data}) => {
@ -933,8 +1171,13 @@
document.body.removeChild(linkNode)
})
},
//
deleteFile(row){
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -942,7 +1185,7 @@
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code === 0) {
this.getFileContentData(row);
this.getFileContentData(tempData);
this.$message({
message: '操作成功',
type: 'success',
@ -968,21 +1211,7 @@
}
})
},
//
doEmpty(){
this.searchData = {
site: this.$store.state.user.site,
inspectionNo: '',
state: '',
inspectionResult: '',
orderNo: '',
operationDesc: '',
startDate: '',
endDate: '',
page: 1,
limit: 10,
}
},
//
getDataList () {
this.searchData.limit = this.pageSize
@ -997,21 +1226,25 @@
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
},
//
deleteModal () {
if(this.FAISelections.length === 0){
@ -1049,6 +1282,7 @@
}).catch(() => {
})
},
Transfer(){
if (this.detailData.inspectionResult === '' || this.detailData.inspectionResult == null) {
this.$alert('请选择检验结论!', '错误', {
@ -1096,6 +1330,7 @@
}
this.$message({message: '操作成功', type: 'success', duration: 1500, onClose: () => {}})
},
//
saveDetailInformation(){
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -1139,6 +1374,7 @@
this.inspectorSearch();
this.detailInformationFlag = true;
},
//
subDetailModal(row){
this.subDetailData.inspectionNo = row.inspectionNo;
@ -1152,6 +1388,7 @@
})
this.subDetailFlag = true;
},
//
submitResult(){
let tempData1 = '' //
@ -1210,15 +1447,18 @@
}).catch(() => {
})
},
//
//
rowClassName({ row, rowIndex }) {
row.xh = rowIndex + 1;
},
//
handleDetailSelectionChange(selection) {
this.checkedDetail = selection;
},
//
handleAddBtn(td) {
checkFAIIsSubmit(td).then(({data}) => {
@ -1235,6 +1475,7 @@
}
})
},
//
handleDeleteBtn(td) {
checkFAIIsSubmit(td).then(({data}) => {
@ -1282,6 +1523,7 @@
})
},
//
saveSubDetailResult(){
for (let i = 0; i < this.tableData.length; i++) {
@ -1313,7 +1555,6 @@
})
},
//
favoriteIsOk() {
let userFavorite = {
@ -1332,6 +1573,7 @@
})
},
// OR
favoriteFunction() {
let userFavorite = {
@ -1369,13 +1611,16 @@
return this.exportList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
@ -1391,7 +1636,6 @@
return s
},
// end
}
}
</script>

1613
src/views/modules/qc/FQCResultEntry.vue
File diff suppressed because it is too large
View File

315
src/views/modules/qc/IPQCResultEntry.vue

@ -9,10 +9,10 @@
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" >
<el-form-item :label="'检验单号'">
<el-input v-model="searchData.inspectionNo" style="width: 120px"></el-input>
<el-input v-model="searchData.inspectionNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料编码'">
<el-input v-model="searchData.partNo" style="width: 120px"></el-input>
<el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'状态'">
<el-select v-model="searchData.state" style="width: 100px">
@ -30,29 +30,28 @@
</el-select>
</el-form-item>
<el-form-item :label="'检验类型'">
<el-select v-model="searchData.checkType" style="width: 100px">
<el-select v-model="searchData.inspectionTypeNo" style="width: 100px">
<el-option label="全部" value=""></el-option>
<el-option label="巡检" value="巡检"></el-option>
<el-option label="末件检" value="末件检"></el-option>
<el-option label="IPQC首检" value="101"></el-option>
<el-option label="IPQC自检" value="102"></el-option>
<el-option label="IPQC巡检" value="103"></el-option>
<el-option label="IPQC末件检" value="104"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="'工单号'">
<el-input v-model="searchData.orderNo" style="width: 120px"></el-input>
<el-input v-model="searchData.orderNo" clearable style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="searchData">
<el-form-item :label="'工序'">
<el-input v-model="searchData.operationDesc" style="width: 120px"></el-input>
<el-input v-model="searchData.operationDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'检验时间:'">
<el-date-picker style="width: 150px" v-model="searchData.startDate" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期">
</el-date-picker>
<el-date-picker style="width: 150px" v-model="searchData.startDate" type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="开始日期"></el-date-picker>
-
<el-date-picker style="width: 150px" v-model="searchData.endDate" type="datetime"
value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期">
</el-date-picker>
<el-date-picker style="width: 150px" v-model="searchData.endDate" type="datetime" value-format='yyyy-MM-dd HH:mm:ss' format='yyyy-MM-dd HH:mm:ss' placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="doEmpty()">清空</el-button>
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<el-button type="primary" @click="submitResult()">审核</el-button>
@ -142,14 +141,28 @@
</el-pagination>
<!-- 新增巡检记录 -->
<el-dialog title="新增巡检记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="430px">
<el-dialog title="新增巡检记录" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="orderNo" :rules="rules.orderNoType">
<span slot="label" style="" @click="getBaseList(1052)"><a herf="#">工单号</a></span>
<el-input v-model="modalData.orderNo" style="width: 120px"></el-input>
<span slot="label" @click="getBaseList(1052)"><a herf="#">工单号</a></span>
<el-input v-model="modalData.orderNo" style="width: 221px"></el-input>
</el-form-item>
<!-- <el-form-item prop="orderNo" :rules="rules.orderNoType">-->
<!-- <span slot="label" @click="getOrderNoList"><a herf="#">工单号</a></span>-->
<!-- <el-input v-model="modalData.orderNo" @change="orderNoChange()" style="width: 221px"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="检验类型" prop="inspectionTypeNo" :rules="rules.inspectionTypeNoType">
<el-select v-model="modalData.inspectionTypeNo" style="width: 221px">
<el-option label="首件检" value="101"></el-option>
<el-option label="自检" value="102"></el-option>
<el-option label="巡检" value="103"></el-option>
<el-option label="末件检" value="104"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="工序" prop="operationDesc" :rules="rules.operationDescType">
<el-select v-model="modalData.operationDesc" @change="getResourceList()" placeholder="请选择" style="width: 120px">
<el-select v-model="modalData.operationDesc" @change="getResourceList()" placeholder="请选择" style="width: 221px">
<el-option
v-for = "i in operationList"
:key = "i.operationNo"
@ -159,7 +172,7 @@
</el-select>
</el-form-item>
<el-form-item label="机台" prop="resourceId" :rules="rules.resourceIdType">
<el-select v-model="modalData.resourceId" placeholder="请选择" style="width: 120px">
<el-select v-model="modalData.resourceId" placeholder="请选择" style="width: 221px">
<el-option
v-for = "i in resourceList"
:key = "i.resourceId"
@ -168,8 +181,10 @@
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料" prop="partNo" :rules="rules.partNoType">
<el-select v-model="modalData.partNo" placeholder="请选择" style="width: 255px">
<el-select v-model="modalData.partNo" placeholder="请选择" style="width: 321px">
<el-option
v-for = "i in partList"
:key = "i.partNo"
@ -331,6 +346,55 @@
</el-footer>
</el-dialog>
<!-- &lt;!&ndash; 工单清单 &ndash;&gt;-->
<!-- <el-dialog title="工单清单" :close-on-click-modal="false" v-drag :visible.sync="orderNoModelFlag" width="720px">-->
<!-- <div class="rq">-->
<!-- <el-form :inline="true" label-position="top" :model="orderNoData">-->
<!-- <el-form-item :label="'工单号'">-->
<!-- <el-input v-model="orderNoData.orderNo" clearable style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="' '">-->
<!-- <el-button type="primary" @click="getOrderNoList2()">查询</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-table-->
<!-- :height="300"-->
<!-- :data="orderNoList"-->
<!-- ref="orderNoTable"-->
<!-- @row-click="orderNoClickRow"-->
<!-- @selection-change="selectionOrderNoChangeHandle"-->
<!-- border-->
<!-- v-loading="dataListLoading"-->
<!-- :row-class-name="orderNoRowClassName"-->
<!-- style="width: 100%;">-->
<!-- <el-table-column type="index" width="50" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-radio v-model="orderNoCurrent" :label="scope.row.index">{{''}}</el-radio>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="orderNo"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- label="工单号">-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!--&lt;!&ndash; &lt;!&ndash; 分页&ndash;&gt;&ndash;&gt;-->
<!--&lt;!&ndash; <el-pagination&ndash;&gt;-->
<!--&lt;!&ndash; @size-change="sizeChangeHandle2"&ndash;&gt;-->
<!--&lt;!&ndash; @current-change="currentChangeHandle2"&ndash;&gt;-->
<!--&lt;!&ndash; :current-page="pageIndex2"&ndash;&gt;-->
<!--&lt;!&ndash; :page-sizes="[20, 50, 100, 200, 500]"&ndash;&gt;-->
<!--&lt;!&ndash; :page-size="pageSize2"&ndash;&gt;-->
<!--&lt;!&ndash; :total="totalPage2"&ndash;&gt;-->
<!--&lt;!&ndash; layout="total, sizes, prev, pager, next, jumper">&ndash;&gt;-->
<!--&lt;!&ndash; </el-pagination>&ndash;&gt;-->
<!-- </div>-->
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">-->
<!-- <el-button type="primary" @click="confirmOrderNo()">确认</el-button>-->
<!-- </el-footer>-->
<!-- </el-dialog>-->
<!-- 子明细信息 -->
<el-dialog title="子明细信息" :close-on-click-modal="false" v-drag :visible.sync="subDetailFlag" width="471px">
<el-button type="success" icon="el-icon-plus" size="mini" @click="handleAddBtn(subDetailData)">添加</el-button>
@ -424,6 +488,7 @@
getResourceList, //
getPartList, //
saveOsInspection, //
getOrderNoList //
} from "@/api/qc/qc.js";
import Chooselist from '@/views/modules/common/Chooselist_eam';
import {getFileContentList, downLoadObjectFile} from '@/api/eam/eam_object_list.js';
@ -437,9 +502,6 @@
components: {
Chooselist,
qcFAIUploadFile
},
watch: {
},
data () {
return {
@ -475,7 +537,7 @@
operationDesc: '',
startDate: '',
endDate: '',
checkType: '',
inspectionTypeNo: '',
partNo: '',
page: 1,
limit: 10,
@ -483,6 +545,9 @@
pageIndex: 1,
pageSize: 50,
totalPage: 0,
// pageIndex2: 1,
// pageSize2: 20,
// totalPage2: 0,
height: 200,
dataList: [],
dataListLoading: false,
@ -544,7 +609,7 @@
fixed: '',
},
{
columnProp: 'checkType',
columnProp: 'inspectionTypeName',
headerAlign: "center",
align: "center",
columnLabel: '检验类型',
@ -981,7 +1046,23 @@
trigger: 'change'
}
],
}
inspectionTypeNoType: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
// orderNoData:{
// limit: 10,
// page: 1,
// site: this.$store.state.user.site,
// orderNo: ''
// },
// orderNoModelFlag: false,
// orderNoList: [],
// orderNoCurrent: -1
}
},
mounted () {
@ -997,17 +1078,21 @@
selectFlag(){
return true;
},
//
IPQCClickRow(row){
this.$refs.IPQCTable.toggleRowSelection(row);
},
//
selectionIPQC(val){
this.IPQCSelections = val
},
//
getFileContentData(row) {
let currentData = {
orderRef1: row.site,
orderRef2: row.inspectionNo
};
getFileContentList(currentData).then(({data}) => {
@ -1020,9 +1105,11 @@
})
this.fileFlag = true;
},
/*新增文件的modal*/
addUploadFileModal(){
let currentData = {
titleCon: 'IPQC文件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
@ -1034,6 +1121,7 @@
this.$refs.qcFAIUploadFile.init(currentData);
})
},
downloadFile(row){
downLoadObjectFile(row)
.then(({data}) => {
@ -1056,8 +1144,13 @@
document.body.removeChild(linkNode)
})
},
//
deleteFile(row){
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -1065,7 +1158,7 @@
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code == 0) {
this.getFileContentData(row);
this.getFileContentData(tempData);
this.$message({
message: '操作成功',
type: 'success',
@ -1091,22 +1184,7 @@
}
})
},
//
doEmpty(){
this.searchData = {
site: this.$store.state.user.site,
inspectionNo: '',
state: '',
inspectionResult: '',
orderNo: '',
operationDesc: '',
startDate: '',
endDate: '',
checkType: '',
page: 1,
limit: 10,
}
},
// S
getBaseList (val,type) {
this.tagNo = val
@ -1118,6 +1196,7 @@
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1052) {
@ -1126,6 +1205,68 @@
this.getPartList()
}
},
// //
// orderNoChange () {
// this.getOperationList()
// this.getPartList()
// },
//
// //
// getOrderNoList(){
// // this.orderNoData.limit = this.pageSize2
// // this.orderNoData.page = this.pageIndex2
// getOrderNoList(this.orderNoData).then(({data}) => {
// if (data && data.code === 0) {
// this.orderNoList = data.rows
// // this.pageIndex2 = data.page.currPage
// // this.pageSize2 = data.page.pageSize
// // this.totalPage2 = data.page.totalCount
// this.orderNoModelFlag = true
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// },
// //
// getOrderNoList2(){
// // this.orderNoData.limit = this.pageSize2
// // this.orderNoData.page = this.pageIndex2
// getOrderNoList(this.orderNoData).then(({data}) => {
// if (data && data.code === 0) {
// this.orderNoList = data.rows
// // this.pageIndex2 = data.page.currPage
// // this.pageSize2 = data.page.pageSize
// // this.totalPage2 = data.page.totalCount
// this.orderNoCurrent = -1
// } else {
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
// }
// })
// },
// //
// orderNoClickRow (row) {
// this.$refs.orderNoTable.toggleRowSelection(row);
// },
// //
// selectionOrderNoChangeHandle (val) {
// this.modalData.orderNo = val[0].orderNo
// if (val) {
// this.orderNoCurrent = val.index;
// }
// },
// orderNoRowClassName ({row, rowIndex}) {
// row.index = rowIndex; // index
// },
// //
// confirmOrderNo () {
// this.orderNoModelFlag = false
// },
//
getOperationList(){
getOperationList(this.modalData).then(({data}) => {
@ -1138,6 +1279,7 @@
}
})
},
//
getResourceList(){
getResourceList(this.modalData).then(({data}) => {
@ -1150,11 +1292,14 @@
}
})
},
//
getPartList(){
getPartList(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.partList = data.rows
this.modalData.partNo = this.partList[0].partNo
this.modalData.partDesc = this.partList[0].partDesc
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -1162,6 +1307,7 @@
}
})
},
addModal(){
this.modalData = {
flag: '1',
@ -1169,8 +1315,8 @@
inspectionNo:'',
partNo: '',
partDesc: '',
inspectionTypeNo:'101',
inspectionTypeName:'IPQC',
inspectionTypeNo:'',
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
submit_flag:'',
@ -1187,39 +1333,34 @@
this.modalDisableFlag = false;
this.modalFlag = true;
},
// IPQC
saveData(){
if (this.modalData.orderNo == '' || this.modalData.orderNo == null) {
this.$alert('请选择工单!', '错误', {
confirmButtonText: '确定'
})
return false
if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
this.$message.warning('请选择工单!')
return
}
if (this.modalData.partNo == '' || this.modalData.partNo == null) {
this.$alert('请选择物料!', '错误', {
confirmButtonText: '确定'
})
return false
if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
this.$message.warning('请选择检验类型!')
return
}
if (this.modalData.operationDesc == '' || this.modalData.operationDesc == null) {
this.$alert('请选择工序!', '错误', {
confirmButtonText: '确定'
})
return false
if (this.modalData.partNo === '' || this.modalData.partNo == null) {
this.$message.warning('请选择物料!')
return
}
if (this.modalData.resourceId == '' || this.modalData.resourceId == null) {
this.$alert('请选择机台!', '错误', {
confirmButtonText: '确定'
})
return false
if (this.modalData.operationDesc === '' || this.modalData.operationDesc == null) {
this.$message.warning('请选择工序!')
return
}
if (this.modalData.rollQty == '' || this.modalData.rollQty == null) {
this.$alert('请填写送检数量!', '错误', {
confirmButtonText: '确定'
})
return false
if (this.modalData.resourceId === '' || this.modalData.resourceId == null) {
this.$message.warning('请选择机台!')
return
}
if(this.modalData.flag=='1'){
if (this.modalData.rollQty === '' || this.modalData.rollQty == null) {
this.$message.warning('请填写送检数量!')
return
}
if(this.modalData.flag === '1'){
saveOsInspection(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@ -1257,22 +1398,37 @@
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
},
// //
// sizeChangeHandle2 (val) {
// this.pageSize2 = val
// this.pageIndex2 = 1
// this.getOrderNoList()
// },
// //
// currentChangeHandle2 (val) {
// this.pageIndex2 = val
// this.getOrderNoList()
// },
//
deleteModal () {
if(this.IPQCSelections.length == 0){
@ -1310,6 +1466,7 @@
}).catch(() => {
})
},
Transfer(){
if (this.detailData.inspectionResult == '' || this.detailData.inspectionResult == null) {
this.$alert('请选择检验结论!', '错误', {
@ -1357,6 +1514,7 @@
}
this.$message({message: '操作成功', type: 'success', duration: 1500, onClose: () => {}})
},
//
saveDetailInformation(){
this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -1400,6 +1558,7 @@
this.inspectorSearch();
this.detailInformationFlag = true;
},
//
subDetailModal(row){
this.subDetailData.inspectionNo = row.inspectionNo;
@ -1413,6 +1572,7 @@
})
this.subDetailFlag = true;
},
//
submitResult(){
let tempData1 = '' //
@ -1471,15 +1631,18 @@
}).catch(() => {
})
},
//
//
rowClassName({ row, rowIndex }) {
row.xh = rowIndex + 1;
},
//
handleDetailSelectionChange(selection) {
this.checkedDetail = selection;
},
//
handleAddBtn(td) {
checkIPQCIsSubmit(td).then(({data}) => {
@ -1496,6 +1659,7 @@
}
})
},
//
handleDeleteBtn(td) {
checkIPQCIsSubmit(td).then(({data}) => {
@ -1541,6 +1705,7 @@
}
})
},
//
saveSubDetailResult(){
for (let i = 0; i < this.tableData.length; i++) {
@ -1572,7 +1737,6 @@
})
},
//
favoriteIsOk() {
let userFavorite = {
@ -1591,6 +1755,7 @@
})
},
// OR
favoriteFunction() {
let userFavorite = {
@ -1628,13 +1793,15 @@
return this.exportList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
@ -1649,8 +1816,6 @@
return s
},
// end
}
}
</script>

35
src/views/modules/qc/IQCResultEntry.vue

@ -33,16 +33,11 @@
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'检验时间:'">
<el-date-picker style="width: 150px" v-model="searchData.startDate" type="datetime"
value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期">
</el-date-picker>
<el-date-picker style="width: 150px" v-model="searchData.startDate" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="开始日期"></el-date-picker>
-
<el-date-picker style="width: 150px" v-model="searchData.endDate" type="datetime"
value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="结束日期">
</el-date-picker>
<el-date-picker style="width: 150px" v-model="searchData.endDate" type="datetime" value-format='yyyy-MM-dd HH:mm' format='yyyy-MM-dd HH:mm' placeholder="结束日期"></el-date-picker>
</el-form-item>
<el-form-item :label="' '">
<!-- <el-button @click="doEmpty()">清空</el-button>-->
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="submitResult()">审核</el-button>
<el-button type="primary" @click="deleteModal()">删除</el-button>
@ -347,6 +342,7 @@
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 上传文件的modal -->
<qcFAIUploadFile ref="qcFAIUploadFile" @refreshPageTables="getDataList()" v-drag></qcFAIUploadFile>
@ -564,7 +560,7 @@
fixed: '',
},
{
columnProp: 'supplierNo',
columnProp: 'supplierDesc',
headerAlign: "center",
align: "center",
columnLabel: '供应商',
@ -880,6 +876,7 @@
//
getFileContentData(row) {
let currentData = {
orderRef1: row.site,
orderRef2: row.inspectionNo
};
getFileContentList(currentData).then(({data}) => {
@ -895,6 +892,7 @@
/*新增文件的modal*/
addUploadFileModal(){
let currentData = {
titleCon: 'IQC文件上传',
site: this.$store.state.user.site,
createBy: this.$store.state.user.name,
inspectionNo: this.detailData.inspectionNo,
@ -930,6 +928,10 @@
},
//
deleteFile(row){
let tempData = {
site: row.orderRef1,
inspectionNo: row.orderRef2
}
this.$confirm('确定要删除此文件?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
@ -937,7 +939,7 @@
}).then(() => {
deleteObjectFile(row).then(({data}) => {
if (data && data.code == 0) {
this.getFileContentData(row);
this.getFileContentData(tempData);
this.$message({
message: '操作成功',
type: 'success',
@ -954,21 +956,6 @@
}).catch(() => {
})
},
// //
// doEmpty(){
// this.searchData = {
// site: this.$store.state.user.site,
// inspectionNo: '',
// inspectionTypeNo:'105',
// isQualified: '',
// startDate: '',
// endDate: '',
// partNo:'',
// partDesc:'',
// state: '',
// }
// },
// S
getBaseList (val,type) {
this.tagNo = val

376
src/views/modules/qc/qcFamilyAttribute.vue

@ -15,7 +15,6 @@
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<!-- <el-button @click="doEmpty()">清空</el-button>-->
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
</el-form-item>
@ -127,7 +126,7 @@
</el-footer>
</el-dialog>
<!-- 检验模板 -->
<!-- 检验模板清单 -->
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1400px">
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()">
<el-form-item :label="'类别编码'">
@ -177,10 +176,22 @@
</template>
</el-table-column>
<el-table-column
prop="specialField"
prop="operation"
header-align="center"
align="center"
label="工序 / 供应商">
label="工序">
</el-table-column>
<el-table-column
prop="resourceID"
header-align="center"
align="center"
label="机台">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
label="供应商">
</el-table-column>
<el-table-column
prop=""
@ -267,10 +278,10 @@
<div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="detailData">
<el-form-item :label="'模板编码'">
<el-input v-model="detailData.templateId" style="width: 120px"></el-input>
<el-input v-model="detailData.templateId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'模板名称'">
<el-input v-model="detailData.templateName" style="width: 120px"></el-input>
<el-input v-model="detailData.templateName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="检验类型">
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择">
@ -285,6 +296,13 @@
<el-form-item :label="' '">
<el-button type="primary" @click="checkInspectionType()">查询</el-button>
</el-form-item>
<el-form-item style="margin-left: 117px" :label="' '">
<el-button type="primary" @click="getOperationList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">工序</el-button>
<el-button type="primary" @click="getManufacturerList()" v-if="this.detailData.inspectionTypeNo === '105'" style="width: 63px">供应商</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getAllResourceList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">机台</el-button>
</el-form-item>
</el-form>
</div>
<el-container style="margin-top: 0px;">
@ -331,13 +349,7 @@
</el-table>
</el-main>
<el-main style="width: 100px;padding: 1px">
<div v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104'" style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="getOperationList()" style="width: 63px">工序</el-button>
</div>
<div v-if="this.detailData.inspectionTypeNo === '105'" style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="getManufacturerList()" style="width: 63px">供应商</el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
<div style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="addItem()">添加>></el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
@ -378,10 +390,22 @@
label="模板名称">
</el-table-column>
<el-table-column
prop="specialField"
prop="operation"
header-align="center"
align="center"
label="工序">
</el-table-column>
<el-table-column
prop="resourceID"
header-align="center"
align="center"
label="工序 / 供应商">
label="机台">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
label="供应商">
</el-table-column>
<el-table-column
prop="inspectionTypeName"
@ -406,7 +430,7 @@
<el-input v-model="operationData.operationDesc" style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getOperationList()">查询</el-button>
<el-button type="primary" @click="getOperationList2()">查询</el-button>
</el-form-item>
</el-form>
<el-table
@ -414,16 +438,15 @@
:data="operationList"
ref="operationTable"
@row-click="operationClickRow"
@selection-change="selectionChangeHandle"
@selection-change="selectionOperationChangeHandle"
border
v-loading="dataListLoading"
:row-class-name="operationRowClassName"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
<el-table-column type="index" width="50" align="center">
<template slot-scope="scope">
<el-radio v-model="operationCurrent" :label="scope.row.index">{{''}}</el-radio>
</template>
</el-table-column>
<el-table-column
prop="operationDesc"
@ -435,7 +458,54 @@
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="confirmOperation()">确认</el-button>
<el-button type="primary" @click="operationModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 机台 -->
<el-dialog title="机台清单" :close-on-click-modal="false" v-drag :visible.sync="resourceModelFlag" width="420px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="resourceData">
<el-form-item :label="'机台编码'">
<el-input v-model="resourceData.resourceId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'机台名称'">
<el-input v-model="resourceData.resourceDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getAllResourceList2()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="resourceList"
ref="resourceTable"
@row-click="resourceClickRow"
@selection-change="selectionResourceChangeHandle"
border
v-loading="dataListLoading"
:row-class-name="resourceRowClassName"
style="width: 100%;">
<el-table-column type="index" width="50" align="center">
<template slot-scope="scope">
<el-radio v-model="resourceCurrent" :label="scope.row.index">{{''}}</el-radio>
</template>
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="center"
label="机台编码">
</el-table-column>
<el-table-column
prop="resourceDesc"
header-align="center"
align="center"
label="机台名称">
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="confirmResource()">确认</el-button>
</el-footer>
</el-dialog>
@ -444,10 +514,10 @@
<div class="rq">
<el-form :inline="true" label-position="top" :model="manufacturerData">
<el-form-item :label="'供应商编码:'">
<el-input v-model="manufacturerData.manufacturerID" style="width: 120px"></el-input>
<el-input v-model="manufacturerData.manufacturerID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'供应商名称:'">
<el-input v-model="manufacturerData.manufacturerName" style="width: 120px"></el-input>
<el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getManufacturerList()">查询</el-button>
@ -458,7 +528,7 @@
:data="manufacturerList"
ref="manufacturerTable"
@row-click="manufacturerClickRow"
@selection-change="selectionChangeHandle2"
@selection-change="selectionManufacturerChangeHandle"
border
v-loading="dataListLoading"
style="width: 100%;">
@ -489,7 +559,8 @@
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 导入 -->
<qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload>
</div>
@ -508,7 +579,8 @@
// getItemLists, //
getPartTemplateLists, //
getOperationDescList, //
getManufacturerList //
getManufacturerList, //
getAllResourceList //
} from "@/api/qc/qc.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -517,9 +589,6 @@
components: {
Chooselist,
qcUpload
},
watch: {
},
data () {
return {
@ -534,6 +603,7 @@
// end
tagNo:'',
searchData: {
site: this.$store.state.user.site,
familyID: '',
familyName: '',
attributeType: 'B',
@ -548,6 +618,7 @@
modalFlag:false,
modalDisableFlag:false,
modalData:{
site: this.$store.state.user.site,
flag: '',
familyID: '',
familyName: '',
@ -726,20 +797,31 @@
//
operationList: [],
operationModelFlag: false,
dataListSelections: [],
operationData:{
operationDesc: ''
},
selectionOperation: [],
//
manufacturerList: [],
manufacturerModelFlag: false,
dataListSelections2: [],
dataListManufacturerSelections: [],
manufacturerData:{
site: this.$store.state.user.site,
manufacturerID: '',
manufacturerName: ''
},
operation: '',
resourceId: '',
//
operationCurrent: -1,
resourceCurrent: -1,
selectionManufacturer: [],
resourceModelFlag: false,
resourceData: {
site: this.$store.state.user.site,
resourceId: '',
resourceDesc: ''
},
resourceList: [],
}
},
mounted () {
@ -803,27 +885,17 @@
}
})
},
// //
// doEmpty(){
// this.searchData = {
// codeNo: '',
// codeDesc: '',
// active:'',
// familyName:'',
// functionType:'D',
// inspectionTypeName:'',
// page: 1,
// limit: 10,
// }
// },
chooseLevel(row){
this.tempLevelRow = row;
this.getBaseList(1048);
},
chooseProgrammeRow(row){
this.tempProgrammeRow = row;
this.getBaseList(1051);
},
// S
getBaseList (val,type) {
this.tagNo = val
@ -843,6 +915,7 @@
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1042) {
@ -858,6 +931,7 @@
this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc
}
},
//
getDataList () {
this.searchData.limit = this.pageSize
@ -872,19 +946,23 @@
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
addModal(){
this.modalData={
addModal () {
this.modalData = {
site: this.$store.state.user.site,
flag: '1',
familyID: '',
familyName: '',
@ -897,6 +975,7 @@
this.modalDisableFlag = false;
this.modalFlag = true;
},
//
deletePropertiesModel (row) {
this.$confirm(`是否删除这个分类属性?`, '提示', {
@ -923,6 +1002,7 @@
}).catch(() => {
})
},
saveData(){
if (this.modalData.familyID === '' || this.modalData.familyID == null) {
this.$message.warning('请选择物料分类编码!')
@ -952,6 +1032,7 @@
})
}
},
//
saveDetail(){
for (let i = 0; i < this.detailList.length; i++) {
@ -977,6 +1058,7 @@
})
}
},
//
detailModal(row){
this.detailData.familyID = row.familyID
@ -987,66 +1069,97 @@
})
this.detailModelFlag = true;
},
checkInspectionType(){
getPartTemplateLists(this.detailData).then(({data}) => {
this.itemList1 = data.row1;
this.itemList2 = data.row2;
this.operation = ''
this.resourceId = ''
this.operationCurrent = -1
this.resourceCurrent = -1
this.itemList1 = data.row1
this.itemList2 = data.row2
})
},
//
addFastModal(){
this.itemSelections1 = null
this.itemSelections2 = null
getPartTemplateLists(this.detailData).then(({data}) => {
this.itemList1 = data.row1;
this.itemList2 = data.row2;
this.itemList1 = data.row1
this.itemList2 = data.row2
})
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo;
this.checkInspectionType();
this.dataListSelections = [];
this.selectionOperation = [];
this.dataListSelections2 = [];
this.operation = ''
this.resourceId = ''
this.operationCurrent = -1
this.resourceCurrent = -1
this.selectionManufacturer = []
this.dataListManufacturerSelections = []
this.fastAddFlag = true;
},
//
itemClickRow1(row){
this.$refs.itemTable1.toggleRowSelection(row);
},
//
itemClickRow2(row){
this.$refs.itemTable2.toggleRowSelection(row);
},
selectFlag(){
return true;
},
selectionItem1(val){
this.itemSelections1 = val
},
selectionItem2(val){
this.itemSelections2 = val
},
//
addItem(){
if(this.itemSelections1 == null || this.itemSelections1.length == 0){
addItem () {
if(this.itemSelections1 == null || this.itemSelections1.length === 0){
this.$message.warning('请选择可选模板!')
return
}
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')){
this.$message.warning('请选择工序!')
return
}
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')){
this.$message.warning('请选择机台!')
return
}
if((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)){
this.$message.warning('请选择供应商!')
return
}
let inData = {
site: this.$store.state.user.site,
attributeNo: this.detailData.familyID,
itemList: this.itemSelections1,
fieldList: this.selectionOperation,
operation: this.operation,
resourceID: this.resourceId,
manufacturerList: this.selectionManufacturer,
attributeType: this.detailData.attributeType,
inspectionTypeNo: this.detailData.inspectionTypeNo
}
savePartAttributeDetails(inData).then(({data}) => {
if (data && data.code === 0) {
getPartTemplateLists(this.detailData).then(({data}) => {
this.itemList1 = data.row1;
this.itemList2 = data.row2;
this.itemList1 = data.row1
this.itemList2 = data.row2
})
this.itemSelections1 = [];
this.selectionOperation = [];
this.itemSelections1 = []
this.operation = ''
this.resourceId = ''
this.selectionManufacturer = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -1054,6 +1167,7 @@
}
})
},
//
deleteItem(){
if(this.itemSelections2 == null || this.itemSelections2.length === 0){
@ -1080,12 +1194,14 @@
}
})
},
//
refreshDetailList(){
searchPartAttributeDetails(this.detailData).then(({data}) => {
this.detailList = data.rows
})
},
//
deletePartAttributeDetails(row){
this.$confirm(`是否删除这个检验模板?`, '提示', {
@ -1129,6 +1245,7 @@
}
})
},
// OR
favoriteFunction() {
let userFavorite = {
@ -1158,12 +1275,13 @@
})
return this.exportList;
},
startDownload() {
startDownload() {
},
finishDownload() {
finishDownload() {
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
@ -1177,7 +1295,6 @@
let s = eval("(" + json + ")")
return s
},
// end
//
qcUpload(){
@ -1197,17 +1314,6 @@
getOperationDescList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows;
//
//
this.$nextTick(() => this.$refs.operationTable.clearSelection())
//
let tempDataList = this.selectionOperation
this.operationList.forEach(val => {
//
if (tempDataList.includes(val.operationDesc)) {
this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true))
}
})
this.operationModelFlag = true;
} else {
this.$alert(data.msg, '错误', {
@ -1216,24 +1322,40 @@
}
})
},
//
getOperationList2(){
getOperationDescList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
this.operationCurrent = -1
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
operationClickRow(row){
this.$refs.operationTable.toggleRowSelection(row);
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
//
selectionOperationChangeHandle (val) {
this.operation = val[0].operationDesc
if (val) {
this.operationCurrent = val.index;
}
},
operationRowClassName ({row, rowIndex}) {
row.index = rowIndex; // index
},
//
confirmOperation(){
if(this.dataListSelections.length === 0){
this.$message.warning('请勾选工序!')
return
}
this.selectionOperation = []
for (let i = 0; i < this.dataListSelections.length; i++) {
this.selectionOperation.push(this.dataListSelections[i].operationDesc)
}
this.operationModelFlag = false
},
@ -1245,11 +1367,11 @@
//
//
this.$nextTick(() => this.$refs.manufacturerTable.clearSelection())
//
let tempDataList = this.selectionOperation
//
let tempDataList = this.selectionManufacturer
this.manufacturerList.forEach(val => {
//
if (tempDataList.includes(val.manufacturerName)) {
//
if (tempDataList.includes(val.manufacturerID)) {
this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true))
}
})
@ -1261,27 +1383,75 @@
}
})
},
//
manufacturerClickRow(row){
this.$refs.manufacturerTable.toggleRowSelection(row);
},
//
selectionChangeHandle2 (val) {
this.dataListSelections2 = val
selectionManufacturerChangeHandle (val) {
this.dataListManufacturerSelections = val
},
//
//
confirmManufacturer(){
if(this.dataListSelections2.length === 0){
this.$message.warning('请勾选供应商!')
return
}
this.selectionOperation = []
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.selectionOperation.push(this.dataListSelections2[i].manufacturerName)
this.selectionManufacturer = []
for (let i = 0; i < this.dataListManufacturerSelections.length; i++) {
this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID)
}
this.manufacturerModelFlag = false
},
//
getAllResourceList () {
getAllResourceList(this.resourceData).then(({data}) => {
if (data && data.code === 0) {
this.resourceList = data.rows
this.resourceModelFlag = true;
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
getAllResourceList2 () {
getAllResourceList(this.resourceData).then(({data}) => {
if (data && data.code === 0) {
this.resourceList = data.rows
this.resourceCurrent = -1
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
resourceClickRow (row) {
this.$refs.resourceTable.toggleRowSelection(row);
},
//
selectionResourceChangeHandle (val) {
this.resourceId = val[0].resourceId
if (val) {
this.resourceCurrent = val.index;
}
},
resourceRowClassName ({row, rowIndex}) {
row.index = rowIndex; // index
},
//
confirmResource () {
this.resourceModelFlag = false
},
}
}
</script>

416
src/views/modules/qc/qcPartAttribute.vue

@ -18,7 +18,6 @@
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<!-- <el-button @click="doEmpty()">清空</el-button>-->
<el-button type="primary" @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
</el-form-item>
@ -101,7 +100,7 @@
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 物料属性新增 -->
<!-- 物料属性新增/修改 -->
<el-dialog title="物料属性设置" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="430px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="partNo" :rules="rules.partNoType">
@ -112,30 +111,6 @@
<el-input v-model="modalData.partDesc" disabled style="width: 240px"></el-input>
</el-form-item>
</el-form>
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item prop="supplierNo" :rules="rules.supplierNoType">-->
<!-- <span slot="label" style="" @click="getBaseList(1056)"><a herf="#">供应商编码:</a></span>-->
<!-- <el-input v-model="modalData.supplierNo" style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="供应商名称:" prop="supplierDesc" :rules="rules.supplierDescType">-->
<!-- <el-input v-model="modalData.supplierDesc" disabled style="width: 240px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item prop="operation" :rules="rules.operationType">-->
<!-- <span slot="label" style="" @click="getBaseList(1055)"><a herf="#">工序:</a></span>-->
<!-- <el-input v-model="modalData.operation" style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">-->
<!-- <el-form-item prop="resourceId" :rules="rules.resourceIdType">-->
<!-- <span slot="label" style="" @click="getBaseList(1054)"><a herf="#">机台号:</a></span>-->
<!-- <el-input v-model="modalData.resourceId" style="width: 120px"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="机台名称:" prop="resourceDesc" :rules="rules.resourceDescType">-->
<!-- <el-input v-model="modalData.resourceDesc" disabled style="width: 240px"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="备注:">
<el-input v-model="modalData.attributeRemark" style="width: 375px"></el-input>
@ -192,15 +167,27 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}} </span>
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
prop="specialField"
prop="operation"
header-align="center"
align="center"
label="工序 / 供应商">
label="工序">
</el-table-column>
<el-table-column
prop="resourceID"
header-align="center"
align="center"
label="机台">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
label="供应商">
</el-table-column>
<el-table-column
prop=""
@ -293,10 +280,10 @@
<div style="font-size: 12px">
<el-form :inline="true" label-position="top" :model="detailData">
<el-form-item :label="'模板编码'">
<el-input v-model="detailData.templateId" style="width: 120px"></el-input>
<el-input v-model="detailData.templateId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'模板名称'">
<el-input v-model="detailData.templateName" style="width: 120px"></el-input>
<el-input v-model="detailData.templateName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="检验类型">
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择">
@ -311,6 +298,13 @@
<el-form-item :label="' '">
<el-button type="primary" @click="checkInspectionType()">查询</el-button>
</el-form-item>
<el-form-item style="margin-left: 117px" :label="' '">
<el-button type="primary" @click="getOperationList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">工序</el-button>
<el-button type="primary" @click="getManufacturerList()" v-if="this.detailData.inspectionTypeNo === '105'" style="width: 63px">供应商</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getAllResourceList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">机台</el-button>
</el-form-item>
</el-form>
</div>
<el-container style="margin-top: 0px;">
@ -357,13 +351,7 @@
</el-table>
</el-main>
<el-main style="width: 100px;padding: 1px">
<div v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104'" style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="getOperationList()" style="width: 63px">工序</el-button>
</div>
<div v-if="this.detailData.inspectionTypeNo === '105'" style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="getManufacturerList()" style="width: 63px">供应商</el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
<div style="margin-top: 180px;margin-left: 18px">
<el-button type="primary" @click="addItem()">添加>></el-button>
</div>
<div style="margin-top: 15px;margin-left: 18px">
@ -402,10 +390,22 @@
label="模板名称">
</el-table-column>
<el-table-column
prop="specialField"
prop="operation"
header-align="center"
align="center"
label="工序 / 供应商">
label="工序">
</el-table-column>
<el-table-column
prop="resourceID"
header-align="center"
align="center"
label="机台">
</el-table-column>
<el-table-column
prop="manufacturerName"
header-align="center"
align="center"
label="供应商">
</el-table-column>
<el-table-column
prop="inspectionTypeName"
@ -426,10 +426,10 @@
<div class="rq">
<el-form :inline="true" label-position="top" :model="operationData">
<el-form-item :label="'工序:'">
<el-input v-model="operationData.operationDesc" style="width: 120px"></el-input>
<el-input v-model="operationData.operationDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getOperationList()">查询</el-button>
<el-button type="primary" @click="getOperationList2()">查询</el-button>
</el-form-item>
</el-form>
<el-table
@ -437,16 +437,15 @@
:data="operationList"
ref="operationTable"
@row-click="operationClickRow"
@selection-change="selectionChangeHandle"
@selection-change="selectionOperationChangeHandle"
border
v-loading="dataListLoading"
:row-class-name="operationRowClassName"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
align="center"
:selectable="selectFlag"
width="50">
<el-table-column type="index" width="50" align="center">
<template slot-scope="scope">
<el-radio v-model="operationCurrent" :label="scope.row.index">{{''}}</el-radio>
</template>
</el-table-column>
<el-table-column
prop="operationDesc"
@ -458,7 +457,54 @@
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="confirmOperation()">确认</el-button>
<el-button type="primary" @click="operationModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- 机台 -->
<el-dialog title="机台清单" :close-on-click-modal="false" v-drag :visible.sync="resourceModelFlag" width="420px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="resourceData">
<el-form-item :label="'机台编码'">
<el-input v-model="resourceData.resourceId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'机台名称'">
<el-input v-model="resourceData.resourceDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getAllResourceList2()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="resourceList"
ref="resourceTable"
@row-click="resourceClickRow"
@selection-change="selectionResourceChangeHandle"
border
v-loading="dataListLoading"
:row-class-name="resourceRowClassName"
style="width: 100%;">
<el-table-column type="index" width="50" align="center">
<template slot-scope="scope">
<el-radio v-model="resourceCurrent" :label="scope.row.index">{{''}}</el-radio>
</template>
</el-table-column>
<el-table-column
prop="resourceId"
header-align="center"
align="center"
label="机台编码">
</el-table-column>
<el-table-column
prop="resourceDesc"
header-align="center"
align="center"
label="机台名称">
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="confirmResource()">确认</el-button>
</el-footer>
</el-dialog>
@ -467,10 +513,10 @@
<div class="rq">
<el-form :inline="true" label-position="top" :model="manufacturerData">
<el-form-item :label="'供应商编码:'">
<el-input v-model="manufacturerData.manufacturerID" style="width: 120px"></el-input>
<el-input v-model="manufacturerData.manufacturerID" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'供应商名称:'">
<el-input v-model="manufacturerData.manufacturerName" style="width: 120px"></el-input>
<el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="getManufacturerList()">查询</el-button>
@ -481,7 +527,7 @@
:data="manufacturerList"
ref="manufacturerTable"
@row-click="manufacturerClickRow"
@selection-change="selectionChangeHandle2"
@selection-change="selectionManufacturerChangeHandle"
border
v-loading="dataListLoading"
style="width: 100%;">
@ -513,6 +559,7 @@
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 导入 -->
<qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload>
</div>
@ -531,7 +578,8 @@
getPartTemplateLists, //
InspectionTypeSearch, //
getOperationDescList, //
getManufacturerList //
getManufacturerList, //
getAllResourceList //
} from "@/api/qc/qc.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
@ -554,6 +602,7 @@
// end
tagNo: '',
searchData: {
site: this.$store.state.user.site,
partNo: '',
partDesc: '',
familyID: '',
@ -564,7 +613,7 @@
},
height: 200,
pageIndex: 1,
pageSize: 100,
pageSize: 50,
totalPage: 0,
modalFlag: false,
modalDisableFlag: false,
@ -643,7 +692,7 @@
fixed: '',
},
{
columnProp: 'supplierNo',
columnProp: 'supplierDesc',
headerAlign: "center",
align: "center",
columnLabel: '供应商',
@ -795,60 +844,37 @@
message: ' ',
trigger: 'change'
}
],
// supplierNoType:[
// {
// required: true,
// message: ' ',
// trigger: 'change'
// }
// ],
// supplierDescType:[
// {
// required: true,
// message: ' ',
// trigger: 'change'
// }
// ],
// operationType:[
// {
// required: true,
// message: ' ',
// trigger: 'change'
// }
// ],
// resourceIdType:[
// {
// required: true,
// message: ' ',
// trigger: 'change'
// }
// ],
// resourceDescType:[
// {
// required: true,
// message: ' ',
// trigger: 'change'
// }
// ],
]
},
//
operationList: [],
resourceList: [],
operationModelFlag: false,
dataListSelections: [],
resourceModelFlag: false,
dataListOperationSelections: [],
operationData:{
operationDesc: ''
},
selectionOperation: [],
resourceData: {
site: this.$store.state.user.site,
resourceId: '',
resourceDesc: ''
},
operation: '',
resourceId: '',
selectionManufacturer: [],
//
manufacturerList: [],
manufacturerModelFlag: false,
dataListSelections2: [],
dataListManufacturerSelections: [],
manufacturerData:{
site: this.$store.state.user.site,
manufacturerID: '',
manufacturerName: ''
},
//
operationCurrent: -1,
resourceCurrent: -1
}
},
mounted () {
@ -913,18 +939,6 @@
}
})
},
// //
// doEmpty(){
// this.searchData = {
// partNo: '',
// partDesc: '',
// familyID: '',
// familyName: '',
// attributeType: 'A',
// page: 1,
// limit: 10,
// }
// },
chooseLevel(row){
this.tempLevelRow = row;
this.getBaseList(1048);
@ -1002,6 +1016,7 @@
},
addModal(){
this.modalData = {
site: this.$store.state.user.site,
flag: '1',
partNo: '',
partDesc: '',
@ -1101,7 +1116,7 @@
},
//
detailModal(row){
detailModal (row) {
this.detailData.partNo = row.partNo
this.detailData.attributeNo = row.partNo
this.detailData.partDesc = row.partDesc
@ -1113,6 +1128,8 @@
checkInspectionType(){
getPartTemplateLists(this.detailData).then(({data}) => {
this.operation = ''
this.resourceId = ''
this.itemList1 = data.row1;
this.itemList2 = data.row2;
})
@ -1123,15 +1140,19 @@
this.itemSelections1 = null
this.itemSelections2 = null
getPartTemplateLists(this.detailData).then(({data}) => {
this.itemList1 = data.row1;
this.itemList2 = data.row2;
this.itemList1 = data.row1
this.itemList2 = data.row2
})
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo;
this.checkInspectionType();
this.dataListSelections = [];
this.selectionOperation = [];
this.dataListSelections2 = [];
this.fastAddFlag = true;
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo
this.checkInspectionType()
this.dataListOperationSelections = []
this.operation = ''
this.resourceId = ''
this.operationCurrent = -1
this.resourceCurrent = -1
this.selectionManufacturer = []
this.dataListManufacturerSelections = []
this.fastAddFlag = true
},
//
itemClickRow1(row){
@ -1157,12 +1178,27 @@
this.$message.warning('请选择可选模板!')
return
}
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')){
this.$message.warning('请选择工序!')
return
}
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')){
this.$message.warning('请选择机台!')
return
}
if((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)){
this.$message.warning('请选择供应商!')
return
}
let inData = {
site: this.$store.state.user.site,
attributeNo: this.detailData.partNo,
itemList: this.itemSelections1,
fieldList: this.selectionOperation,
operation: this.operation,
resourceID: this.resourceId,
manufacturerList: this.selectionManufacturer,
attributeType: this.detailData.attributeType,
inspectionTypeNo: this.detailData.inspectionTypeNo
}
savePartAttributeDetails(inData).then(({data}) => {
if (data && data.code === 0) {
@ -1171,7 +1207,9 @@
this.itemList2 = data.row2;
})
this.itemSelections1 = []
this.selectionOperation = []
this.operation = ''
this.resourceId = ''
this.selectionManufacturer = []
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
@ -1322,17 +1360,17 @@
getOperationDescList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows;
//
//
this.$nextTick(() => this.$refs.operationTable.clearSelection())
//
let tempDataList = this.selectionOperation
this.operationList.forEach(val => {
//
if (tempDataList.includes(val.operationDesc)) {
this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true))
}
})
// //
// //
// this.$nextTick(() => this.$refs.operationTable.clearSelection())
// //
// let tempDataList = this.operationDesc
// this.operationList.forEach(val => {
// //
// if (tempDataList === val.operationDesc) {
// this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true))
// }
// })
this.operationModelFlag = true;
} else {
this.$alert(data.msg, '错误', {
@ -1341,27 +1379,91 @@
}
})
},
//
operationClickRow(row){
//
getAllResourceList () {
getAllResourceList(this.resourceData).then(({data}) => {
if (data && data.code === 0) {
this.resourceList = data.rows
this.resourceModelFlag = true;
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
getOperationList2(){
getOperationDescList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
this.operationCurrent = -1
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
getAllResourceList2 () {
getAllResourceList(this.resourceData).then(({data}) => {
if (data && data.code === 0) {
this.resourceList = data.rows
this.resourceCurrent = -1
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
operationClickRow (row) {
this.$refs.operationTable.toggleRowSelection(row);
},
//
selectionChangeHandle (val) {
this.dataListSelections = val
//
resourceClickRow (row) {
this.$refs.resourceTable.toggleRowSelection(row);
},
//
confirmOperation(){
if(this.dataListSelections.length === 0){
this.$message.warning('请勾选工序!')
return
//
selectionOperationChangeHandle (val) {
this.operation = val[0].operationDesc
if (val) {
this.operationCurrent = val.index;
}
this.selectionOperation = []
for (let i = 0; i < this.dataListSelections.length; i++) {
this.selectionOperation.push(this.dataListSelections[i].operationDesc)
},
//
selectionResourceChangeHandle (val) {
this.resourceId = val[0].resourceId
if (val) {
this.resourceCurrent = val.index;
}
},
operationRowClassName ({row, rowIndex}) {
row.index = rowIndex; // index
},
resourceRowClassName ({row, rowIndex}) {
row.index = rowIndex; // index
},
// //
// clickChange (row) {
// this.radioOperation = row.operationDesc
// },
//
confirmOperation () {
//this.operationDesc = ''
// this.operationDesc = this.radioOperation
// this.radioOperation = ''
// for (let i = 0; i < this.dataListOperationSelections.length; i++) {
// this.selectionOperation.push(this.dataListOperationSelections[i].operationDesc)
// }
this.operationModelFlag = false
},
//
confirmResource () {
this.resourceModelFlag = false
},
//
getManufacturerList(){
getManufacturerList(this.manufacturerData).then(({data}) => {
@ -1370,11 +1472,11 @@
//
//
this.$nextTick(() => this.$refs.manufacturerTable.clearSelection())
//
let tempDataList = this.selectionOperation
//
let tempDataList = this.selectionManufacturer
this.manufacturerList.forEach(val => {
//
if (tempDataList.includes(val.manufacturerName)) {
//
if (tempDataList.includes(val.manufacturerID)) {
this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true))
}
})
@ -1391,23 +1493,17 @@
this.$refs.manufacturerTable.toggleRowSelection(row);
},
//
selectionChangeHandle2 (val) {
this.dataListSelections2 = val
selectionManufacturerChangeHandle (val) {
this.dataListManufacturerSelections = val
},
//
//
confirmManufacturer(){
if(this.dataListSelections2.length === 0){
this.$message.warning('请勾选供应商!')
return
}
this.selectionOperation = []
for (let i = 0; i < this.dataListSelections2.length; i++) {
this.selectionOperation.push(this.dataListSelections2[i].manufacturerName)
this.selectionManufacturer = []
for (let i = 0; i < this.dataListManufacturerSelections.length; i++) {
this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID)
}
this.manufacturerModelFlag = false
},
}
}
}
</script>

4
src/views/modules/qc/qc_FAI_upload_file.vue

@ -1,6 +1,6 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-dialog :title="pageData.titleCon" :close-on-click-modal="false" :visible.sync="visible" width="390px" style="height: 520px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">
@ -50,12 +50,12 @@ var functionId = 'C10000002';
export default {
data() {
return {
titleCon: 'FAI文件上传',
folder: '',
visible: false,
userId: this.$store.state.user.name,
fileList: [],
pageData: {
titleCon: '',
site: this.$store.state.user.site,
username: this.$store.state.user.name,
inspectionNo: '',

Loading…
Cancel
Save