fix:协议管理bug修改
This commit is contained in:
parent
3024ae46e7
commit
9ae1c69f71
|
|
@ -181,7 +181,7 @@
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="合同编号" prop="contractCode">
|
<el-form-item label="合同编号" prop="contractCode">
|
||||||
<el-input maxlength="50" v-model="form.contractCode" placeholder="合同编号" />
|
<el-input maxlength="50" v-model="form.contractCode" placeholder="请输入合同编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -243,7 +243,7 @@
|
||||||
v-model="form.planStartTime"
|
v-model="form.planStartTime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="开始日期"
|
placeholder="请选择开始日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -268,7 +268,7 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="开始日期"
|
placeholder="请选择签订日期"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -298,7 +298,7 @@
|
||||||
<el-upload
|
<el-upload
|
||||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||||
action="#"
|
action="#"
|
||||||
:limit="5"
|
:limit="3"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
|
|
@ -334,13 +334,13 @@ import {
|
||||||
updateAgreement,
|
updateAgreement,
|
||||||
removeAgreement,
|
removeAgreement,
|
||||||
getUnitList,
|
getUnitList,
|
||||||
getProjectList
|
getProjectList,
|
||||||
} from "@/api/claimAndRefund/receive";
|
} from '@/api/claimAndRefund/receive'
|
||||||
import { imgUpLoad, fileUpLoad } from "@/api/system/upload";
|
import { imgUpLoad, fileUpLoad } from '@/api/system/upload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Agreement",
|
name: 'Agreement',
|
||||||
dicts: ["sys_normal_disable"],
|
dicts: ['sys_normal_disable'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -363,11 +363,11 @@ export default {
|
||||||
agreementList: [],
|
agreementList: [],
|
||||||
|
|
||||||
protocolList: [
|
protocolList: [
|
||||||
{ protocolId: 1, protocolName: "内部单位" },
|
{ protocolId: 1, protocolName: '内部单位' },
|
||||||
{ protocolId: 2, protocolName: "外部单位" }
|
{ protocolId: 2, protocolName: '外部单位' },
|
||||||
],
|
],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
|
|
@ -377,116 +377,116 @@ export default {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: undefined,
|
keyWord: undefined,
|
||||||
agreementCode: "",
|
agreementCode: '',
|
||||||
projectId: "",
|
projectId: '',
|
||||||
unitId: ""
|
unitId: '',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
//图片上传
|
//图片上传
|
||||||
uploadHeader: process.env.VUE_APP_BASE_API,
|
uploadHeader: process.env.VUE_APP_BASE_API,
|
||||||
imageUrl: "",
|
imageUrl: '',
|
||||||
imageName: "",
|
imageName: '',
|
||||||
fileList: [],
|
fileList: [],
|
||||||
checkUrlList: [],
|
checkUrlList: [],
|
||||||
checkUrlNameList: [],
|
checkUrlNameList: [],
|
||||||
dialogImageUrl: "",
|
dialogImageUrl: '',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
//上传地址
|
//上传地址
|
||||||
// uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
// uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||||
// uploadUrl:'http://112.29.103.165:21624/system',//线上服务器地址+system
|
// uploadUrl:'http://112.29.103.165:21624/system',//线上服务器地址+system
|
||||||
uploadUrl: process.env.VUE_APP_BASE_API + "/system", // 上传的图片服务器地址
|
uploadUrl: process.env.VUE_APP_BASE_API + '/system', // 上传的图片服务器地址
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
contractCode: [
|
contractCode: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "合同编号不能为空",
|
message: '合同编号不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
signTime: [
|
signTime: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "签订日期不能为空",
|
message: '签订日期不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
unitId: [
|
unitId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "往来单位不能为空",
|
message: '往来单位不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
projectId: [
|
projectId: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "工程名称不能为空",
|
message: '工程名称不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur',
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
peopleOpen: false,
|
peopleOpen: false,
|
||||||
noticeOpen: false,
|
noticeOpen: false,
|
||||||
nform: {
|
nform: {
|
||||||
notice: ""
|
notice: '',
|
||||||
},
|
},
|
||||||
nrules: {
|
nrules: {
|
||||||
notice: [
|
notice: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "通知内容不能为空",
|
message: '通知内容不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur',
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
deptName: undefined
|
],
|
||||||
};
|
},
|
||||||
|
deptName: undefined,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
//图片上传1张后,隐藏上传框
|
//图片上传1张后,隐藏上传框
|
||||||
uploadDisabled() {
|
uploadDisabled() {
|
||||||
return this.checkUrlList.length > 4;
|
return this.checkUrlList.length > 4
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.getUnitList();
|
this.getUnitList()
|
||||||
this.getProjectList();
|
this.getProjectList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取单位类型 ,getUnitList, getProjectList
|
//获取单位类型 ,getUnitList, getProjectList
|
||||||
getUnitList() {
|
getUnitList() {
|
||||||
getUnitList().then(response => {
|
getUnitList().then(response => {
|
||||||
this.unitList = response.data;
|
this.unitList = response.data
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
getProjectList() {
|
getProjectList() {
|
||||||
getProjectList().then(response => {
|
getProjectList().then(response => {
|
||||||
this.projectList = response.data;
|
this.projectList = response.data
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 查询字典类型列表 */
|
/** 查询字典类型列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getAgreementList(this.queryParams).then(response => {
|
getAgreementList(this.queryParams).then(response => {
|
||||||
this.agreementList = response.rows;
|
this.agreementList = response.rows
|
||||||
this.agreementList.forEach(item => {
|
this.agreementList.forEach(item => {
|
||||||
if (item.fileUrl) {
|
if (item.fileUrl) {
|
||||||
item.imgUrlList = item.fileUrl.split(",");
|
item.imgUrlList = item.fileUrl.split(',')
|
||||||
item.imgNameList = item.fileName.split(",");
|
item.imgNameList = item.fileName.split(',')
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.total = response.total;
|
this.total = response.total
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.reset();
|
this.reset()
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|
@ -496,189 +496,182 @@ export default {
|
||||||
dictType: undefined,
|
dictType: undefined,
|
||||||
fileUrl: undefined,
|
fileUrl: undefined,
|
||||||
fileName: undefined,
|
fileName: undefined,
|
||||||
status: "0",
|
status: '0',
|
||||||
remark: undefined
|
remark: undefined,
|
||||||
};
|
}
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
this.resetForm("form");
|
this.resetForm('form')
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.getList();
|
this.getList()
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
// this.dateRange = []
|
// this.dateRange = []
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm')
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1
|
||||||
this.queryParams.pageSize = 10;
|
this.queryParams.pageSize = 10
|
||||||
this.getList();
|
this.getList()
|
||||||
// this.handleQuery()
|
// this.handleQuery()
|
||||||
},
|
},
|
||||||
handleNotice() {
|
handleNotice() {
|
||||||
this.noticeOpen = true;
|
this.noticeOpen = true
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset()
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
this.checkUrlList = [];
|
this.checkUrlList = []
|
||||||
this.checkUrlNameList = [];
|
this.checkUrlNameList = []
|
||||||
this.open = true;
|
this.open = true
|
||||||
this.title = "新建";
|
this.title = '新建'
|
||||||
},
|
},
|
||||||
// 图片上传
|
// 图片上传
|
||||||
imgUpLoad(param, name, index) {
|
imgUpLoad(param, name, index) {
|
||||||
// console.log(param,'image')
|
// console.log(param,'image')
|
||||||
param.type = "ma";
|
param.type = 'ma'
|
||||||
imgUpLoad(param)
|
imgUpLoad(param)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.checkUrlList.push(res.data.fileUrl);
|
this.checkUrlList.push(res.data.fileUrl)
|
||||||
this.checkUrlNameList.push(res.data.fileName);
|
this.checkUrlNameList.push(res.data.fileName)
|
||||||
} else {
|
} else {
|
||||||
// this.$msgError(res.msg)
|
// this.$msgError(res.msg)
|
||||||
this.$modal.msgError(res.msg);
|
this.$modal.msgError(res.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
// this.$msgError(error)
|
// this.$msgError(error)
|
||||||
this.$modal.msgError(error);
|
this.$modal.msgError(error)
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleAvatarSuccess(res, file) {
|
handleAvatarSuccess(res, file) {
|
||||||
console.log("success");
|
console.log('success')
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
handleExceed(files, fileList) {
|
||||||
this.$message.warning("最多只可以上传五张图片");
|
this.$message.warning('最多只可以上传五张图片')
|
||||||
},
|
},
|
||||||
handleRemove(file, fileList) {
|
handleRemove(file, fileList) {
|
||||||
let sum = 0;
|
let sum = 0
|
||||||
this.checkUrlNameList.forEach((item, index) => {
|
this.checkUrlNameList.forEach((item, index) => {
|
||||||
if (item == file.name) {
|
if (item == file.name) {
|
||||||
sum = index;
|
sum = index
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.checkUrlNameList.splice(sum, 1);
|
this.checkUrlNameList.splice(sum, 1)
|
||||||
this.checkUrlList.splice(sum, 1);
|
this.checkUrlList.splice(sum, 1)
|
||||||
},
|
},
|
||||||
//图片点击查看
|
//图片点击查看
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
console.log(file);
|
console.log(file)
|
||||||
this.dialogImageUrl = file.url;
|
this.dialogImageUrl = file.url
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
//图片查看
|
//图片查看
|
||||||
openImg(url) {
|
openImg(url) {
|
||||||
this.dialogImageUrl = this.uploadUrl + url;
|
this.dialogImageUrl = this.uploadUrl + url
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.agreementId);
|
this.ids = selection.map(item => item.agreementId)
|
||||||
this.single = selection.length != 1;
|
this.single = selection.length != 1
|
||||||
this.multiple = !selection.length;
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset()
|
||||||
// const agreementId = row.agreementId
|
// const agreementId = row.agreementId
|
||||||
let param = {
|
let param = {
|
||||||
agreementId: row.agreementId
|
agreementId: row.agreementId,
|
||||||
};
|
|
||||||
getAgreementInfoId(param).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
if (response.data.leaseDay == null) {
|
|
||||||
this.form.leaseDay = undefined;
|
|
||||||
}
|
}
|
||||||
this.fileList = [];
|
getAgreementInfoId(param).then(response => {
|
||||||
this.checkUrlList = [];
|
this.form = response.data
|
||||||
this.checkUrlNameList = [];
|
if (response.data.leaseDay == null) {
|
||||||
if (
|
this.form.leaseDay = undefined
|
||||||
response.data &&
|
}
|
||||||
typeof response.data.fileUrl === "string" &&
|
this.fileList = []
|
||||||
typeof response.data.fileName === "string"
|
this.checkUrlList = []
|
||||||
) {
|
this.checkUrlNameList = []
|
||||||
|
if (response.data && typeof response.data.fileUrl === 'string' && typeof response.data.fileName === 'string') {
|
||||||
try {
|
try {
|
||||||
if(response.data.fileUrl!=''){
|
if (response.data.fileUrl != '') {
|
||||||
let [urlArr, nameArr] = [
|
let [urlArr, nameArr] = [response.data.fileUrl, response.data.fileName].map(str => str.split(','))
|
||||||
response.data.fileUrl,
|
|
||||||
response.data.fileName
|
|
||||||
].map(str => str.split(","));
|
|
||||||
|
|
||||||
if (urlArr.length !== nameArr.length) {
|
if (urlArr.length !== nameArr.length) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
console.log(urlArr)
|
console.log(urlArr)
|
||||||
let fileList = urlArr.map((url, i) => ({
|
let fileList = urlArr.map((url, i) => ({
|
||||||
name: nameArr[i],
|
name: nameArr[i],
|
||||||
url: `${this.uploadUrl}${url}`
|
url: `${this.uploadUrl}${url}`,
|
||||||
}));
|
}))
|
||||||
console.log(fileList)
|
console.log(fileList)
|
||||||
this.fileList = fileList;
|
this.fileList = fileList
|
||||||
this.checkUrlList = urlArr;
|
this.checkUrlList = urlArr
|
||||||
this.checkUrlNameList = nameArr;
|
this.checkUrlNameList = nameArr
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("处理合同照片时发生错误:", error);
|
console.error('处理合同照片时发生错误:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.open = true;
|
this.open = true
|
||||||
this.title = "编辑";
|
this.title = '编辑'
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm: function() {
|
submitForm: function() {
|
||||||
this.form.fileUrl = this.checkUrlList.join(",");
|
this.form.fileUrl = this.checkUrlList.join(',')
|
||||||
this.form.fileName = this.checkUrlNameList.join(",");
|
this.form.fileName = this.checkUrlNameList.join(',')
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.agreementId != undefined) {
|
if (this.form.agreementId != undefined) {
|
||||||
updateAgreement(this.form).then(response => {
|
updateAgreement(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess('修改成功')
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
addAgreement(this.form).then(response => {
|
addAgreement(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess('新增成功')
|
||||||
this.open = false;
|
this.open = false
|
||||||
this.getList();
|
this.getList()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
// const agreementId = row.agreementId;
|
// const agreementId = row.agreementId;
|
||||||
let param = {
|
let param = {
|
||||||
agreementId: row.agreementId + ""
|
agreementId: row.agreementId + '',
|
||||||
};
|
}
|
||||||
this.$modal
|
this.$modal
|
||||||
.confirm("是否确认删除该数据项?")
|
.confirm('是否确认删除该数据项?')
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return removeAgreement(param);
|
return removeAgreement(param)
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.getList();
|
this.getList()
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess('删除成功')
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {})
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download(
|
this.download(
|
||||||
"material/agreementInfo/export",
|
'material/agreementInfo/export',
|
||||||
{
|
{
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
},
|
},
|
||||||
`协议_${new Date().getTime()}.xlsx`
|
`协议_${new Date().getTime()}.xlsx`
|
||||||
);
|
)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep.el-table .fixed-width .el-button--mini {
|
::v-deep.el-table .fixed-width .el-button--mini {
|
||||||
|
|
|
||||||
|
|
@ -42,10 +42,10 @@ module.exports = {
|
||||||
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
|
||||||
// target: `https://z.csgmall.com.cn`,
|
// target: `https://z.csgmall.com.cn`,
|
||||||
|
|
||||||
target: `http://10.40.92.8:8080`, //超
|
// target: `http://10.40.92.8:8080`, //超
|
||||||
// target: `http://10.40.92.253:8080`,//韩
|
// target: `http://10.40.92.253:8080`,//韩
|
||||||
// target: `http://10.40.92.209:8080`,//川/
|
// target: `http://10.40.92.209:8080`,//川/
|
||||||
// target: `http://10.40.92.153:8080`, //帅
|
target: `http://10.40.92.153:8080`, //帅
|
||||||
// target: `http://10.40.92.14:8080`, //福
|
// target: `http://10.40.92.14:8080`, //福
|
||||||
|
|
||||||
//******** 注意事项 ********* */
|
//******** 注意事项 ********* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue