ruanqi 1 year ago
parent
commit
4bc526a3b9
  1. 4
      src/api/qc/qc.js
  2. 48
      src/views/modules/qc/qcTemplate.vue

4
src/api/qc/qc.js

@ -183,3 +183,7 @@ export const getInspectionStandards = data => createAPI(`/pms/qc/getInspectionSt
export const saveInspectionStandard = data => createAPI(`/pms/qc/saveInspectionStandard`,'post',data)
export const dataAcquisitionByItem = data => createAPI(`/pms/qc/dataAcquisitionByItem`,'post',data)
export const getSiteAndBuByUserName2 = data => createAPI(`/pms/qc/getSiteAndBuByUserName2`,'post',data)
export const goUpItemQC = data => createAPI(`/pms/qc/goUpItemQC`,'post',data)
export const goDownItemQC = data => createAPI(`/pms/qc/goDownItemQC`,'post',data)

48
src/views/modules/qc/qcTemplate.vue

@ -205,6 +205,8 @@
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="addFastModal()">新增</el-button>
<el-button type="primary" @click="goUp()">上移</el-button>
<el-button type="primary" @click="goDown()">下移</el-button>
</el-form-item>
</el-form>
<!-- 检验项目展示列表 -->
@ -212,6 +214,9 @@
<el-table
:height="400"
:data="detailList"
@row-click="itemClickRow"
ref="detailTable"
highlight-current-row
border
style="width: 100%;">
<el-table-column
@ -517,6 +522,8 @@
getSiteAndBuByUserName,
getInspectionStandards, //
saveInspectionStandard, //
goUpItemQC, //
goDownItemQC,//
} from "@/api/qc/qc.js"
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
@ -987,6 +994,9 @@
searchForm: {
objectID: '',
objectDesc: ''
},
currentRow:{
},
rules: {
templateNameType: [
@ -1537,7 +1547,9 @@
itemClickRow1 (row) {
this.$refs.itemTable1.toggleRowSelection(row)
},
itemClickRow(row){
this.currentRow= JSON.parse(JSON.stringify(row))
},
//
itemClickRow2 (row) {
this.$refs.itemTable2.toggleRowSelection(row)
@ -1698,7 +1710,41 @@
})
return this.exportList
},
goUp() {
goUpItemQC(this.currentRow).then(({data}) => {
if (data && data.code === 0) {
templateDetailsSearch(this.detailData).then(({data}) => {
this.detailList = data.rows
for (let i = 0; i <this.detailList.length ; i++) {
if(this.detailList[i].itemNo===this.currentRow.itemNo){
this.$refs.detailTable.setCurrentRow(this.detailList[i]);
this.currentRow=JSON.parse(JSON.stringify(this.detailList[i]))
this.$message.success('操作成功')
}
}
//this.objectSearch()
})
}
})
},
goDown() {
goDownItemQC(this.currentRow).then(({data}) => {
if (data && data.code === 0) {
templateDetailsSearch(this.detailData).then(({data}) => {
this.detailList = data.rows
for (let i = 0; i <this.detailList.length ; i++) {
if(this.detailList[i].itemNo===this.currentRow.itemNo){
this.$refs.detailTable.setCurrentRow(this.detailList[i]);
this.currentRow=JSON.parse(JSON.stringify(this.detailList[i]))
this.$message.success('操作成功')
}
}
})
}
})
},
startDownload() {},
finishDownload() {},

Loading…
Cancel
Save