587cd4be by 蔡俊立

材料信息、材料导入

1 parent aaa673df
import request from '@/utils/request'
import SERVER from './config'
// 材料目录明细初始化
export function InitClml (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/InitClml',
method: 'post',
data
})
}
// 材料目录明细移动
export function moveClml (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/moveClml',
method: 'post',
data
})
}
// 材料目录明细保存
export function saveClml (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/saveClml',
method: 'post',
data
})
}
// 材料目录批量删除
export function deleteSjClml (params) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/deleteSjClml',
method: 'delete',
params: params
})
}
// 上传单个文件
export function uploadSjClmx (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/uploadSjClmx',
method: 'post',
data
})
}
// 删除上传文件
export function deleteClmx (bsmClmx) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/deleteClmx?bsmClmx=' + bsmClmx,
method: 'delete'
})
}
// 材料导入
export function uploadUndo (data) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/uploadUndo',
method: 'post',
data
})
}
......@@ -3,18 +3,3 @@ import SERVER from './config'
export function uploadUrl () {
return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload'
}
// 上传单个文件
export function sjClmxUpload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload',
method: 'post',
data
})
}
// 删除上传文件
export function sjClmxDelete (bsmClmx) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx,
method: 'delete'
})
}
\ No newline at end of file
......
......@@ -32,41 +32,6 @@ export function leftMenu (data) {
data
})
}
// 材料目录明细初始化
export function clmlInit (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/clml/Init',
method: 'post',
data
})
}
// 材料目录明细移动
export function move (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/clml/move',
method: 'post',
data
})
}
// 材料目录明细保存
export function save (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/clml/save',
method: 'post',
data
})
}
// 材料目录批量删除
export function clmlDelete (params) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/clml/delete',
method: 'delete',
params: params
})
}
// 获取下一环节信息
export function getNextLinkInfo (params) {
......
......@@ -57,18 +57,3 @@ export function getWorkFlowImage (bsmSlsq, bestepid) {
}
})
}
// 上传单个文件
export function sjClmxUpload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload',
method: 'post',
data
})
}
// 删除上传文件
export function sjClmxDelete (bsmClmx) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx,
method: 'delete'
})
}
\ No newline at end of file
......
......@@ -53,18 +53,3 @@ export function getWorkFlowImage (bsmSlsq, bestepid) {
}
})
}
// 上传单个文件
export function sjClmxUpload (data) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload',
method: 'post',
data
})
}
// 删除上传文件
export function sjClmxDelete (bsmClmx) {
return request({
url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx,
method: 'delete'
})
}
\ No newline at end of file
......
......@@ -37,7 +37,7 @@
</template>
<script>
import PhotoZoom from '@/components/PhotoZoom'
import { sjClmxUpload, sjClmxDelete } from '@/api/workflow/jsydsyqFlow'
import { uploadSjClmx, deleteClmx } from "@/api/clxx.js";
import publicPicture from '@/components/publicPicture/index.vue'
export default {
name: 'PreviewImage',
......@@ -135,7 +135,7 @@ export default {
formdata.append("file", file.raw);
formdata.append("bsmSj", this.previewImg.bsmSj);
formdata.append("bsmSlsq", this.previewImg.bsmSlsq);
sjClmxUpload(formdata).then((res) => {
uploadSjClmx(formdata).then((res) => {
if (res.code == 200) {
this.$emit('updateList', res.result)
this.$message({
......@@ -153,7 +153,7 @@ export default {
type: 'warning'
}).then(async () => {
let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx
sjClmxDelete(bsmClmx).then(res => {
deleteClmx(bsmClmx).then(res => {
if (res.code == 200) {
that.$emit('updateList', res.result)
that.$message({
......
......@@ -39,7 +39,7 @@
import { mapGetters } from "vuex";
import clxxAddDialog from "./clxxAddDialog.vue";
import imagePreview from '@/views/components/imagePreview.vue'
import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js";
import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js";
export default {
components: { clxxAddDialog, imagePreview },
data () {
......@@ -238,7 +238,7 @@ export default {
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", this.$parent.bsmSlsq);
clmlInit(formdata).then((res) => {
InitClml(formdata).then((res) => {
if(res.result.code == 200){
resolve(res.code)
if (res.result.result && res.result.result.length > 0) {
......@@ -296,7 +296,7 @@ export default {
moveDirection: "UP",
};
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -316,7 +316,7 @@ export default {
moveDirection: "DOWN",
}
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -340,7 +340,7 @@ export default {
sjlx: data.cllx,
sfxjcl: "1", // 是否必选
};
save(obj).then(async (res) => {
saveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -358,7 +358,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
clmlDelete({ sjBsm: row.bsmSj }).then(async (res) => {
deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => {
if (res.code == 200) {
let res = await that.clmlInitList()
if (res == 200) that.$message({
......
......@@ -14,7 +14,7 @@
</template>
<script>
import { mapGetters } from "vuex";
import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js";
import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js";
export default {
components: { },
props: {
......@@ -187,7 +187,7 @@ export default {
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
clmlInit(formdata).then((res) => {
InitClml(formdata).then((res) => {
if(res.code == 200){
resolve(res.code)
if(res.result && res.result.length > 0){
......@@ -209,7 +209,7 @@ export default {
moveDirection: "UP",
};
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) {
......@@ -232,7 +232,7 @@ export default {
moveDirection: "DOWN",
}
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) {
......@@ -255,7 +255,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
clmlDelete({ sjBsm: row.bsmSj }).then(async (res) => {
deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => {
if (res.code == 200) {
let res = await that.clmlInitList()
if (res == 200) {
......
......@@ -32,7 +32,7 @@ import { mapGetters } from "vuex";
import clxxAddDialog from "./clxxAddDialog.vue";
import clxxDetailDialog from "./clxxDetailDialog.vue";
import imagePreview from '@/views/components/imagePreview.vue'
import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js";
import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js";
import { popupDialog } from "@/utils/popup.js";
export default {
components: { clxxAddDialog, imagePreview,clxxDetailDialog },
......@@ -90,7 +90,7 @@ export default {
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", this.$parent.bsmSlsq);
clmlInit(formdata).then((res) => {
InitClml(formdata).then((res) => {
if(res.code == 200){
resolve(res.code)
if (res.result && res.result.length > 0) {
......@@ -155,7 +155,7 @@ export default {
sjlx: data.cllx,
sfxjcl: "1", // 是否必选
};
save(obj).then(async (res) => {
saveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList(2)
if (res == 200) this.$message({
......
......@@ -2,6 +2,7 @@ import { getWorkFlowImage } from "@/api/workflow/jsydsyqFlow.js";
import { popupDialog } from "@/utils/popup.js";
import { getPrintTemplateByCode } from "@/api/system";
import { getPrintApplicationInfo } from "@/api/fqsq";
import { uploadUndo } from "@/api/clxx";
import { getLodop } from "@/utils/LodopFuncs"
import {
leftMenu,
......@@ -125,6 +126,9 @@ export default {
this.tabList.splice(this.clxxIndex, 0, this.clxxTab);
}
break;
case "B3": //材料导入
document.getElementById("cldr").click();
break;
case "B4":
popupDialog("登记簿详情", "registerBook/djbFrame", this.currentSelectProps, '80%')
break;
......@@ -323,6 +327,23 @@ export default {
that.loadBdcdylist();
}
})
},
},
handleChange (file) {
var formdata = new FormData();
formdata.append("file", file.raw);
formdata.append("bsmSldy", this.currentSelectProps.bsmSldy);
formdata.append("bsmSlsq", this.bsmSlsq);
uploadUndo(formdata).then(res => {
if(res.code == 200){
this.$message.success("导入成功");
}else{
this.$message.error(res.message)
}
})
},
// 上传
beforeUpload (file) {
return true;
},
}
}
......
......@@ -72,6 +72,10 @@
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" v-show="false">
<embed id="LODOP_EM" type="application/x-print-lodop" width=820 height=450 pluginspage="install_lodop32.exe"/>
</object>
<el-upload class="fileUpdate" action="" :show-file-list="false" multiple :auto-upload="false"
:on-change="handleChange" :before-upload="beforeUpload">
<el-button id="cldr" icon="el-icon-upload" type="primary" v-show="false">上传</el-button>
</el-upload>
<fqsqDialog v-model="isDialog" :djywbm="$route.query.sqywbm" :isJump="true" @updateDialog="updateDialog" />
</div>
</template>
......
......@@ -39,7 +39,7 @@
import { mapGetters } from "vuex";
import clxxAddDialog from "./clxxAddDialog.vue";
import imagePreview from '@/views/components/imagePreview.vue'
import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js";
import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js";
export default {
components: { clxxAddDialog, imagePreview },
data () {
......@@ -259,7 +259,7 @@ export default {
moveDirection: "UP",
};
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -279,7 +279,7 @@ export default {
moveDirection: "DOWN",
}
// 接口待调
move(obj).then(async (res) => {
moveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -303,7 +303,7 @@ export default {
sjlx: data.cllx,
sfxjcl: "1", // 是否必选
};
save(obj).then(async (res) => {
saveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList()
if (res == 200) this.$message({
......@@ -321,7 +321,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
clmlDelete({ sjBsm: row.bsmSj }).then(async (res) => {
deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => {
if (res.code == 200) {
let res = await that.clmlInitList()
if (res == 200) that.$message({
......