1d6b5418 by renchao@pashanhoo.com

style:材料信息

1 parent 3edaaf1d
/*
* @Description: 材料信息
* @Autor: renchao
* @LastEditTime: 2023-09-13 15:39:37
* @LastEditTime: 2023-09-13 15:56:03
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
......@@ -49,9 +49,9 @@ export function saveClml (data) {
* @param {*} data
* @author: renchao
*/
export function updateClml (data, bsmSldy) {
export function updateClml (data, bsmSldy, bsmSlsq) {
return request({
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/updateClml/' + bsmSldy,
url: SERVER.SERVERAPI + '/rest/ywbl/clxx/updateClml/' + bsmSldy + '/' + bsmSlsq,
method: 'post',
data
})
......
/*
* @Description: 企业银行接口
* @Autor: renchao
* @LastEditTime: 2023-09-12 08:35:25
* @LastEditTime: 2023-09-13 17:08:10
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
......@@ -11,7 +11,6 @@ let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('Ap
* @description: 获取材料目录
* @author: renchao
*/
export function getCompanyMaterialList (bsmCompany) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/company/getCompanyMaterialList',
......@@ -97,4 +96,16 @@ export function move (bsmFile, direction) {
direction: direction
}
})
}
/**
* @description: 编辑材料目录
* @param {*} data
* @author: renchao
*/
export function editCompanyMaterialList (data, bsmCompany) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/company/editCompanyMaterialList/' + bsmCompany,
method: 'post',
data
})
}
\ No newline at end of file
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-13 13:48:47
* @LastEditTime: 2023-09-13 15:58:06
-->
<template>
<div class="clmlmx-box">
......@@ -182,7 +182,7 @@
handleSubmit () {
this.loading = true
store.dispatch('user/reWorkFresh', false)
updateClml(this.tableData, this.formData.bsmSldy).then(res => {
updateClml(this.tableData, this.formData.bsmSldy, Vue.prototype.$currentRoute.query.bsmSlsq).then(res => {
this.loading = false
if (res.code == 200) {
this.$message({
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-18 14:26:54
* @LastEditTime: 2023-09-13 16:16:08
-->
<template>
<canvas id="mxcad">
</canvas>
<div>
<canvas id="mxcad" style="width:100%;height:100%">
</canvas>
</div>
</template>
<script>
import Mx from "mxdraw"
......@@ -31,7 +33,7 @@
console.log(listLayer)
})
},
isNewFile: true // 是否新建文件
isNewFile: false // 是否新建文件
})
})
}
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-13 13:46:03
* @LastEditTime: 2023-09-13 17:08:53
-->
<template>
<div class="clmlmx-box">
......@@ -15,10 +15,10 @@
</div>
</template>
<script>
import Vue from 'vue'
import store from '@/store/index.js'
import Sortable from 'sortablejs'
import { ywPopupCacel } from "@/utils/popup.js";
import { InitClml, updateClml, deleteSjClml, moveClml } from "@/api/clxx.js";
import { editCompanyMaterialList } from "@/api/company.js";
export default {
props: {
formData: {
......@@ -58,7 +58,8 @@
label: "材料名称",
render: (h, scope) => {
return (
<el-input value={scope.row.clmc} onInput={(val) => { scope.row.clmc = val }}></el-input>
(scope.row.sfxjcl == '1') ?
<el-input value={scope.row.clmc} onInput={(val) => { scope.row.clmc = val }}></el-input> : <span>{scope.row.clmc}</span>
)
}
},
......@@ -81,24 +82,6 @@
}
},
{
label: "份数",
width: "50",
render: (h, scope) => {
return (
<el-input value={scope.row.sjsl} onInput={(val) => { scope.row.sjsl = val }}></el-input>
)
}
},
{
label: "扫描时间",
width: "140",
render: (h, scope) => {
return (
<span>{scope.row.sjsj}</span>
)
}
},
{
label: "页数",
width: "80",
render: (h, scope) => {
......@@ -157,6 +140,8 @@
},
mounted () {
this.initSort()
this.tableData = _.cloneDeep(this.formData.data)
console.log(this.formData.bsmCompany);
},
beforeDestroy () {
if (this.sortable) {
......@@ -176,26 +161,17 @@
handleCancel () {
ywPopupCacel()
},
handleAdd () {
this.tableData.push({
clmc: '',
cllx: '1',
sjsl: '',
smzt: '',
count: 0
})
},
handleSubmit () {
this.loading = true
store.dispatch('user/reWorkFresh', false)
updateClml(this.tableData).then(res => {
editCompanyMaterialList(this.tableData, this.formData.bsmCompany).then(res => {
this.loading = false
if (res.code == 200) {
this.$message({
message: '保存成功',
type: 'success'
})
this.$popupCacel()
ywPopupCacel()
store.dispatch('user/reWorkFresh', true)
}
}).catch(() => {
......@@ -203,29 +179,6 @@
})
},
/**
* @description: 材料目录明细初始化
* @author: renchao
*/
clmlInitList () {
return new Promise(resolve => {
this.unitData = this.$parent.unitData;
var formdata = new FormData();
formdata.append("bsmSlsq", Vue.prototype.$currentRoute.query.bsmSlsq);
InitClml(formdata).then((res) => {
if (res.code == 200) {
resolve(res.code)
if (res.result && res.result.length > 0) {
this.tableData = res.result;
} else {
this.tableData = []
}
} else {
this.$message.error(res.message)
}
})
})
},
/**
* @description: 材料目录删除
* @param {*} index
* @param {*} row
......@@ -238,17 +191,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => {
if (res.code == 200) {
let res = await that.clmlInitList()
if (res == 200) {
that.$message({
message: "删除成功",
type: "success"
})
}
}
})
this.tableData.splice(index, 1);
}).catch(() => {
this.$message({
type: 'info',
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-11 13:52:42
* @LastEditTime: 2023-09-13 17:05:49
-->
<template>
<div class="clxx">
......@@ -91,7 +91,7 @@
}
},
created () {
this.clmlInitList();
this.clmlInitList()
},
methods: {
/**
......@@ -274,6 +274,7 @@
store.dispatch("user/reWorkFresh", false);
ywPopupDialog("申请材料目录", "xxba/components/clxx/dialog/clxxDetailDialog", {
data: this.tableData,
bsmCompany: this.formData.bsmCompany
}, "60%", true, false)
},
//设置tableData
......