|
@@ -5,6 +5,10 @@
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
+ <el-button class="el-button--small-yh add-customer-btn" type="primary"
|
|
|
+ @click.stop="editMainProject"
|
|
|
+ >{{this.id?"确认修改" :"确认新增"}}
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
@@ -53,6 +57,7 @@
|
|
|
type="text"
|
|
|
icon="el-icon-check"
|
|
|
size="small"
|
|
|
+ v-if="scope.row.status == 4"
|
|
|
@click.stop="beforeCloseAccount(scope.row,scope.index)"
|
|
|
>结 算
|
|
|
</el-button>
|
|
@@ -88,20 +93,24 @@
|
|
|
:close-on-click-modal="false"
|
|
|
:destroy-on-close="true"
|
|
|
:close-on-press-escape="false">
|
|
|
- <el-form v-model="accountFormData">
|
|
|
- <el-form-item label="账户名称:" class="landConFrom-input" prop="accountName">
|
|
|
- <el-input v-model="accountFormData.accountName" style="width: 200px;"></el-input>
|
|
|
+
|
|
|
+ <el-form :model="accountFormData" ref="accountFormData">
|
|
|
+ <el-form-item label="账户名称" class="landConFrom-input" prop="accountName" :rules="rules">
|
|
|
+ <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable placeholder="请输入" ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开户银行" class="landConFrom-input" prop="accountBank" :rules="rules">
|
|
|
+ <el-input v-model="accountFormData.accountBank" style="width: 220px;" size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="开户银行:" class="landConFrom-input" prop="accountBank">
|
|
|
- <el-input v-model="accountFormData.accountBank" style="width: 200px;"></el-input>
|
|
|
+ <el-form-item label="银行账号" class="landConFrom-input" prop="accountNo" :rules="rules">
|
|
|
+ <el-input v-model="accountFormData.accountNo" style="width: 220px;" size="small" clearable autocomplete="off" placeholder="请输入" ></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="银行账号:" class="landConFrom-input" prop="accountNo">
|
|
|
- <el-input v-model="accountFormData.accountNo" style="width: 200px;"></el-input>
|
|
|
+ <el-form-item label="结算日期" class="landConFrom-input" prop="payTime" :rules="rules">
|
|
|
+ <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss" size="small" clearable placeholder="日期" ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<span slot="footer" style="display: flex; justify-content: center">
|
|
|
<el-button @click.stop="accountDialog = false , accountFormData = {}" size="small">取 消</el-button>
|
|
|
- <el-button type="primary" size="small" @click="closeAccount">结算</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="closeAccount('accountFormData')">结算</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -110,9 +119,12 @@
|
|
|
<script>
|
|
|
import option from "./configuration/settleAccountsDetailsPage.json";
|
|
|
import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
|
|
|
- import { projectDetail,updateItemStatus } from "@/api/workManagement/mainProject";
|
|
|
+ import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
|
|
|
//业务字典
|
|
|
import { getDictionary } from "@/api/system/dictbiz";
|
|
|
+ //上传附件删除
|
|
|
+ import { corpsbank } from "@/api/basicData/configuration"
|
|
|
+
|
|
|
|
|
|
export default {
|
|
|
name: "customerInformation",
|
|
@@ -123,10 +135,13 @@
|
|
|
aaccount:{},
|
|
|
form: {},
|
|
|
accountFormData:{
|
|
|
- accountName:'',
|
|
|
- accountBank:'',
|
|
|
- accountNo:'',
|
|
|
},
|
|
|
+ rules:[{
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ],
|
|
|
option: option,
|
|
|
parentId:0,
|
|
|
account:{},
|
|
@@ -328,6 +343,9 @@
|
|
|
this.dataList = res.data.data.itemList;
|
|
|
this.loading = false;
|
|
|
}
|
|
|
+ if(res.data.data.filesList){
|
|
|
+ this.upLoadData = res.data.data.filesList
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -336,27 +354,33 @@
|
|
|
this.aaccount = row;
|
|
|
this.accountDialog = true;
|
|
|
},
|
|
|
- closeAccount(){
|
|
|
- this.$confirm("确认结算此明细?", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- updateItemStatus(this.aaccount.id,5,
|
|
|
- this.accountFormData.accountName,
|
|
|
- this.accountFormData.accountBank,
|
|
|
- this.accountFormData.accountNo,).then(res =>{
|
|
|
- if(res.data.success){
|
|
|
- this.$message({
|
|
|
- type: "success",
|
|
|
- message: "操作成功!"
|
|
|
- });
|
|
|
- this.accountFormData = {},
|
|
|
- this.accountDialog = false;
|
|
|
- this.getProjectDetail();
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
+ closeAccount(form){
|
|
|
+ this.$refs[form].validate((valid) => {
|
|
|
+ console.log(132)
|
|
|
+ if(valid){
|
|
|
+ this.$confirm("确认结算此明细?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ updateItemStatus(this.aaccount.id,5,
|
|
|
+ this.accountFormData.accountName,
|
|
|
+ this.accountFormData.accountBank,
|
|
|
+ this.accountFormData.accountNo,
|
|
|
+ this.accountFormData.payTime,).then(res =>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.accountFormData = {},
|
|
|
+ this.accountDialog = false;
|
|
|
+ this.getProjectDetail();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
//结算
|
|
|
callAccount(row,index){
|
|
@@ -384,6 +408,23 @@
|
|
|
query: {}
|
|
|
});
|
|
|
},
|
|
|
+ //新增 修改
|
|
|
+ editMainProject(){
|
|
|
+ const params = {
|
|
|
+ ...this.form,
|
|
|
+ itemList:this.dataList,
|
|
|
+ filesList:this.upLoadData
|
|
|
+ }
|
|
|
+ editMianProject(params).then(res =>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.getProjectDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
searchReset() {
|
|
|
console.log('1')
|
|
|
},
|
|
@@ -457,6 +498,11 @@
|
|
|
::v-deep .el-form-item {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
+ .add-customer-btn {
|
|
|
+ position: fixed;
|
|
|
+ right: 36px;
|
|
|
+ top: 115px;
|
|
|
+ }
|
|
|
.landConFrom-input{
|
|
|
display:flex;
|
|
|
justify-content:center;
|