Browse Source

提交修改

master
xiaobai 3 years ago
parent
commit
7b7d1b8d59
  1. BIN
      public/static/login/login_title.png
  2. BIN
      public/static/login/login_title_new.png
  3. 25
      src/components/drawerDialog/index.vue
  4. 2
      src/views/bggl/2000/jj/cyqp.vue
  5. 2
      src/views/common/SignName/index.vue
  6. 44
      src/views/dic/category.vue
  7. 6
      src/views/login/index.vue
  8. 2
      src/views/ysjl/1000/common/sz/gyscl.vue
  9. 2
      src/views/ysjl/1000/dj/nb/gynb.vue
  10. 2
      src/views/ysjl/1000/dj/sy/sysy.vue
  11. 2
      src/views/ysjl/1000/dj/wb/gywb.vue
  12. 2
      src/views/ysjl/2000/2400/zbg/jj/edit.vue
  13. 139
      src/views/ysjl/3000/common/index.vue
  14. 168
      src/views/ysjl/3000/common/inspection-items.vue
  15. 97
      src/views/ysjl/4000/dj/common/index.vue
  16. 96
      src/views/ysjl/4000/jj/common/index.vue
  17. 102
      src/views/ysjl/5000/dj/jdgy-cl/index.vue
  18. 100
      src/views/ysjl/5000/dj/lygg-cl/index.vue
  19. 2
      src/views/ysjl/F000/dj/edit.vue

BIN
public/static/login/login_title.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
public/static/login/login_title_new.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 28 KiB

25
src/components/drawerDialog/index.vue

@ -478,6 +478,27 @@
>
<el-input v-model="formLabelAlign.field" />
</el-form-item>
<el-row :gutter="20">
<el-col :span="16">
<el-form-item
label="字段别名"
prop="alias"
:rules="[{ required: true, message: '请输入字段别名', trigger: 'blur' }]"
>
<el-input v-model="formLabelAlign.alias" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-alert type="warning" title="简化word模板上写的字段名称" style="display: inline" :closable="false" />
</el-col>
</el-row>
<el-form-item
label="下换线拼接"
prop="underlineStitching"
:rules="[{ required: true, message: '请输入字段名', trigger: 'blur' }]"
>
<el-switch v-model="formLabelAlign.underlineStitching" />
</el-form-item>
<el-form-item
label="从右往左数对应的索引"
prod="indexFromRight"
@ -792,7 +813,9 @@ export default {
fieldMode: 0,
indexFromRight: '',
templateId: '', // id
templateSettingId: '' // id
templateSettingId: '', // id
alias: '',
underlineStitching: false
},
form: {
templateId: undefined,

2
src/views/bggl/2000/jj/cyqp.vue

@ -543,7 +543,7 @@ export default {
jyxm: JSON.stringify(this.tableData),
bgjyxm: JSON.stringify(this.tableData),
fbjyxm: JSON.stringify(this.fbTableData),
flag: operation
state: operation
}
}).then(data => {
//

2
src/views/common/SignName/index.vue

@ -15,7 +15,7 @@
<el-option v-for="dept in depts" :key="dept.id" :label="dept.name" :value="dept.id" />
</el-select>
<el-select v-model="userId" placeholder="请选择人员" style="width: 240px; padding-top: 20px" @change="signToPwd">
<el-option v-for="user in users" v-show="user.clientType === 'System'" :key="user.id" :label="user.nickname" :value="user.id" />
<el-option v-for="user in users" :key="user.id" :label="user.nickname" :value="user.id" />
</el-select>
</el-dialog>
</div>

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++) {

6
src/views/login/index.vue

@ -1,7 +1,7 @@
<template>
<div class="login-container" :style="loginBackImgPath">
<div class="login-form">
<img :src="loginTitleImg" alt>
<img class="login-title-img" :src="loginTitleImg" alt>
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" auto-complete="on" label-position="left">
<el-row>
<el-col :span="24">
@ -193,6 +193,10 @@ export default {
height: 400px;
padding: 35px 35px 15px 35px;
margin: 140px auto;
.login-title-img {
margin-left: 80px;
margin-bottom: 20px;
}
}
.svg-container {
padding: 6px 5px 6px 15px;

2
src/views/ysjl/1000/common/sz/gyscl.vue

@ -761,7 +761,7 @@ export default {
fbjyxm: JSON.stringify([this.yqsbData]),
bgjyxm: jyxm
},
flag: operation
state: operation
}
}).then(data => {
//

2
src/views/ysjl/1000/dj/nb/gynb.vue

@ -634,7 +634,7 @@ export default {
jyxm: jyxm,
bgjyxm: jyxm
},
flag: operation
state: operation
}
}).then(data => {
Utils.$emit('task-list')

2
src/views/ysjl/1000/dj/sy/sysy.vue

@ -586,7 +586,7 @@ export default {
jyxm: jyxm,
bgjyxm: jyxm
},
flag: operation
state: operation
}
}).then(data => {
Utils.$emit('task-list')

2
src/views/ysjl/1000/dj/wb/gywb.vue

@ -648,7 +648,7 @@ export default {
jyxm: jyxm,
bgjyxm: jyxm
},
flag: operation
state: operation
}
}).then(data => {
Utils.$emit('task-list')

2
src/views/ysjl/2000/2400/zbg/jj/edit.vue

@ -929,7 +929,7 @@ export default {
param: this.param,
jyxm: jyxm,
bgjyxm: jyxm,
flag: operation
state: operation
}
}).then(data => {
//

139
src/views/ysjl/3000/common/index.vue

@ -52,22 +52,12 @@
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="25">
<el-col
v-if="
state === 'create' ||
ysjl.jilubianhao === null ||
ysjl.jilubianhao === ''
"
:span="14"
>
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="14">
<el-form-item label="记录编号">
<el-input v-model="jlbh1" style="width: 80px" disabled />
<el-input v-model="jlbh4" style="width: 80px" disabled />
<el-input v-model="jlbh2" style="width: 80px" disabled />-
<el-input
v-model="jlbh3"
style="width: 85px"
/>
<el-input v-model="jlbh2" style="width: 80px" disabled />
<el-input v-model="jlbh3" style="width: 80px" disabled />-
<el-input v-model="jlbh4" style="width: 85px" />
</el-form-item>
</el-col>
<el-col v-else :span="9">
@ -750,7 +740,7 @@
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="ysjl.jianyanrenyuan" disabled />
<el-input v-model="jianyanrenyuan" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
@ -832,13 +822,6 @@ export default {
required: true,
type: Array
},
// /**
// * [{ index: 0, relationIds: [1, 2] }]
// */
// jyxmRelations: {
// required: true,
// type: Array
// },
fromType: {
required: true,
type: Number
@ -852,8 +835,8 @@ export default {
return {
ysjl: {},
param: {},
jlbh2: new Date().getFullYear(),
jlbh3: '',
jlbh2: '',
jlbh3: new Date().getFullYear(),
jlbh4: '',
isRepeat: false,
jianyanrenyuan: '',
@ -863,17 +846,7 @@ export default {
bgfyData: [],
ysjlId: this.$route.query.id,
checkedTab: 'first',
xmlbListAB: ['A', 'B'],
xmlbListAC: ['A', 'C'],
xmlbListBC: ['B', 'C'],
jyxmrqShow: false,
querenriqi: null,
signShow: false,
dialogEnclosureVisible: false,
dialogRoleVisible: false,
userList: [],
defaultRlr: [],
renlingren: [],
xinghaoList: [],
jybgData: [],
cols: [
@ -914,14 +887,12 @@ export default {
fubiao1: [],
fubiao2: [],
fubiao3: [],
tree: [],
jybgTemplateId: ''
tree: []
}
},
created() {
if (this.state === 'create') {
this.initYsjl()
this.getMaxBh()
if (this.fromType === 5 || this.fromType === 6) {
this.fubiao1 = [
{
@ -968,22 +939,21 @@ export default {
this.ysjl.xianchangjianyantiaojian = '符合'
this.departmentId = this.ysjl.departmentId
if (data.ysjl.shebeileibiedaima === '3300') {
this.jlbh4 = '(F)'
this.jlbh2 = '(F)'
} else if (data.ysjl.shebeileibiedaima === '3200') {
this.jlbh4 = '(Y)'
this.jlbh2 = '(Y)'
} else if (data.ysjl.shebeileibiedaima === '3400') {
if (data.ysjl.shebeipinzhongdaima === '3420') {
this.jlbh4 = '(X)'
this.jlbh2 = '(X)'
} else if (data.ysjl.shebeipinzhongdaima === '3430') {
this.jlbh4 = '(Z)'
this.jlbh2 = '(Z)'
}
} else {
this.jlbh4 = '(C)'
this.jlbh2 = '(C)'
}
this.getJyxm(1)
this.getSbList()
this.jybgTemplateId = this.ysjl.jybgTemplateId
console.log(this.ysjl.jybgTemplateId)
this.getMaxBh()
})
},
getSbList() {
@ -1017,14 +987,12 @@ export default {
if (fubiao[2]) {
this.fubiao3 = fubiao[2]
}
console.log(this.fubiao1)
})
},
getYsjl() {
this.ysjlService.getYsjl(this.ysjlId).then((data) => {
this.ysjl = data
this.departmentId = this.ysjl.departmentId
this.jybgTemplateId = this.ysjl.jybgTemplateId
this.ysjl.imagePath = ''
if (
this.ysjl.jianyanrenyuan !== null &&
@ -1101,7 +1069,7 @@ export default {
* 查询最大记录编号
*/
getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2 + '-'
const aheadPart = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-'
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
@ -1110,7 +1078,7 @@ export default {
hinderPart: ''
}
}).then((data) => {
this.jlbh3 = data
this.jlbh4 = data
this.ysjlService
.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
.then((data) => {
@ -1174,54 +1142,52 @@ export default {
return sorted
},
buildSaveData(operation) {
const tableData = []
const _this = this
let fubiao
if (this.fromType === 5 || this.fromType === 6) {
console.log(this.$refs.table4.tableData, 5555)
fubiao = [this.$refs.table4.tableData]
} else {
fubiao = [this.fubiao1, this.fubiao2, this.fubiao3]
}
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.bgfyData)
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.bgfyData, this.jybgData)
arr.forEach((row) => {
const tableData = []
this.bgfyData.forEach((row) => {
tableData.push({
ysjlId: this.ysjlId,
beizhu: row.beizhu,
dicJyxmId: row.dicJyxmId,
jianyanjieguo: row.jianyanjieguo ? row.jianyanjieguo : '',
jianyanjielun: row.jianyanjielun ? row.jianyanjielun : '',
jianyanjieguo: row.jianyanjieguo || '',
jianyanjielun: row.jianyanjielun || '',
jyxmMode: 0,
sort: row.sort,
orders: row.orders,
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
})
})
if (operation === 'add') {
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh4 + this.jlbh2 + '-' + this.jlbh3
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
this.save(operation, 'post', tableData, fubiao)
} else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao
@ -1245,21 +1211,12 @@ export default {
})
return false
}
// for (let i = 0; i < this.bgfyData.length; i++) {
// if (!this.bgfyData[i].jianjianyuan || !this.bgfyData[i].querenriqi) {
// this.$message.error(
// ''
// )
// return false
// }
// }
this.save(operation, 'put', tableData, fubiao)
} else if (operation === 'upd') {
this.save(operation, 'put', tableData, fubiao)
}
},
save(operation, type, jyxm, fubiao) {
console.log(this.jybgData, 2222)
if (this.fromType !== 5 && this.fromType !== 6) { this.ysjl.imagePath = this.$refs.table1.imgPath }
//
@ -1283,7 +1240,7 @@ export default {
fbjyxm: JSON.stringify(fubiao)
},
jdJyxm: jyxm,
flag: operation
state: operation
}
}).then((data) => {
Utils.$emit('ysjl-db-list')
@ -1297,7 +1254,6 @@ export default {
//
this.common.reloadViewToUpdateYsjl(this.ysjl)
} else if (operation === 'upd') {
this.dialogRoleVisible = false
this.$message({ message: '更新成功', type: 'success' })
//
this.$router.push({
@ -1341,12 +1297,7 @@ export default {
})
},
changXh: function(val) {
const xinghao = this.xinghaoList.filter((xh) => xh.xinghao === val)[0]
this.$set(
this.param,
'jiandingbaogaobianhao',
(xinghao && xinghao.jiandingbaogaobianhao) || ''
)
// TODO
},
loadPhxsImage(data) {
this.pic = data

168
src/views/ysjl/3000/common/inspection-items.vue

@ -33,45 +33,21 @@
prop="jianyanjieguo"
width="120"
label="检查结果"
>
<template slot-scope="scope">
<el-select
v-model="scope.row.jianyanjieguo"
@change="v=>changeFn(v,scope.row)"
>
<el-option
v-for="item in jyjgList"
:key="item"
:label="item"
:value="item"
/>
</el-select>
</template>
</el-table-column>
<!-- <el-table-column
align="center"
prop="gongzuojianzheng"
min-width="200"
label="检验结论"
>
<template slot-scope="scope">
<el-autocomplete
v-model="scope.row.gongzuojianzheng"
v-model="scope.row.jianyanjieguo"
class="inline-input"
style="width: 100%"
:fetch-suggestions="
(queryString, cb) => {
querySearchGzjz(queryString, cb, scope.$index);
}
"
:fetch-suggestions="querySearchJyjg"
@input="(val) => changeFn(val, scope.row)"
/>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
</div>
</template>
<script>
// import Technical from '@/views/ysjl/3000/common/technical-parameter'
export default {
name: 'Inspection',
@ -90,7 +66,7 @@ export default {
},
data() {
return {
jyjgList: ['√', 'X', '/']
jyjgList: [{ value: '√' }, { value: 'X' }, { value: '/' }]
}
},
created() {
@ -98,127 +74,33 @@ export default {
},
mounted() {},
methods: {
/**
* 是否可编辑
* @param $index
* @returns {number}
*/
showXmlb($index) {
return this.showXmlbIndexListSg.filter((xl) => {
return xl.index === $index
}).length
},
/**
* 根据索引找到对应的项目类别选项列表
* @param $index
*/
getXmlbList($index) {
for (let i = 0; i < this.showXmlbIndexListSg.length; i++) {
const xl = this.showXmlbIndexListSg[i]
if (xl.index === $index) {
return xl.xmlb === 'AB'
? this.xmlbListAB
: xl.xmlb === 'AC'
? this.xmlbListAC
: this.xmlbListBC
}
}
},
/**
* 修改检验项目关联的检验结果及确认日期为监检日期
* @param $index 检验项目索引
*/
changeJyjg($index) {
//
const isWcx = this.bgfyData[$index].jianyanjieguo === '无此项'
const isWx = this.bgfyData[$index].jianyanjieguo === '外协'
if (isWcx) {
this.bgfyData[$index].gongzuojianzheng = '—'
}
if (isWx) {
this.bgfyData[$index].gongzuojianzheng = '外协部件监检证书'
}
if (isWcx || isWx) {
this.bgfyData[$index].querenriqi =
this.formatter.dateFormat('YYYY-MM-dd')
} else {
this.bgfyData[$index].gongzuojianzheng = this.dicGzjz[$index].value
this.bgfyData[$index].querenriqi = this.ysjl.jianyanjieshuriqi
}
//
const jyxm = this.jyxmRelations.filter(
(jyxm) => jyxm.index === $index
)[0]
//
if (!jyxm) {
return
}
//
//
jyxm.relationIds.forEach((index) => {
this.bgfyData[index].jianyanjieguo =
this.bgfyData[$index].jianyanjieguo
if (isWcx || isWx) {
this.bgfyData[index].gongzuojianzheng =
this.bgfyData[$index].gongzuojianzheng
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
} else {
this.bgfyData[index].gongzuojianzheng = this.dicGzjz[index].value
this.bgfyData[index].querenriqi = this.ysjl.jianyanjieshuriqi
}
})
},
onRowClick(row) {
this.$refs.bgfyData.toggleRowSelection(row)
},
/**
* 修改检验项目关联的确认日期
* @param $index 检验项目索引
*/
changeQrrq: function($index) {
//
if (!this.bgfyData[$index].querenriqi) {
return
}
//
const jyxm = this.jyxmRelations.filter(
(jyxm) => jyxm.index === $index
)[0]
//
if (!jyxm) {
return
}
//
jyxm.relationIds.forEach((index) => {
//
if (!this.bgfyData[index].querenriqi) {
this.bgfyData[index].querenriqi = this.bgfyData[$index].querenriqi
}
})
querySearchJyjg: function(queryString, cb, $index) {
cb(this.jyjgList)
},
querySearchGzjz: function(queryString, cb, $index) {
cb([this.dicGzjz[$index]])
change(row) {
console.log(row)
},
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 = '符合'
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 = '无此项'
}
} else {
if (val === 'X') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认不符合'
} else if (val === '√') {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '资料确认符合'
} else {
this.jybgData[row.jybgJyjgIndex].jianyanjieguo = '无此项'
}
jybgJyjgJyxm.jianyanjieguo = ''
}
}
}

97
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: {},
@ -1026,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',
@ -1074,8 +1090,8 @@ export default {
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0)
.then((data) => {
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1)
@ -1089,8 +1105,8 @@ export default {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getCyJyxm(this.ysjl.jybgTemplateId, sort)
@ -1102,6 +1118,23 @@ export default {
})
}
},
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() === '') {
@ -1112,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) => {
@ -1128,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'
@ -1179,7 +1235,8 @@ export default {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {},
jdJyxm: jyxm
jdJyxm: jyxm,
state: operation
}
}).then((data) => {
Utils.$emit('task-list')

96
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: {},
@ -1167,8 +1161,8 @@ export default {
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.$route.query.templateId, sort, 0)
.then((data) => {
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getJdCyJyxm(this.ysjlId, this.ysjl.jybgTemplateId, sort, 1)
@ -1182,8 +1176,8 @@ export default {
data.forEach((row) => {
row.dicJyxmId = row.id
})
this.bgfyData = data
this.tableJs.getData(this.cols, this.rows, this.bgfyData)
this.sybjSData = data
this.tableJs.getData(this.cols, this.rows, this.sybjSData)
})
this.jyxmService
.getCyJyxm(this.ysjl.jybgTemplateId, sort)
@ -1195,6 +1189,46 @@ export default {
})
}
},
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() === '') {
@ -1205,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) => {
@ -1220,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'
@ -1271,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')

100
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: {
@ -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')

2
src/views/ysjl/F000/dj/edit.vue

@ -599,7 +599,7 @@ export default {
data: {
ysjl: this.ysjl,
param: this.param,
flag: operation
state: operation
}
}).then(data => {
Utils.$emit('task-list')

Loading…
Cancel
Save