Compare commits

...

3 Commits

  1. 44
      src/views/dic/category.vue
  2. 113
      src/views/ysjl/4000/dj/common/index.vue
  3. 112
      src/views/ysjl/4000/jj/common/index.vue
  4. 102
      src/views/ysjl/5000/dj/jdgy-cl/index.vue
  5. 104
      src/views/ysjl/5000/dj/lygg-cl/index.vue

44
src/views/dic/category.vue

@ -74,8 +74,8 @@
width="80"
/>
<el-table-column
:formatter="formatSpecies"
align="center"
:formatter="formatSpecies"
label="设备种类"
prop="species"
/>
@ -106,6 +106,15 @@
<div slot="header" class="clearfix">
<span>字典详情</span>
</div>
<el-button
type="danger"
icon="el-icon-delete"
@click="deleteCategoryDetail"
v-if="list.length > 0"
style="margin-bottom:20px"
>
删除
</el-button>
<el-table
v-if="list.length > 0"
ref="list"
@ -114,8 +123,7 @@
border
fit
highlight-current-row
@row-click="onRowClick"
@selection-change="handleSelectionChange"
@selection-change="detailHandleSelectionChange"
>
<el-table-column type="selection" width="40" />
<el-table-column
@ -226,6 +234,7 @@
<script>
import Pagination from '@/components/Pagination'
import qs from 'qs'
export default {
name: 'Category',
components: { Pagination },
@ -251,7 +260,8 @@ export default {
sbzlList: [],
species: [],
parentList: [],
leftList: []
leftList: [],
detailSeletArr:[]
}
},
created() {
@ -284,6 +294,9 @@ export default {
handleSelectionChange: function(val) {
this.multipleSelection = val
},
detailHandleSelectionChange(val){
this.detailSeletArr = val
},
showCreate() {
this.tempCategory = {}
this.dialogStatus = 'create'
@ -292,9 +305,9 @@ export default {
createCategory() {
this.$refs['tempCategory'].validate((valid) => {
if (valid) {
this.tempCategory.species = JSON.stringify(this.species)
this.tempCategory.species = this.species.join(',')
this.api({
url: '/category/addCategory',
url: '/category',
method: 'post',
data: this.tempCategory
}).then(() => {
@ -404,8 +417,25 @@ export default {
closeDialog() {
this.species = []
},
deleteCategoryDetail(){
if(this.detailSeletArr.length==0){
return this.$message.warning('请选择数据')
}
this.api({
url:'/category/delete',
method:'delete',
params:{
integers:this.detailSeletArr.map(item=>item.id)
},
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
}).then(res=>{
this.$message({ message: '成功删除', type: 'success' })
})
},
formatSpecies(row, column, cellValue) {
const value = JSON.parse(cellValue)
const value = cellValue.split(',')
let lable = ''
for (let i = 0; i < value.length; i++) {
for (let j = 0; j < this.sbzlList.length; j++) {

113
src/views/ysjl/4000/dj/common/index.vue

@ -822,22 +822,13 @@
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select
<el-autocomplete
v-model="scope.row.jianyanjieguo"
:disabled="edit"
type="text"
placeholder="请选择"
class="inline-input"
style="width: 100%"
filterable
allow-create
autocomplete
default-first-option
>
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
:fetch-suggestions="querySearchJyjg"
@input="(val) => changeFn(val, scope.row)"
/>
</template>
</el-table-column>
</el-table>
@ -880,6 +871,7 @@ export default {
sybjSData: [],
tableData: [],
tree: [],
jybgData: [], //
checkedTab: 'first',
ysjlId: this.$route.query.id,
//
@ -906,7 +898,8 @@ export default {
return row.jianyanneirong
}
}
]
],
jyjgList: [{ value: '√' }, { value: 'X' }, { value: '/' }]
}
},
computed: {},
@ -926,12 +919,10 @@ export default {
created() {
if (this.state === 'create') {
this.initYsjl()
this.getJyxm(1)
//
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
this.getDepartment()
},
@ -1008,6 +999,7 @@ export default {
}
}).then((data) => {
this.ysjl = data.ysjl
this.getJyxm(1)
this.departmentId = this.ysjl.departmentId
this.param =
data.param !== null && data.param !== undefined ? data.param : {}
@ -1027,6 +1019,29 @@ export default {
// this.param.shangcijianyanriqi = this.common.checkDateFormat(this.param.shangcijianyanriqi)
})
},
querySearchJyjg: function(queryString, cb, $index) {
cb(this.jyjgList)
},
changeFn(val, row) {
const jybgJyjgJyxm = this.jybgData[row.jybgJyjgIndex - 1]
let beizhu = ''
if (val.length > 1) {
beizhu = val.substr(1)
}
if (val.indexOf('X') === 0) {
jybgJyjgJyxm.jianyanjieguo = '不符合' + beizhu
} else if (val.indexOf('√') === 0) {
let jyjg = '符合'
if (row.xiangmuleibie === 'C') {
jyjg = '资料确认符合'
}
jybgJyjgJyxm.jianyanjieguo = jyjg + beizhu
} else if (val.indexOf('/') === 0) {
jybgJyjgJyxm.jianyanjieguo = '无此项' + beizhu
} else {
jybgJyjgJyxm.jianyanjieguo = ''
}
},
getYsjl(id) {
this.api({
url: '/ysjl',
@ -1036,6 +1051,7 @@ export default {
}
}).then((data) => {
this.ysjl = data
this.getJyxm(1)
this.departmentId = this.ysjl.departmentId
if (
this.ysjl.jianyanrenyuan !== null &&
@ -1072,10 +1088,15 @@ export default {
getJyxm(sort) {
if (this.$route.query.state === 'update') {
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort)
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0)
.then((data) => {
this.sybjSData = data
this.tableJs.getData(this.cols, undefined, this.sybjSData)
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1)
.then((data) => {
this.jybgData = data
})
} else {
this.jyxmService
@ -1084,12 +1105,36 @@ export default {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.sybjSData = data
this.tableJs.getData(this.cols, undefined, this.sybjSData)
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getCyJyxm(this.ysjl.jybgTemplateId, sort)
.then((data) => {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.jybgData = data
})
}
},
sortClass(sortData) {
const groupBy = (array, f) => {
const groups = {}
array.forEach((o) => {
const group = JSON.stringify(f(o))
groups[group] = groups[group] || []
groups[group].push(o)
})
return Object.keys(groups).map((group) => {
return groups[group]
})
}
const sorted = groupBy(sortData, (item) => {
return item.jybgJyjlIndex //
})
return sorted
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
@ -1100,6 +1145,16 @@ export default {
return false
}
}
const subArr = this.sortClass(this.sybjSData)
subArr.forEach((item) => {
if (item.some((k) => k.jianyanjieguo.indexOf('X') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('√') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('/') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
}
})
//
const tableData = []
this.sybjSData.forEach((row) => {
@ -1116,6 +1171,19 @@ export default {
cjState: 0
})
})
this.jybgData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo || '',
jianyanjielun: row.jianyanjielun || '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 1
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
@ -1167,7 +1235,8 @@ export default {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
jdJyxm: jyxm,
state: operation
}
}).then((data) => {
Utils.$emit('task-list')

112
src/views/ysjl/4000/jj/common/index.vue

@ -901,21 +901,13 @@
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select
<el-autocomplete
v-model="scope.row.jianyanjieguo"
:disabled="edit"
type="text"
placeholder="请选择"
class="inline-input"
style="width: 100%"
filterable
allow-create
default-first-option
>
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
:fetch-suggestions="querySearchJyjg"
@input="(val) => changeFn(val, scope.row)"
/>
</template>
</el-table-column>
</el-table>
@ -991,7 +983,9 @@ export default {
return row.jianyanneirong
}
}
]
],
jyjgList: [{ value: '√' }, { value: 'X' }, { value: '/' }],
jybgData: []//
}
},
computed: {},
@ -1011,12 +1005,10 @@ export default {
created() {
if (this.state === 'create') {
this.initYsjl()
this.getJyxm(1)
//
this.getMaxBh()
} else {
this.getYsjl(this.$route.query.id)
this.getJyxm(1)
}
this.getDepartment()
},
@ -1094,6 +1086,7 @@ export default {
}).then((data) => {
this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.getJyxm(1)
this.param =
data.param !== null && data.param !== undefined ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
@ -1129,6 +1122,7 @@ export default {
}).then((data) => {
this.ysjl = data
this.departmentId = this.ysjl.departmentId
this.getJyxm(1)
if (
this.ysjl.jianyanrenyuan !== null &&
this.ysjl.jianyanrenyuan.length > 0
@ -1165,10 +1159,15 @@ export default {
getJyxm(sort) {
if (this.$route.query.state === 'update') {
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort)
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0)
.then((data) => {
this.sybjSData = data
this.tableJs.getData(this.cols, undefined, this.sybjSData)
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1)
.then((data) => {
this.jybgData = data
})
} else {
this.jyxmService
@ -1177,12 +1176,59 @@ export default {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.sybjSData = data
this.tableJs.getData(this.cols, undefined, this.sybjSData)
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getCyJyxm(this.ysjl.jybgTemplateId, sort)
.then((data) => {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.jybgData = data
})
}
},
querySearchJyjg: function(queryString, cb, $index) {
cb(this.jyjgList)
},
changeFn(val, row) {
const jybgJyjgJyxm = this.jybgData[row.jybgJyjgIndex - 1]
let beizhu = ''
if (val.length > 1) {
beizhu = val.substr(1)
}
if (val.indexOf('X') === 0) {
jybgJyjgJyxm.jianyanjieguo = '不符合' + beizhu
} else if (val.indexOf('√') === 0) {
let jyjg = '符合'
if (row.xiangmuleibie === 'C') {
jyjg = '资料确认符合'
}
jybgJyjgJyxm.jianyanjieguo = jyjg + beizhu
} else if (val.indexOf('/') === 0) {
jybgJyjgJyxm.jianyanjieguo = '无此项' + beizhu
} else {
jybgJyjgJyxm.jianyanjieguo = ''
}
},
sortClass(sortData) {
const groupBy = (array, f) => {
const groups = {}
array.forEach((o) => {
const group = JSON.stringify(f(o))
groups[group] = groups[group] || []
groups[group].push(o)
})
return Object.keys(groups).map((group) => {
return groups[group]
})
}
const sorted = groupBy(sortData, (item) => {
return item.jybgJyjlIndex //
})
return sorted
},
saveYsjl: function(operation) {
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
@ -1193,6 +1239,16 @@ export default {
return false
}
}
const subArr = this.sortClass(this.sybjSData)
subArr.forEach((item) => {
if (item.some((k) => k.jianyanjieguo.indexOf('X') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('√') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('/') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
}
})
//
const tableData = []
this.sybjSData.forEach((row) => {
@ -1208,6 +1264,19 @@ export default {
cjState: 0
})
})
this.jybgData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo || '',
jianyanjielun: row.jianyanjielun || '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 1
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
@ -1259,7 +1328,8 @@ export default {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
jdJyxm: jyxm,
state: operation
}
}).then((data) => {
Utils.$emit('task-list')

102
src/views/ysjl/5000/dj/jdgy-cl/index.vue

@ -368,12 +368,13 @@
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option @change="v=>changeFn(v,scope.row)">
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
<el-autocomplete
v-model="scope.row.jianyanjieguo"
class="inline-input"
style="width: 100%"
:fetch-suggestions="querySearchJyjg"
@input="(val) => changeFn(val, scope.row)"
/>
</template>
</el-table-column>
</el-table>
@ -411,7 +412,7 @@ export default {
tableData: [],
checkedTab: 'first',
ysjlId: this.$route.query.id,
jybgData: [],
jybgData: [], //
//
//
cols: [
@ -441,7 +442,8 @@ export default {
return row.jianyanneirong
}
}
]
],
jyjgList: [{ value: '√' }, { value: 'X' }, { value: '/' }]
}
},
computed: {
@ -632,24 +634,27 @@ export default {
})
}
},
querySearchJyjg: function(queryString, cb, $index) {
cb(this.jyjgList)
},
changeFn(val, row) {
console.log(row, val)
if (row.xiangmuleibie === 'A' || row.xiangmuleibie === 'B') {
if (val === 'X') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '不符合'
} else if (val === '√') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '符合'
} else {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '无此项'
}
} else {
if (val === 'X') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认不符合'
} else if (val === '√') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认符合'
const jybgJyjgJyxm = this.jybgData[row.jybgJyjgIndex - 1]
let beizhu = ''
if (val.length > 1) {
beizhu = val.substr(1)
}
if (val.indexOf('X') === 0) {
jybgJyjgJyxm.jianyanjieguo = '不符合' + beizhu
} else if (val.indexOf('√') === 0) {
let jyjg = '符合'
if (row.xiangmuleibie === 'C') {
jyjg = '资料确认符合'
}
jybgJyjgJyxm.jianyanjieguo = jyjg + beizhu
} else if (val.indexOf('/') === 0) {
jybgJyjgJyxm.jianyanjieguo = '无此项' + beizhu
} else {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '无此项'
}
jybgJyjgJyxm.jianyanjieguo = ''
}
},
sortClass(sortData) {
@ -670,40 +675,25 @@ export default {
return sorted
},
saveYsjl: function(operation) {
const _this = this
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
let arr = []
const subArr = this.sortClass(this.jybgData)
subArr.map((item) => {
if (
item.some(
(k) => k.jianyanjieguo === '不符合' || k.jianyanjieguo === 'X'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (
item.every(
(k) => k.jianyanjieguo === '符合' || k.jianyanjieguo === '√'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (
item.every(
(k) => k.jianyanjieguo === '无此项' || k.jianyanjieguo === '/'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
const subArr = this.sortClass(this.sybjSData)
subArr.forEach((item) => {
if (item.some((k) => k.jianyanjieguo.indexOf('X') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('√') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('/') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
}
})
arr = arr.concat(this.sybjSData, this.jybgData)
//
const tableData = []
arr.forEach((row) => {
this.sybjSData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
@ -716,6 +706,19 @@ export default {
cjState: 0
})
})
this.jybgData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo || '',
jianyanjielun: row.jianyanjielun || '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 1
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
@ -761,7 +764,8 @@ export default {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
jdJyxm: jyxm,
state: operation
}
}).then(data => {
Utils.$emit('task-list')

104
src/views/ysjl/5000/dj/lygg-cl/index.vue

@ -361,12 +361,13 @@
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo" :disabled="edit" type="text" placeholder="请选择" style="width: 100%;" filterable allow-create default-first-option @change="v=>changeFn(v,scope.row)">
<el-option label="√" value="√" />
<el-option label="○" value="○" />
<el-option label="×" value="×" />
<el-option label="/" value="/" />
</el-select>
<el-autocomplete
v-model="scope.row.jianyanjieguo"
class="inline-input"
style="width: 100%"
:fetch-suggestions="querySearchJyjg"
@input="(val) => changeFn(val, scope.row)"
/>
</template>
</el-table-column>
</el-table>
@ -435,7 +436,8 @@ export default {
return row.jianyanneirong
}
}
]
],
jyjgList: [{ value: '√' }, { value: 'X' }, { value: '/' }]
}
},
computed: {
@ -535,6 +537,7 @@ export default {
}
}).then(data => {
this.ysjl = data.ysjl
this.getJyxm(1)
this.param = (data.param !== null && data.param !== undefined) ? data.param : {}
this.ysjl.jianyanjieshuriqi = this.formatter.dateFormat('YYYY-MM-dd')
this.getXcjyrq()
@ -548,7 +551,6 @@ export default {
//
this.ysjl.zhizaoriqi = this.common.checkDateFormat(this.ysjl.zhizaoriqi)
this.ysjl.gaizaoriqi = this.common.checkDateFormat(this.ysjl.gaizaoriqi)
this.getJyxm(1)
})
},
getYsjl(id) {
@ -560,6 +562,7 @@ export default {
}
}).then(data => {
this.ysjl = data
this.getJyxm(1)
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan !== null && this.ysjl.jianyanrenyuan.length > 0) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
@ -569,7 +572,6 @@ export default {
this.getMaxBh()
}
this.getParam(this.ysjl.id, this.ysjl.shebeizhongleidaima)
this.getJyxm(1)
})
},
handleChange(v) {
@ -615,24 +617,27 @@ export default {
})
}
},
querySearchJyjg: function(queryString, cb, $index) {
cb(this.jyjgList)
},
changeFn(val, row) {
console.log(row, val)
if (row.xiangmuleibie === 'A' || row.xiangmuleibie === 'B') {
if (val === 'X') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '不符合'
} else if (val === '√') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '符合'
} else {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '无此项'
}
} else {
if (val === 'X') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认不符合'
} else if (val === '√') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认符合'
const jybgJyjgJyxm = this.jybgData[row.jybgJyjgIndex - 1]
let beizhu = ''
if (val.length > 1) {
beizhu = val.substr(1)
}
if (val.indexOf('X') === 0) {
jybgJyjgJyxm.jianyanjieguo = '不符合' + beizhu
} else if (val.indexOf('√') === 0) {
let jyjg = '符合'
if (row.xiangmuleibie === 'C') {
jyjg = '资料确认符合'
}
jybgJyjgJyxm.jianyanjieguo = jyjg + beizhu
} else if (val.indexOf('/') === 0) {
jybgJyjgJyxm.jianyanjieguo = '无此项' + beizhu
} else {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '无此项'
}
jybgJyjgJyxm.jianyanjieguo = ''
}
},
sortClass(sortData) {
@ -653,40 +658,25 @@ export default {
return sorted
},
saveYsjl: function(operation) {
const _this = this
if (operation === 'add') {
if (this.jlbh3.trim() === '') {
this.$message({ message: '请先确认记录编号是否完整!', type: 'warning' })
return false
}
}
let arr = []
const subArr = this.sortClass(this.jybgData)
subArr.map((item) => {
if (
item.some(
(k) => k.jianyanjieguo === '不符合' || k.jianyanjieguo === 'X'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (
item.every(
(k) => k.jianyanjieguo === '符合' || k.jianyanjieguo === '√'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (
item.every(
(k) => k.jianyanjieguo === '无此项' || k.jianyanjieguo === '/'
)
) {
_this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
const subArr = this.sortClass(this.sybjSData)
subArr.forEach((item) => {
if (item.some((k) => k.jianyanjieguo.indexOf('X') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '不合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('√') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '合格'
} else if (item.every((k) => k.jianyanjieguo.indexOf('/') === 0)) {
this.jybgData[item[0].jybgJyjlIndex - 1].jianyanjielun = '无此项'
}
})
arr = arr.concat(this.sybjSData, this.jybgData)
//
const tableData = []
arr.forEach((row) => {
this.sybjSData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
@ -699,6 +689,19 @@ export default {
cjState: 0
})
})
this.jybgData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo || '',
jianyanjielun: row.jianyanjielun || '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
cjState: 1
})
})
let method = ''
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
@ -744,7 +747,8 @@ export default {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
jdJyxm: jyxm,
state: operation
}
}).then(data => {
Utils.$emit('task-list')

Loading…
Cancel
Save