Browse Source

2024-10-15

优化
master
fengyuan_yang 1 year ago
parent
commit
a43a5341d8
  1. 1
      src/api/qc/qc.js
  2. 3
      src/views/main-content.vue
  3. 977
      src/views/modules/qc/DoInspectionBySeqNo.vue
  4. 70
      src/views/modules/qc/IPQCResultEntry.vue
  5. 7
      src/views/modules/qc/IQCResultEntry.vue

1
src/api/qc/qc.js

@ -161,6 +161,7 @@ export const iqcRecordOverLoad = data => createAPI(`/pms/qc/iqcRecordOverLoad`,'
export const uploadSopFile = data => createAPI(`/pms/qc/upload`,'post',data)
export const getSiteAndBuByUserName = data => createAPI(`/pms/qc/getSiteAndBuByUserName`,'post',data)
export const searchSeqInfo = data => createAPI(`/pms/qc/searchSeqInfo`,'post',data)
export const searchSeqInfo2 = data => createAPI(`/pms/qc/searchSeqInfo2`,'post',data)
export const searchPartInfo = data => createAPI(`/pms/qc/searchPartInfo`,'post',data)
// 获取采购类型
export const orderTypeSearch = data => createAPI(`/pms/qc/orderTypeSearch`,'post',data)

3
src/views/main-content.vue

@ -114,6 +114,9 @@
this.menuActiveName = ''
this.$router.push({ name: 'home' })
},
handleRefresh () {
this.$router.go(0)
},
// tabs,
tabsRefreshCurrentHandle () {
var tab = this.$route

977
src/views/modules/qc/DoInspectionBySeqNo.vue

@ -0,0 +1,977 @@
<template>
<div class="mod-config">
<!-- 收藏 -->
<div>
<span @click="favoriteFunction()">
<icon-svg :name="favorite?'xiangqufill':'xiangqu'" class="sl-svg"></icon-svg>
</span>
</div>
<!-- 条件查询 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item label="工单号">
<el-input v-model="searchData.orderNo" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item label="派工单号">
<el-input v-model="searchData.seqNo" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="searchData.status" style="width: 100px" placeholder="请选择">
<el-option label="全部" value=""></el-option>
<el-option label="已发料" value="已发料"></el-option>
<el-option label="已关闭" value="已关闭"></el-option>
<el-option label="已计划" value="已计划"></el-option>
<el-option label="已开工" value="已开工"></el-option>
<el-option label="已入库" value="已入库"></el-option>
<el-option label="已下达" value="已下达"></el-option>
</el-select>
</el-form-item>
<el-form-item label=" ">
<el-checkbox v-model="searchData.cancelFlag" true-label="Y">包含已取消工单</el-checkbox>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item label="物料编码">
<el-input v-model="searchData.partNo" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-input v-model="searchData.partDesc" clearable style="width: 315px"></el-input>
</el-form-item>
<el-form-item label="工序">
<el-input v-model="searchData.operationDesc" clearable style="width: 150px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button v-if="!authSearch" type="primary" @click="getDataList()">查询</el-button>
</el-form-item>
</el-form>
<!-- 展示列表 -->
<el-table
:height="height"
:data="dataList"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
: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.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="130"
label="操作">
<template slot-scope="scope">
<a v-if="!authDoInspection" type="text" size="small" @click="doInspectionModal(scope.row)">生成检验任务</a>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
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 label="BU" prop="bu" :rules="rules.bu">
<el-select v-model="modalData.bu" placeholder="请选择" @change="buChange" style="width: 221px">
<el-option
v-for = "i in userBuList"
:key = "i.buNo"
:label = "i.buNo"
:value = "i.buNo">
<span style="float: left;width: 100px">{{ i.sitename }}</span>
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">
{{ i.buDesc }}
</span>
</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 prop="orderNo" :rules="rules.seqNoType">
<span slot="label">派工单号</span>
<el-input v-model="modalData.seqNo" disabled style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="工单号" prop="orderNo" :rules="rules.orderNoType">
<el-input v-model="modalData.orderNo" style="width: 221px" disabled></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" placeholder="请选择" style="width: 221px">
<el-option
v-for = "i in operationList"
:key = "i.operationDesc"
:label = "i.operationDesc"
:value = "i.operationDesc">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<span style="cursor: pointer" slot="label" @click="getBaseList(505)"><a herf="#">机台</a></span>
<el-input v-model="modalData.resourceDesc" readonly style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码" prop="partNo" :rules="rules.partNoType">
<el-input v-model="modalData.partNo" readonly style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="物料类别">
<el-input v-model="modalData.spec" readonly style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 456px"></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="inspectionTypeNo" :rules="rules.inspectionTypeNoType">
<el-select v-model="modalData.inspectionTypeNo" style="width: 221px">
<el-option label="首件检" value="首件检"></el-option>
<el-option label="自检" value="自检"></el-option>
<el-option label="巡检" value="巡检"></el-option>
<el-option label="末件检" value="末件检"></el-option>
</el-select>
</el-form-item>
<el-form-item label="送检数量" prop="rollQty" :rules="rules.rollQtyType">
<el-input v-model="modalData.rollQty" type="number" style="width: 103px"></el-input>
</el-form-item>
<el-form-item label="单位" prop="umId" :rules="rules.umIdType">
<el-select v-model="modalData.umId" placeholder="请选择" style="width: 103px">
<el-option
v-for = "i in umList"
:key = "i.umId"
:label = "i.umName"
:value = "i.umId">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="templateId" :rules="rules.templateId">
<span style="cursor: pointer" v-if="this.controlData.baseData === '控制'" slot="label" @click="queryTemplateList"><a>检验模板</a></span>
<span v-else slot="label">检验模板</span>
<el-input v-model="modalData.templateName" readonly style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="送检总数">
<el-input v-model="modalData.sjzs" disabled style="width: 120px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="特殊要求">
<el-input type="textarea" v-model="modalData.specialRequirements" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:40px;margin-top: 55px;text-align:center">
<el-button :loading="saveLoading" 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="templateModelFlag" width="520px">
<div class="rq">
<el-form :inline="true" label-position="top" :model="templateData">
<el-form-item :label="'模板编码'">
<el-input v-model="templateData.templateId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'模板名称'">
<el-input v-model="templateData.templateName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryTemplateList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="templateList"
@row-dblclick="getRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in templateDetailList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
: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.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="templateModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
getSiteAndBuByUserName, // sitebu
searchSeqInfo2, //
getOperationList, //
umSearch, //
queryController, //
queryTemplateList, //
saveOsInspection, //
inspectionTypeSearch, //
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js'
export default {
data () {
return {
//
favorite: false,
// start
exportData: [],
exportName: "派工单" + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["派工单"],
exportFooter: [],
exportList: [],
// end
searchData: {
userName: this.$store.state.user.name,
orderNo: '',
seqNo: '',
partNo: '',
partDesc: '',
operationDesc: '',
qtyrequired: '',
lotsize: '',
status: '',
cancelFlag: '',
page: 1,
limit: 10
},
pageIndex: 1,
pageSize: 20,
totalPage: 0,
height: 200,
dataList: [],
modalFlag: false,
modalDisableFlag: false,
modalData: {
site: '',
bu: '',
inspectionNo:'',
partNo: '',
partDesc: '',
inspectionTypeNo:'',
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
orderNo: '',
operationDesc: '',
resourceId: '',
resourceDesc: '',
rollQty: '',
seqNo: '',
spec: '',
qtyrequired: '',
lotsize:'',
specialRequirements: '',
templateId: '',
templateName: '',
specialTaskFlag: '',
workCenterNo: '',
rollNo: '',
umId: '',
umName: '',
sjzs: '',
boxNo: ''
},
rules: {
seqNoType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
orderNoType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
operationDescType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
resourceIdType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
rollQtyType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
inspectionTypeNoType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
partNoType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
umIdType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
templateId: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
bu:[
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
templateData: {
site: '',
bu: '',
templateId: '',
templateName: '',
inspectionTypeNo: '',
inspectionTypeName: ''
},
//
columnList: [
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1OrderNo',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'orderNo',
headerAlign: "center",
align: "left",
columnLabel: '工单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 150,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1SeqNo',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'seqNo',
headerAlign: "center",
align: "left",
columnLabel: '派工单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 170,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1PartNo',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'partNo',
headerAlign: "center",
align: "left",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 150,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1PartDesc',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'partDesc',
headerAlign: "center",
align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 300,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1Lotsize',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'lotsize',
headerAlign: "center",
align: "right",
columnLabel: '工单数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1Qtyrequired',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'qtyrequired',
headerAlign: "center",
align: "right",
columnLabel: '派工数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 100,
},
{
userId: this.$store.state.user.name,
functionId: 3010005001,
serialNumber: '3010005001Table1OperationDesc',
tableId: "3010005001Table1",
tableName: "派工单号表",
fixed: '',
columnProp: 'operationDesc',
headerAlign: "center",
align: "center",
columnLabel: '工序',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
columnWidth: 100,
}
],
templateDetailList: [
{
columnProp: 'templateId',
headerAlign: "center",
align: "center",
columnLabel: '模板编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'templateName',
headerAlign: "center",
align: "center",
columnLabel: '模板名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'inspectionTypeName',
headerAlign: "center",
align: "center",
columnLabel: '检验类型',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
],
operationList: [],
userBuList: [],
umList: [],
templateList: [],
authSearch: false,
authDoInspection: false,
menuId: this.$route.meta.menuId,
checked: false,
controlData: {},
templateModelFlag: false,
saveLoading: false,
typeOptions: [],
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
})
},
created () {
//
this.getButtonAuthData()
// site bu
this.getSiteAndBuByUserName()
//
this.favoriteIsOk()
//
this.inspectionTypeSearch()
//
this.umSearch()
//
this.queryController()
//
this.getTableUserColumn(this.$route.meta.menuId+'table',1)
if (!this.authSearch) {
//
this.getDataList()
}
},
methods: {
//
inspectionTypeSearch () {
let tempData = {
site: this.$store.state.user.site
}
inspectionTypeSearch(tempData).then(({data}) => {
if (data.code === 0) {
this.typeOptions = data.rows
this.typeOptions.forEach(val => {
if (val.inspectionTypeName.includes('IPQC')) {
this.templateData.inspectionTypeNo = val.inspectionTypeNo
this.templateData.inspectionTypeName = val.inspectionTypeName
}
})
}
})
},
//
queryController () {
let tempData = {
controlNo: '10004',
site: this.$store.state.user.site,
}
queryController(tempData).then(({data}) => {
if (data && data.code === 0) {
this.controlData = data.rows
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
umSearch () {
let tempData = {
site: this.$store.state.user.site,
active: 'Y'
}
umSearch(tempData).then(({data}) => {
if (data.code === 0) {
this.umList = data.rows
}
})
},
// bu
getSiteAndBuByUserName () {
let tempData = {
username: this.$store.state.user.name,
}
getSiteAndBuByUserName(tempData).then(({data}) => {
if (data.code === 0) {
this.userBuList = data.rows
}
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
searchSeqInfo2(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
})
},
//
doInspectionModal (row) {
this.modalData = {
site: row.site,
bu: this.userBuList[0].buNo,
inspectionNo: '',
partNo: row.partNo,
partDesc: row.partDesc,
inspectionTypeNo: '',
inspectionTypeName: '',
inspectorNo: '',
inspectorName: '',
orderNo: row.orderNo,
operationDesc: row.operationDesc,
resourceId: row.resourceId,
resourceDesc: row.resourceDesc,
rollQty: row.qtyrequired,
seqNo: row.seqNo,
spec: row.spec,
specialRequirements: '',
templateId: '',
templateName: '',
specialTaskFlag: '',
workCenterNo: row.workCenterNo,
rollNo: '',
umId: row.umId,
sjzs: row.sjzs,
boxNo: '',
}
this.getOperationList()
this.modalDisableFlag = false
this.modalFlag = true
this.checked = false
},
// IPQC
saveData () {
if (this.modalData.bu === '' || this.modalData.bu == null) {
this.$message.warning('请选择BU!')
return
}
if (this.modalData.seqNo === '' || this.modalData.seqNo == null) {
this.$message.warning('请选择派工单!')
return
}
if (this.modalData.orderNo === '' || this.modalData.orderNo == null) {
this.$message.warning('请选择工单!')
return
}
if (this.modalData.inspectionTypeNo === '' || this.modalData.inspectionTypeNo == null) {
this.$message.warning('请选择检验类型!')
return
}
if (this.modalData.specialTaskFlag !== 'Y' && (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.rollQty === '' || this.modalData.rollQty == null) {
this.$message.warning('请填写送检数量!')
return
}
if (this.modalData.umId === '' || this.modalData.umId == null) {
this.$message.warning('请选择单位!')
return
}
if (this.controlData.baseData === '控制' && (this.modalData.templateId == null || this.modalData.templateId === '')) {
this.$message.warning('请选择检验模板!')
return
}
this.saveLoading = true
saveOsInspection(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.operationList = []
this.modalFlag = false
// IPQC
this.checkOutToIPQC(data.no)
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
this.saveLoading = false
}).catch(()=>{
this.saveLoading = false
})
},
//
getOperationList () {
getOperationList(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
} else {
this.operationList = []
}
})
},
// bu
buChange () {
if (this.modalData.specialTaskFlag !== 'Y') { //
this.modalData.templateId = ''
this.modalData.templateName = ''
} else { //
this.modalData.partNo = ''
this.modalData.partDesc = ''
this.modalData.spec = ''
this.modalData.templateId = ''
this.modalData.templateName = ''
}
},
//
queryTemplateList () {
this.templateData.bu = this.modalData.bu
//
queryTemplateList(this.templateData).then(({data}) => {
if (data && data.code === 0) {
this.templateList = data.rows
this.templateModelFlag = true
} else {
this.templateList = []
}
})
},
//
getRowData (row) {
this.modalData.templateId = row.templateId
this.modalData.templateName = row.templateName
this.templateModelFlag = false
},
// IPQC
checkOutToIPQC (no) {
this.$router.push({name: "qc-IPQCResultEntry", params: {inspectionNo: no}})
},
// S
getBaseList (val,type) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 505) {
strVal = this.modalData.resourceDesc
this.$refs.baseList.init(val, strVal)
}
if (val === 509) {
strVal = this.detailData.responsiblePerson
this.$refs.baseList.init(val, strVal)
}
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 505) {
this.modalData.resourceId = val.ResourceID
this.modalData.resourceDesc = val.ResourceDesc
}
if (this.tagNo === 509) {
this.detailData.responsiblePerson = val.SupplierID
}
},
//
favoriteIsOk () {
let userFavorite = {
userId: this.$store.state.user.id,
languageCode: this.$i18n.locale
}
userFavoriteList(userFavorite).then(({data}) => {
for (let i = 0; i < data.list.length; i++) {
if(this.$route.meta.menuId === data.list[i].menuId){
this.favorite = true
}
}
})
},
// OR
favoriteFunction () {
let userFavorite = {
userId: this.$store.state.user.id,
functionId: this.$route.meta.menuId,
}
if (this.favorite) {
removeUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = false
})
} else {
//
saveUserFavorite(userFavorite).then(({data}) => {
this.$message.success(data.msg)
this.favorite = true
})
}
},
//excel
async createExportData() {
this.searchData.limit = -1
this.searchData.page = 1
await searchSeqInfo(this.searchData).then(({data}) => {
this.exportList= data.rows
})
return this.exportList
},
startDownload() {},
finishDownload() {},
fields () {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
//
async getTableUserColumn (tableId, columnId) {
let queryTableUser = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: tableId,
status: true,
languageCode: this.$i18n.locale
}
await getTableUserListLanguage(queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList1 = []
switch (columnId) {
case 1:
this.columnList = data.rows
break
}
} else {
this.getColumnList(tableId, columnId)
}
})
},
// tableDefault
async getColumnList (tableId, columnId) {
let queryTable = {
functionId: this.$route.meta.menuId,
tableId: tableId,
languageCode: this.$i18n.locale
}
await getTableDefaultListLanguage(queryTable).then(({data}) => {
if (!data.rows.length == 0) {
switch (columnId) {
case 1:
this.columnList = data.rows
break
}
} else {
// this.showDefault = true.
}
})
},
//
getButtonAuthData () {
let searchFlag = this.isAuth(this.menuId+":search")
let doInspectionFlag = this.isAuth(this.menuId+":doInspection")
//
this.authSearch = !searchFlag
this.authDoInspection = !doInspectionFlag
},
}
}
</script>

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

@ -952,6 +952,16 @@
this.detailData.unqualifiedQty = num
}
},
$route (newVal, oldVal) {
if (newVal.path !== oldVal.path) {
if (!this.authSearch) {
if (this.$route.params.inspectionNo) {
this.searchData.inspectionNo = this.$route.params.inspectionNo
this.getDataList2()
}
}
}
}
},
data () {
return {
@ -974,7 +984,6 @@
submitData:{
site: '',
inspectionNo: '',
submit_flag: '',
inspectionResult: '',
submitList: [],
},
@ -1024,7 +1033,6 @@
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
submit_flag:'',
orderNo: '',
operationDesc: '',
operationNo: '',
@ -2251,7 +2259,7 @@
inspectionTypeNo: ''
},
currentRow: {},
saveLoading: false
saveLoading: false,
}
},
@ -2294,6 +2302,10 @@
this.getUserRoleList()
},
activated () {
},
methods: {
//
getSummaries (param) {
@ -2972,7 +2984,6 @@
this.modalData.partNo = data.rows[0].partNo
this.modalData.partDesc = data.rows[0].partDesc
this.modalData.spec = data.rows[0].spec
this.modalData.operationDesc = data.rows[0].operationDesc
this.modalData.qtyrequired = data.rows[0].qtyrequired
this.modalData.lotsize = data.rows[0].lotsize
} else {
@ -3049,7 +3060,6 @@
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
submit_flag:'',
orderNo: '',
operationDesc: '',
operationNo: '',
@ -3165,7 +3175,6 @@
inspectionTypeName:'',
inspectorNo:'',
inspectorName:'',
submit_flag:'',
orderNo: '',
operationDesc: '',
operationNo: '',
@ -3295,6 +3304,53 @@
})
},
//
getDataList2 () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
qcIPQCInspectionSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if (this.dataList.length > 0) {
//
this.$confirm(`确认开始检验?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tempData = {
site: this.dataList[0].site,
buNo: this.dataList[0].buNo,
inspectionNo: this.dataList[0].inspectionNo,
actionBy: this.$store.state.user.name,
state: '待检验'
}
actionIPQCInspection(tempData).then(({data}) => {
if (data && data.code === 0) {
qcIPQCInspectionSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if (this.dataList.length > 0) {
//
this.detailModal(this.dataList[0])
this.$router.push()
}
}
})
}
})
})
}
}
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
@ -3493,7 +3549,7 @@
this.detailData.notPassQty = row.notPassQty
}
this.getInspectionFormData()
this.inspectorSearch()
// this.inspectorSearch()
// this.acquisitionList = []
this.detailInformationFlag = true
},

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

@ -747,7 +747,7 @@
</el-tabs>
</el-form>
<el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="batchSave">保存</el-button>
<el-button type="primary" :loading="batchLoading" @click="batchSave">保存</el-button>
<el-button type="primary" @click="batchInformationFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
@ -2106,6 +2106,7 @@
inspectionTypeNo: ''
},
changeModalFlag: false,
batchLoading: false
}
},
@ -2273,6 +2274,7 @@
submitList: JSON.parse(JSON.stringify(this.IQCSelections)),
itemList: JSON.parse(JSON.stringify(this.batchDetailList))
}
this.batchLoading = true
batchSaveIQCDetailedRecord(tempData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@ -2288,6 +2290,9 @@
confirmButtonText: '确定'
})
}
this.batchLoading = false
}).catch(()=>{
this.batchLoading = false
})
})
},

Loading…
Cancel
Save