diff --git a/src/api/sedirectory.js b/src/api/sedirectory.js
new file mode 100644
index 0000000..a3efee0
--- /dev/null
+++ b/src/api/sedirectory.js
@@ -0,0 +1,11 @@
+import api from '@/utils/api'
+
+export function getList(params) {
+ return api({
+ url: '/sedirectory/getList',
+ method: 'get',
+ params
+ })
+}
+
+export default { getList }
diff --git a/src/service/sedirectoryService.js b/src/service/sedirectoryService.js
new file mode 100644
index 0000000..6da4059
--- /dev/null
+++ b/src/service/sedirectoryService.js
@@ -0,0 +1,11 @@
+import sedirectory from '@/api/sedirectory'
+
+export default {
+ /**
+ * 获取设备目录
+ * @param params
+ */
+ getList(params) {
+ return sedirectory.getList(params)
+ }
+}
diff --git a/src/views/ysjl/3000/common/index.vue b/src/views/ysjl/3000/common/index.vue
index 63041b8..a47e749 100644
--- a/src/views/ysjl/3000/common/index.vue
+++ b/src/views/ysjl/3000/common/index.vue
@@ -83,31 +83,39 @@
-
+
-
-
+
+
+
+
@@ -847,7 +855,8 @@ export default {
ysjlId: this.$route.query.id,
checkedTab: 'first',
userList: [],
- xinghaoList: [],
+ sblbList: [],
+ sbpzList: [],
jybgData: [],
cols: [
{
@@ -968,21 +977,29 @@ export default {
this.jlbh2 = '(C)'
}
this.getJyxm(1)
- this.getSbList()
+ this.getSbList(undefined, 2)
+ this.getSbList(this.ysjl.shebeileibiedaima, 3)
this.getMaxBh()
})
},
- getSbList() {
- this.api({
- url: '/sedirectory/getList',
- method: 'get',
- params: {
- sbzl: this.$route.query.sbzldm,
- sblb: this.$route.query.sblbdm,
- level: 2
- }
+ getSbList(sblb, level) {
+ return this.sedirectoryService.getList({
+ sbzl: '3000',
+ sblb: sblb,
+ level: level
}).then((data) => {
- this.xinghaoList = data
+ switch (level) {
+ case 2:
+ this.sblbList = data
+ break
+ case 3:
+ this.sbpzList = data
+ this.ysjl.shebeipinzhong = this.sbpzList[0].label
+ this.ysjl.shebeipinzhongdaima = this.sbpzList[0].value
+ break
+ default:
+ break
+ }
})
},
getJyxmInfoByYsjl() {
@@ -1024,6 +1041,8 @@ export default {
this.isRepeat = data
})
this.getJyxm(1)
+ this.getSbList(undefined, 2)
+ this.getSbList(this.ysjl.shebeileibiedaima, 3)
})
},
getParam() {
@@ -1312,8 +1331,18 @@ export default {
}
})
},
- changXh: function(val) {
- // TODO
+ changeSblb(val) {
+ this.ysjl.shebeileibiedaima = val
+ this.ysjl.shebeileibie = this.sblbList.filter(row => row.value === val)[0].label
+ this.getSbList(this.ysjl.shebeileibiedaima, 3)
+ .then(() => {
+ this.shebeipinzhongdaima = this.sbpzList[0].value
+ this.shebeipinzhong = this.sbpzList[0].label
+ })
+ },
+ changeSbpz(val) {
+ this.ysjl.shebeipinzhongdaima = val
+ this.ysjl.shebeipinzhong = this.sbpzList.filter(row => row.value === val)[0].label
},
loadPhxsImage(data) {
this.pic = data
diff --git a/src/views/zjd/zjbg_list.vue b/src/views/zjd/zjbg_list.vue
index a3edb62..e2dae12 100644
--- a/src/views/zjd/zjbg_list.vue
+++ b/src/views/zjd/zjbg_list.vue
@@ -95,9 +95,9 @@
-
-
-
+
+
+
@@ -271,10 +271,6 @@ export default {
})
},
revokeZjd() {
- if (this.multipleSelection.length !== 1) {
- this.$message({ message: '请选中单条数据进行操作。', type: 'warning' })
- return false
- }
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].state) {
this.$message({ message: '存在已确认的转交单,请勿重新操作。', type: 'warning' })
@@ -283,17 +279,15 @@ export default {
}
// 撤销操作
this.api({
- url: '/zjd/revokeZjd',
- method: 'get',
- params: {
- zjdId: this.multipleSelection[0].id
+ url: '/zjd/revoke',
+ method: 'post',
+ data: {
+ zjdIds: this.multipleSelection.map(row => row.id)
+ },
+ paramsSerializer: function(data) {
+ return require('qs').stringify(data, { indices: false })
}
}).then(data => {
- if (data.returnCode === undefined) {
- this.$message({ message: data, type: 'success' })
- } else {
- this.$message({ message: data.returnMsg, type: 'warning' })
- }
this.getList()
})
},
@@ -343,26 +337,15 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false
}
- this.api({
- url: '/zjd/printZjdBatch',
+ this.preview({
+ url: '/print/generatePdfZjd',
method: 'get',
params: {
- zjdIds: this.$refs.list.selection.map(zjd => {
- return zjd.id
- }).join(',')
+ zjdId: this.$refs.list.selection[0].id
}
}).then(data => {
- this.preview({
- url: '/print/generatePdfView',
- method: 'post',
- data: {
- list: data,
- viewType: 'ZJD'
- }
- }).then(data => {
- data = data.replace(/\\/g, '/')
- window.open(data)
- })
+ data = data.replace(/\\/g, '/')
+ window.open(data)
})
}
}