+
@@ -16,36 +16,20 @@
-
-
-
-
-
-
-
-
- (mm)
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
@@ -56,82 +40,137 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
-
-
diff --git a/src/views/ysjl/8000/jj/edit2.vue b/src/views/ysjl/8000/jj/edit2.vue
deleted file mode 100644
index df99d5c..0000000
--- a/src/views/ysjl/8000/jj/edit2.vue
+++ /dev/null
@@ -1,803 +0,0 @@
-
-
-
-
-
- 保存
-
-
- 更新
-
-
- 添加检验方案
-
-
- 查看同类报告
-
-
- 生成报告
-
-
- 预览
-
-
- 批量修改日期
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.jianyanmu }}
-
-
-
-
-
-
- {{ scope.row.xiangmuleibie }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row.jyxmLabel }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/ajlsy.vue b/src/views/ysjl/8000/jj/fenxiang/ajlsy.vue
deleted file mode 100644
index e259f24..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/ajlsy.vue
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/aqfj.vue b/src/views/ysjl/8000/jj/fenxiang/aqfj.vue
deleted file mode 100644
index dfb7b79..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/aqfj.vue
+++ /dev/null
@@ -1,597 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/bhcd.vue b/src/views/ysjl/8000/jj/fenxiang/bhcd.vue
deleted file mode 100644
index d3b805f..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/bhcd.vue
+++ /dev/null
@@ -1,296 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/czmxb.vue b/src/views/ysjl/8000/jj/fenxiang/czmxb.vue
deleted file mode 100644
index fca38f4..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/czmxb.vue
+++ /dev/null
@@ -1,207 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 下载导入模板
-
-
-
- 导入数据
-
-
-
- 添加
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 下载导入模板
-
-
-
- 导入数据
-
-
-
- 添加
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/gzaqqrb.vue b/src/views/ysjl/8000/jj/fenxiang/gzaqqrb.vue
deleted file mode 100644
index 359608d..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/gzaqqrb.vue
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/hlsjl.vue b/src/views/ysjl/8000/jj/fenxiang/hlsjl.vue
deleted file mode 100644
index cbbe39b..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/hlsjl.vue
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/hxcf.vue b/src/views/ysjl/8000/jj/fenxiang/hxcf.vue
deleted file mode 100644
index de3fc9b..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/hxcf.vue
+++ /dev/null
@@ -1,193 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/jxfx.vue b/src/views/ysjl/8000/jj/fenxiang/jxfx.vue
deleted file mode 100644
index eb6bf02..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/jxfx.vue
+++ /dev/null
@@ -1,180 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/mxb2.vue b/src/views/ysjl/8000/jj/fenxiang/mxb2.vue
deleted file mode 100644
index 2915923..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/mxb2.vue
+++ /dev/null
@@ -1,187 +0,0 @@
-
-
-
-
-
-
-
-
- 下载导入模板
-
-
-
- 导入数据
-
-
-
- 添加
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/nyjh.vue b/src/views/ysjl/8000/jj/fenxiang/nyjh.vue
deleted file mode 100644
index cee8c15..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/nyjh.vue
+++ /dev/null
@@ -1,272 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/nysy.vue b/src/views/ysjl/8000/jj/fenxiang/nysy.vue
deleted file mode 100644
index 0bd45f2..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/nysy.vue
+++ /dev/null
@@ -1,262 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/qmxsy.vue b/src/views/ysjl/8000/jj/fenxiang/qmxsy.vue
deleted file mode 100644
index 3c1e5c0..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/qmxsy.vue
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/sxjcfb.vue b/src/views/ysjl/8000/jj/fenxiang/sxjcfb.vue
deleted file mode 100644
index daced74..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/sxjcfb.vue
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/sxzlcc.vue b/src/views/ysjl/8000/jj/fenxiang/sxzlcc.vue
deleted file mode 100644
index d0c5f2c..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/sxzlcc.vue
+++ /dev/null
@@ -1,351 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/ydjc.vue b/src/views/ysjl/8000/jj/fenxiang/ydjc.vue
deleted file mode 100644
index 5721ff5..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/ydjc.vue
+++ /dev/null
@@ -1,208 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/fenxiang/zlsspj.vue b/src/views/ysjl/8000/jj/fenxiang/zlsspj.vue
deleted file mode 100644
index f4d2620..0000000
--- a/src/views/ysjl/8000/jj/fenxiang/zlsspj.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/wusun/cfjc.vue b/src/views/ysjl/8000/jj/wusun/cfjc.vue
deleted file mode 100644
index b0ed39c..0000000
--- a/src/views/ysjl/8000/jj/wusun/cfjc.vue
+++ /dev/null
@@ -1,362 +0,0 @@
-
-
-
-
-
- 保存
-
-
- 更新
-
-
- 生成报告
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/wusun/csjc.vue b/src/views/ysjl/8000/jj/wusun/csjc.vue
deleted file mode 100644
index 399e637..0000000
--- a/src/views/ysjl/8000/jj/wusun/csjc.vue
+++ /dev/null
@@ -1,373 +0,0 @@
-
-
-
-
-
-
- 保存
-
-
- 更新
-
-
- 生成报告
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/wusun/stjc.vue b/src/views/ysjl/8000/jj/wusun/stjc.vue
deleted file mode 100644
index f563d4f..0000000
--- a/src/views/ysjl/8000/jj/wusun/stjc.vue
+++ /dev/null
@@ -1,362 +0,0 @@
-
-
-
-
-
-
- 保存
-
-
- 更新
-
-
- 生成报告
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/jj/wusun/sxjc.vue b/src/views/ysjl/8000/jj/wusun/sxjc.vue
deleted file mode 100644
index b166790..0000000
--- a/src/views/ysjl/8000/jj/wusun/sxjc.vue
+++ /dev/null
@@ -1,453 +0,0 @@
-
-
-
-
-
-
- 保存
-
-
- 更新
-
-
- 生成报告
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ysjl/8000/nd/edit.vue b/src/views/ysjl/8000/nd/edit.vue
index b015b00..e425a07 100644
--- a/src/views/ysjl/8000/nd/edit.vue
+++ b/src/views/ysjl/8000/nd/edit.vue
@@ -1,5 +1,5 @@
-
+
@@ -30,10 +30,11 @@
-
-
- -
-
+
+
+ -
+
+
@@ -225,9 +226,9 @@
-
+
-
+
@@ -248,12 +249,28 @@
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
-
+
+
+ {{ item }}
+
+
@@ -264,12 +281,30 @@
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
+
+
+ {{ item }}
+
+
+
@@ -322,7 +357,7 @@ import jyfa from '../../addJyfa'
import SignName from '@/views/common/SignName'
import Utils from '../../../../utils/contact.js'
export default {
- name: 'GdNdYsjl',
+ name: 'GdNjYsjl',
components: { SignName, Sticky, jyfa },
data() {
return {
@@ -332,16 +367,17 @@ export default {
glqkData: [],
yxzkData: [],
aqfjData: [],
- jlbh1: 'GD',
- jlbh2: '(' + (new Date().getFullYear()) + ')',
- jlbh3: '',
- jlbh4: 'GC',
+ jlbh1: 'WT',
+ jlbh2: 'GYD',
+ jlbh3: new Date().getFullYear(),
+ jlbh4: '',
+ jlbh5: '',
// 检验人员
jianyanrenyuan: '',
defaultParam: {},
// 接收传入该页面的值
// 页面状态 {create=> 创建,update=> 更新}
- state: this.$route.query.state,
+ state: this.$route.params.state,
ysjl: this.$route.query.ysjl,
departmentId: this.$route.query.ysjl.departmentId,
param: (this.$route.query.param === null || this.$route.query.param === undefined) ? Object.assign({}, this.defaultParam) : this.$route.query.param,
@@ -349,6 +385,12 @@ export default {
// 表格合并相关
// 参与列合并的字段,在这里增加即可
cols: [
+ {
+ name: 'xiangmuleibie',
+ getValue(row) {
+ return row.xiangmuleibie
+ }
+ },
{
name: 'jianyanxiang', // 参与计算的列名,必须和el-table-column prop=''值一致
getValue(row) { // 该列用于比较的值的获取方法
@@ -389,6 +431,8 @@ export default {
similarVisible: false,
similarTableData: [],
isRepeat: false,
+ glqkjyjg: ['0_0', '1_0', '2_0', '3_0', '4_0', '5_0', '6_0', '7_0', '8_0', '9_0', '10_0', '11_0', '12_0'],
+ yxzkjyjg: ['0_0', '1_0', '2_0', '3_0', '4_0', '5_0', '6_0', '7_0', '8_0', '9_0', '10_0', '11_0', '12_0', '13_0', '14_0', '15_0', '16_0', '17_0'],
tableData: [],
yxzkHtml1: ''
}
@@ -398,25 +442,33 @@ export default {
if (this.state !== 'create') {
return this.ysjl.jilubianhao
}
- return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
+ return this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4 + this.jlbh5
+ }
+ },
+ watch: {
+ jilubianhao: function(newValue) {
+ this.judgeRepeat(newValue, this.ysjl.id)
}
},
created() {
if (this.state === 'create') {
// 设置初始值
const tempTime = new Date()
- this.ysjl.jianyankaishiriqi = tempTime.getFullYear() + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
- this.ysjl.jianyanjieshuriqi = tempTime.getFullYear() + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
+ this.ysjl.createTime = tempTime
+ this.ysjl.createBy = this.$store.getters.nickname
+ this.dateFormat()
let xcjyrq = (tempTime.getFullYear() + 1) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
xcjyrq = new Date(xcjyrq)
this.ysjl.xiacijianyanriqi = xcjyrq
+ this.ysjl.jianyanyiju = '《压力管道安全技术监察规程—工业管道》(TSG D0001)《压力管道定期检验规则》(TSG D7005)质检特函[2013]61号'
this.ysjl.jianyanjielun = '符合要求'
this.ysjl.shejiriqi = ' 年 月'
this.param.yanshouriqi = ' 年 月'
this.param.touyongriqi = ' 年 月'
- this.getMaxBh()
+ this.getDepartmentCode()
} else {
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
+ this.getFbJyxm()
}
const jyxmtable = [1, 2, 3]
for (let i = 0; i < jyxmtable.length; i++) {
@@ -448,18 +500,68 @@ export default {
Utils.$emit('ysjl-list')
}
},
+ dateFormat() {
+ const year = new Date().getFullYear()
+ const month = new Date().getMonth() + 1 > 9 ? (new Date().getMonth() + 1).toString() : '0' + (new Date().getMonth() + 1)
+ const day = new Date().getDate() > 9 ? new Date().getDate().toString() : '0' + new Date().getDate()
+ this.$set(this.ysjl, 'jianyankaishiriqi', year + '-' + month + '-' + day)
+ this.$set(this.ysjl, 'jianyanjieshuriqi', year + '-' + month + '-' + day)
+ },
+ changeGlqkValue(row, col) {
+ const temp = new RegExp(row + '_')
+ let glqkFlag = true
+ for (let i = 0; i < this.glqkjyjg.length; i++) {
+ if (temp.test(this.glqkjyjg[i])) {
+ this.glqkjyjg[i] = row + '_' + col
+ this.glqkjyjg.splice(this.glqkjyjg.length - 1, 1)
+ glqkFlag = false
+ break
+ }
+ }
+ if (glqkFlag) {
+ this.glqkjyjg.splice(this.glqkjyjg.length, 0, row + '_' + col)
+ }
+ },
+ changeYxzkValue(row, col) {
+ const temp = new RegExp(row + '_')
+ let yxzkFlag = true
+ for (let i = 0; i < this.yxzkjyjg.length; i++) {
+ if (temp.test(this.yxzkjyjg[i])) {
+ this.yxzkjyjg[i] = row + '_' + col
+ this.yxzkjyjg.splice(this.yxzkjyjg.length - 1, 1)
+ yxzkFlag = false
+ break
+ }
+ }
+ if (yxzkFlag) {
+ this.yxzkjyjg.splice(this.yxzkjyjg.length, 0, row + '_' + col)
+ }
+ },
+ // 查询部门代码
+ getDepartmentCode() {
+ this.api({
+ url: '/department/gainCurrentDepartmentCode',
+ method: 'get',
+ params: {
+ depId: this.$route.query.ysjl.departmentId
+ }
+ }).then(data => {
+ this.jlbh5 = data
+ this.getMaxBh()
+ })
+ },
// 查询最大记录编号
getMaxBh() {
- const aheadPart = this.jlbh1 + this.jlbh2 + '-'
+ const aheadPart = this.jlbh1 + this.jlbh2 + this.jlbh3
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
- aheadPart: aheadPart,
- hinderPart: this.jlbh4
+ aheadPart: aheadPart + '-',
+ hinderPart: this.jlbh5
}
}).then(data => {
- this.jlbh3 = data
+ this.jlbh4 = data
})
},
// 查询检验项目
@@ -477,7 +579,7 @@ export default {
data = {
ysjlId: this.ysjl.id,
isReport: false,
- order: sort
+ order: sort - 1
}
}
this.api({
@@ -487,29 +589,130 @@ export default {
}).then(data => {
switch (sort) {
case 1:
- this.bgfyData = data
+ if (this.state === 'create') {
+ this.bgfyData = data
+ }
break
case 2:
this.glqkData = data
+ if (this.state === 'create') {
+ for (let i = 0; i < this.glqkData.length; i++) {
+ this.glqkData[i].jianyanjieguo = this.glqkData[i].jianyanjieguo === null ? '' : this.glqkData[i].jianyanjieguo.split(' □')
+ this.glqkData[i].jianyanjieguo[0] = this.glqkData[i].jianyanjieguo[0].replace('□', '')
+ }
+ } else {
+ for (let i = 0; i < this.glqkData.length; i++) {
+ const tempJg = this.glqkData[i].jianyanjieguo.split(';')
+ this.glqkData[i].jianyanjieguo = this.glqkData[i].jianyanjieguo === null ? '' : this.glqkData[i].jianyanjieguo.replace(/□/g, '').replace(/☑/g, '').split(';')
+ for (let j = 0; j < tempJg.length; j++) {
+ if (/☑/.test(tempJg[j])) {
+ this.glqkjyjg[i] = i + '_' + j
+ }
+ }
+ }
+ }
break
case 3:
this.yxzkData = data
+ if (this.state === 'create') {
+ for (let i = 0; i < this.yxzkData.length - 1; i++) {
+ this.yxzkData[i].jianyanjieguo = this.yxzkData[i].jianyanjieguo === null ? '' : this.yxzkData[i].jianyanjieguo.split(' □')
+ this.yxzkData[i].jianyanjieguo[0] = this.yxzkData[i].jianyanjieguo[0].replace('□', '')
+ }
+ } else {
+ for (let i = 0; i < this.yxzkData.length; i++) {
+ if (i === (this.yxzkData.length - 1)) {
+ this.yxzkData[i].jianyanjieguo = (this.yxzkData[i].jianyanjieguo === null || this.yxzkData[i].jianyanjieguo === '') ? '' : this.yxzkData[i].jianyanjieguo
+ } else {
+ const tempJg = this.yxzkData[i].jianyanjieguo.split(';')
+ this.yxzkData[i].jianyanjieguo = this.yxzkData[i].jianyanjieguo === null ? '' : this.yxzkData[i].jianyanjieguo.replace(/□/g, '').replace(/☑/g, '').split(';')
+ for (let j = 0; j < tempJg.length; j++) {
+ if (/☑/.test(tempJg[j])) {
+ this.yxzkjyjg[i] = i + '_' + j
+ }
+ }
+ }
+ }
+ }
break
}
this.tableJs.getData(this.cols, this.rows, data)
})
},
+ // 查询附页检验项目
+ getFbJyxm() {
+ let url = ''
+ let data = {}
+ url = '/jyxm/getCyJyxmByYsjl'
+ data = {
+ ysjlId: this.ysjl.id,
+ isReport: false,
+ order: 1
+ }
+ this.api({
+ url: url,
+ method: 'get',
+ params: data
+ }).then(data => {
+ this.bgfyData = data
+ this.tableJs.getData(this.cols, this.rows, this.bgfyData)
+ })
+ },
// 获取表格中的id, 不为空的检验结果和备注
getProp: function(data) {
- data.forEach((row) => {
- if (!row.jianyanjieguo) {
- row.jianyanjieguo = ''
+ const retData = []
+ for (let i = 0; i < data.length; i++) {
+ const retRow = {}
+ retRow.id = data[i].id
+ if (data[i].jianyanjieguo !== '' && data[i].jianyanjieguo !== null && data[i].jianyanjieguo !== undefined) {
+ retRow.jianyanjieguo = data[i].jianyanjieguo
}
- if (!row.beizhu) {
- row.beizhu = ''
+ if (data[i].beizhu !== '' && data[i].beizhu !== null && data[i].beizhu !== undefined) {
+ retRow.beizhu = data[i].beizhu
}
- })
- return data
+ retData.push(retRow)
+ }
+ return retData
+ },
+ mergeCols({ row, column, rowIndex }) {
+ // 遍历本行合并表
+ for (var j in row.cellRowSpans) {
+ var _c = row.cellRowSpans[j]
+ // 列属性匹配
+ if (_c.colProperty === column.property) {
+ // 若合并表指向本单元格则构建合并参数并返回
+ if (_c.rowIndex === rowIndex) {
+ return {
+ rowspan: _c.rowSpan,
+ colspan: _c.colSpan
+ }
+ } else {
+ return {
+ rowspan: 1,
+ colspan: 1
+ }
+ }
+ }
+ }
+ // 行间合并
+ for (var i in row.cellSpans) {
+ var _r = row.cellSpans[i]
+ // 列属性匹配
+ if (_r.colProperty === column.property) {
+ // 若合并表指向本单元格则构建合并参数并返回
+ if (_r.rowIndex === rowIndex) {
+ return {
+ rowspan: _r.rowSpan,
+ colspan: _r.colSpan
+ }
+ } else { // 否则隐藏该单元格。这里必须有,否则单元格会被右移一列
+ return {
+ rowspan: 0,
+ colspan: 0
+ }
+ }
+ }
+ }
},
toAddJyfa() {
this.jyfaDialogVisible = true
@@ -558,7 +761,7 @@ export default {
// 办结分项原始记录 status:0:取消办结,1:办结
bjYsjl(ysjlId, status) {
this.api({
- url: '/fx/endFx',
+ url: '/fenxiang/endFx',
method: 'get',
params: {
ysjlId: ysjlId,
@@ -571,7 +774,6 @@ export default {
} else if (status === '1') {
this.$message({ message: '办结成功', type: 'success' })
}
- this.$refs.jyfa.getJyfaInfo()
})
},
editChild(id, jianyanxiangmu, departmentId) {
@@ -581,18 +783,61 @@ export default {
saveYsjl: function(operation) {
this.tableData = []
this.tableData.push(this.getProp(this.bgfyData))
- this.tableData.push(this.glqkData)
+ const retData = []
+ for (let i = 0; i < this.glqkData.length; i++) {
+ // 把检验项数组转换成字符串
+ const retRow = {}
+ retRow.id = this.glqkData[i].id
+ retRow.jianyanjieguo = ''
+ for (let j = 0; j < this.glqkData[i].jianyanjieguo.length; j++) {
+ if (this.glqkjyjg[i] === i + '_' + j) {
+ retRow.jianyanjieguo += '☑' + this.glqkData[i].jianyanjieguo[j] + ';'
+ } else {
+ retRow.jianyanjieguo += '□' + this.glqkData[i].jianyanjieguo[j] + ';'
+ }
+ }
+ retRow.jianyanjieguo = retRow.jianyanjieguo.substr(0, retRow.jianyanjieguo.length - 1)
+ if (this.glqkData[i].beizhu !== '' && this.glqkData[i].beizhu !== null && this.glqkData[i].beizhu !== undefined) {
+ retRow.beizhu = this.glqkData[i].beizhu
+ }
+ retData.push(retRow)
+ }
+ this.tableData.push(retData)
+
// 工业管道运行状况检查表
- this.tableData.push(this.yxzkData)
- let type = ''
+ const retData2 = []
+ for (let i = 0; i < this.yxzkData.length; i++) {
+ // 把检验项数组转换成字符串
+ const retRow = {}
+ retRow.id = this.yxzkData[i].id
+ if (i !== (this.yxzkData.length - 1)) {
+ retRow.jianyanjieguo = ''
+ for (let j = 0; j < this.yxzkData[i].jianyanjieguo.length; j++) {
+ if (this.yxzkjyjg[i] === i + '_' + j) {
+ retRow.jianyanjieguo += '☑' + this.yxzkData[i].jianyanjieguo[j] + ';'
+ } else {
+ retRow.jianyanjieguo += '□' + this.yxzkData[i].jianyanjieguo[j] + ';'
+ }
+ }
+ retRow.jianyanjieguo = retRow.jianyanjieguo.substr(0, retRow.jianyanjieguo.length - 1)
+ } else {
+ retRow.jianyanjieguo = this.yxzkData[i].jianyanjieguo
+ }
+ if (this.yxzkData[i].beizhu !== '' && this.yxzkData[i].beizhu !== null && this.yxzkData[i].beizhu !== undefined) {
+ retRow.beizhu = this.yxzkData[i].beizhu
+ }
+ retData2.push(retRow)
+ }
+ this.tableData.push(retData2)
+ let url = ''
if (operation === 'add') {
- type = 'post'
- this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
+ url = '/ysjl/saveYsjl'
+ this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4 + this.jlbh5
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
- this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
+ this.ysjl.jigouhezhunzhenghao = 'TS7110433-2024'
this.ysjl.jlprintState = 0
- this.save(operation, type)
+ this.save(operation, url)
} else if (operation === 'build') {
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
@@ -614,35 +859,36 @@ export default {
this.$message.error('请先办结无损分项原始记录再生成报告!')
return false
} else {
- type = 'put'
- this.save(operation, type)
+ url = '/ysjl/updateYsjl'
+ this.save(operation, url)
}
})
} else if (operation === 'upd') {
- type = 'put'
- this.save(operation, type)
+ url = '/ysjl/updateYsjl'
+ this.save(operation, url)
}
},
- save(operation, type) {
+ save(operation, url) {
// 判断报告编号是否重复
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
+ } else if (this.common.judgeBianhao(this.ysjl.jilubianhao) === 0) {
+ this.$message({ message: '记录编号中包含中文,不符合编号规则', type: 'error' })
+ return false
} else {
- if (!this.ysjl.jilubianhao) {
- this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4
+ if (this.ysjl.jilubianhao === null || this.ysjl.jilubianhao === undefined || this.ysjl.jilubianhao === '') {
+ this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + this.jlbh3 + '-' + this.jlbh4 + this.jlbh5
}
this.$refs['ysjl'].validate(valid => {
if (valid) {
- const jyxm = JSON.stringify(this.tableData)
this.api({
- url: '/ysjl',
- method: type,
+ url: url,
+ method: 'post',
data: {
ysjl: this.ysjl,
param: this.param,
- jyxm: jyxm,
- bgjyxm: jyxm,
+ jyxm: JSON.stringify(this.tableData),
flag: operation
}
}).then(data => {
@@ -673,7 +919,7 @@ export default {
})
}
},
- judgeRepeat(bianhao, id) {
+ judgeRepeat: function(bianhao, id) {
this.api({
url: '/ysjl/judgeRepeat',
method: 'get',
diff --git a/src/views/ysjl/8000/nd/fenxiang/aqfj.vue b/src/views/ysjl/8000/nd/fenxiang/aqfj.vue
index 72d126f..5e98bfd 100644
--- a/src/views/ysjl/8000/nd/fenxiang/aqfj.vue
+++ b/src/views/ysjl/8000/nd/fenxiang/aqfj.vue
@@ -1,10 +1,23 @@
-
-
-
-
-
+
+
+
+
+ 保存
+
+
+ 更新
+
+
+ 办结
+
+
+ 取消办结
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 其他
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
+
+
+
+
+
-