-
+
-
+
起草报检单
-
+
新建报检单
-
+
打印回执单
-
+
异常收回
-
+
作废
@@ -27,12 +47,39 @@
-
-
-
+
+
+
-
-
+
+
查询
@@ -85,7 +132,10 @@
受理科室:
-
+
本科室
@@ -108,7 +158,7 @@
-
-
-
-
-
+
+
+
+
+
-
+
新建/预审
-
+
待审核
-
+
已审核
-
+
不予受理
-
+
补正通知
-
+
异常收回
-
+
异常退回
-
-
-
+
+
+
-
+
大厅报检
-
+
企业报检
-
+
微信报检
-
+
网页报检
-
-
+
+
-
-
+
+
diff --git a/src/views/bjd/dt_list.vue b/src/views/bjd/dt_list.vue
index 5efb8da..671548c 100644
--- a/src/views/bjd/dt_list.vue
+++ b/src/views/bjd/dt_list.vue
@@ -155,6 +155,7 @@
import Sticky from '@/components/Sticky'
import Pagination from '@/components/Pagination'
import store from '../../store'
+import qs from 'qs'
// import router from '../../router'
export default {
name: 'ProjectDtList',
@@ -252,35 +253,55 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
- this.$confirm('共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.apibjd({
- url: '/bjd/updBjdToZf',
- method: 'get',
- params: {
- bjdIds: this.multipleSelection.map(rw => {
- return rw.id
- }).join(',')
+ this.$prompt(
+ '请输入作废原因',
+ '共' +
+ this.multipleSelection.length +
+ '条报检项目将作废,是否继续?',
+ {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ inputPattern: /\S/,
+ inputErrorMessage: '作废原因不能为空'
+ }
+ )
+ .then(({ value }) => {
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ this.ids.push(this.multipleSelection[i].id)
}
- }).then(data => {
- this.$message({
- message: (data.bianhao !== null && data.bianhao !== undefined ? '流水号为' + data.bianhao + '的项目关联的任务已经分配不能作废!' : '') + (data.count === 0 ? '' : data.count + '条项目作废成功'),
- type: 'info'
+ this.apibjd({
+ url: '/bjd/updBjdToZf',
+ method: 'get',
+ params: { reason: value, bjdId: this.multipleSelection.map(rw => {
+ return rw.id
+ }) },
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { indices: false })
+ }
+ }).then((data) => {
+ this.$message({
+ message:
+ (data.bianhao !== null && data.bianhao !== undefined
+ ? '流水号为' +
+ data.bianhao +
+ '的项目关联的任务已经分配不能作废!'
+ : '') +
+ (data.count === 0 ? '' : data.count + '条项目作废成功'),
+ type: 'info'
+ })
+ this.getList()
})
- this.getList()
})
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消作废'
+ .catch(() => {
+ this.$message({
+ type: 'info',
+ message: '已取消作废'
+ })
})
- })
}
}
},
+
// 删除报检单---只有未审核的报检单才能删除
delBjd: function() {
this.ids = ''
@@ -358,39 +379,32 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false
}
- this.apibjd({
- url: '/bjd/printHzdBatch',
+ const arr = this.$refs.bjdList.selection.map((bjd) => {
+ return bjd.id
+ })
+ console.log(arr)
+ this.preview({
+ url: '/print/batchGeneratePdfHzd',
method: 'get',
params: {
- bjdIds: this.$refs.bjdList.selection.map(bjd => {
- return bjd.id
- }).join(',')
+ bjdIds: arr
+ },
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { indices: false })
}
- }).then(data => {
+ }).then((data) => {
this.preview({
- url: '/print/generatePdfListingBatch',
+ url: '/print/createXmlOther',
method: 'post',
- data: {
- list: data,
- viewType: 'HZD'
- }
- }).then(data => {
- if (data === 'success') {
- this.preview({
- url: '/print/createXmlOther',
- method: 'post',
- params: {
- ids: this.$refs.bjdList.selection.map(bjd => {
- return bjd.id
- }).join(','),
- type: 'HZD'
- }
- }).then(data => {
- this.printbutton = 'ReportPrintApp://' + data
- })
- } else {
- this.$message({ message: '未能成功调用打印程序!', type: 'error' })
+ params: {
+ ids: arr,
+ type: 'HZD'
+ },
+ paramsSerializer: function(params) {
+ return qs.stringify(params, { indices: false })
}
+ }).then((data) => {
+ this.printbutton = 'ReportPrintApp://' + data
})
})
},
@@ -423,26 +437,29 @@ export default {
})
},
viewHzd(bjdid) {
- this.apibjd({
- url: '/bjd/printHzd',
+ this.preview({
+ url: '/print/generatePdfHzd',
method: 'get',
params: {
- bjdIds: bjdid
+ bjdId: bjdid
+ }
+ }).then((data) => {
+ data = data.replace(/\\/g, '/')
+ if (data) {
+ this.$router.push({
+ path:
+ '/preview/hzd?src=' +
+ this.$store.getters.prodName +
+ '/static/web/viewer.html?file=' +
+ encodeURIComponent(data)
+ })
+ } else {
+ this.$message({
+ message: 'PDF预览错误!',
+ type: 'error',
+ duration: 3 * 1000
+ })
}
- }).then(data => {
- this.preview({
- url: '/print/generatePdfListing',
- method: 'post',
- data: {
- info: data.bjd,
- paramList: data.renwu,
- viewType: 'HZD'
- }
- }).then(data => {
- data = data.replace(/\\/g, '/')
- // router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() })
- window.open(data)
- })
})
},
errorBjd() {
@@ -466,18 +483,8 @@ export default {
method: 'get',
params: { bjdId: this.multipleSelection[0].id }
}).then(data => {
- if (data.success === 'ok') {
- this.$message({
- message: '异常收回成功!!请修改后重新审核通过!',
- type: 'success'
- })
- this.getList()
- } else {
- this.$message({
- message: '异常收回失败,存在已分配数据,请联系科室“异常退回”!',
- type: 'warning'
- })
- }
+ this.$message.success('异常收回成功!!请修改后重新审核通过!')
+ this.getList()
})
}).catch(() => {
this.$message({
diff --git a/src/views/bjd/jj_create.vue b/src/views/bjd/jj_create.vue
index bc3f125..fa0695b 100644
--- a/src/views/bjd/jj_create.vue
+++ b/src/views/bjd/jj_create.vue
@@ -146,7 +146,7 @@ export default {
params: this.listQuery
}).then(data => {
this.list = data.list
- this.totalCount = data.totalCount
+ this.totalCount = data.total
})
},
getSbzlList() {
diff --git a/src/views/bjd/jj_input.vue b/src/views/bjd/jj_input.vue
index db8977d..7e10c83 100644
--- a/src/views/bjd/jj_input.vue
+++ b/src/views/bjd/jj_input.vue
@@ -583,7 +583,7 @@