|
@@ -28,7 +28,7 @@
|
|
|
<template slot="append">元</template>
|
|
|
</el-input>
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" :disabled="item.disabled?true:false" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
- <el-input type="textarea" v-else-if="(item.prop === 'remark'||item.prop === 'settlementRemark')"v-model="form[item.prop]" :disabled="item.disabled && item.prop === 'remark'?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
+ <el-input type="textarea" v-else-if="(item.prop === 'remark'||item.prop === 'settlementRemark')" v-model="form[item.prop]" :disabled="item.disabled && item.prop === 'remark'?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
<el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?true:false" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -47,38 +47,48 @@
|
|
|
@selection-change="selectionChange"
|
|
|
@current-change="currentChange"
|
|
|
@size-change="sizeChange"
|
|
|
+ @row-update="rowUpdate"
|
|
|
@refresh-change="refreshChange">
|
|
|
<template slot="menuLeft">
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="原始数据" name="first" :key="'first'">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="追加" name="second" :key="'second'">
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="退款" name="three" :key="'three'">
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </template>
|
|
|
+ <template slot="menuRight">
|
|
|
<el-button
|
|
|
- icon="el-icon-printer"
|
|
|
- size="small"
|
|
|
type="primary"
|
|
|
- @click.stop="openReport()"
|
|
|
- >报表
|
|
|
+ size="small"
|
|
|
+ v-if="secondDisable == 1 || secondDisable == 2 "
|
|
|
+ @click.stop="serviceDialog = true"
|
|
|
+ >录入明细
|
|
|
</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
<el-button
|
|
|
- icon="el-icon-printer"
|
|
|
+ type="text"
|
|
|
size="small"
|
|
|
- type="primary"
|
|
|
- :disabled="selectList.length == 0"
|
|
|
- @click.stop="costAdd()"
|
|
|
- >追加代垫费
|
|
|
+ v-if="secondDisable == 1 || secondDisable == 2 "
|
|
|
+ @click="rowCell(scope.row,scope.index)"
|
|
|
+ >{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
- icon="el-icon-printer"
|
|
|
+ type="text"
|
|
|
size="small"
|
|
|
- type="primary"
|
|
|
- :disabled="selectList.length == 0"
|
|
|
- @click.stop="costReturn()"
|
|
|
- >退费
|
|
|
+ v-if="secondDisable == 1 || secondDisable == 2 "
|
|
|
+ @click="rowDel(scope.row,scope.index)"
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
- </template>
|
|
|
- <template slot-scope="scope" slot="menu">
|
|
|
<el-button
|
|
|
type="text"
|
|
|
icon="el-icon-check"
|
|
|
size="small"
|
|
|
- v-if="scope.row.status == 4"
|
|
|
+ :disabled="!scope.row.id"
|
|
|
+ v-if="scope.row.status == 4 || secondDisable == 1 || secondDisable == 2 "
|
|
|
@click.stop="beforeCloseAccount(scope.row,scope.index)"
|
|
|
>结 算
|
|
|
</el-button>
|
|
@@ -91,6 +101,74 @@
|
|
|
>取消结算
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+ <template slot="userid" slot-scope="{row,index}">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
+ <user-select
|
|
|
+ style="width:90% !important;"
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.userName"
|
|
|
+ @value="(values) => value(values,row)"
|
|
|
+ :configuration="UConfiguration"
|
|
|
+ >
|
|
|
+ </user-select>
|
|
|
+ <span v-else>{{ row.userName }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="amount" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.amount"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.amount }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="serviceCharge" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.serviceCharge"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ @input="costCount(row)"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.serviceCharge }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="matMoney" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.matMoney"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ @input="costCount(row)"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.matMoney }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="costReturn" slot-scope="{ row }">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ style="width:90% !important;"
|
|
|
+ v-model="row.costReturn"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.costReturn }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="superaddition" slot-scope="{ row }">
|
|
|
+ <span v-if="row.$cellEdit" class="required_fields">*</span>
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ style="width: 90%"
|
|
|
+ v-model="row.superaddition"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.superaddition }}</span>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<containerTitle title="附件上传"></containerTitle>
|
|
@@ -106,6 +184,21 @@
|
|
|
</basic-container>
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
+ title="导入服务项目"
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="serviceDialog"
|
|
|
+ width="70%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false">
|
|
|
+ <service-component
|
|
|
+ @serviceConfirm="serviceConfirm"
|
|
|
+ @choce="choce"
|
|
|
+ >
|
|
|
+ </service-component>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
title="结算"
|
|
|
append-to-body
|
|
|
class="el-dialogDeep"
|
|
@@ -133,12 +226,16 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/settleAccountsDetailsPage.json";
|
|
|
+ import optionAdd from "./configuration/settleAccountsDetailsADD.json";
|
|
|
+ import optionReturn from "./configuration/settleAccountsDetailsReturn.json";
|
|
|
import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
|
|
|
import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
|
|
|
//业务字典
|
|
|
import { getDictionary } from "@/api/system/dictbiz";
|
|
|
//上传附件删除
|
|
|
import { corpsbank } from "@/api/basicData/configuration"
|
|
|
+ import serviceComponent from "@/components/mainProject/index"
|
|
|
+ import _ from "lodash";
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -148,10 +245,19 @@
|
|
|
type: Object
|
|
|
}
|
|
|
},
|
|
|
+ components:{
|
|
|
+ serviceComponent
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
loading:false,
|
|
|
accountDialog:false,
|
|
|
+ serviceDialog:false,
|
|
|
+ activeName: "first",
|
|
|
+ tab1:true,
|
|
|
+ tab2:false,
|
|
|
+ tab3:false,
|
|
|
+ secondDisable:0,
|
|
|
aaccount:{},
|
|
|
form: {},
|
|
|
accountFormData:{
|
|
@@ -162,11 +268,21 @@
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
],
|
|
|
+ UConfiguration:{
|
|
|
+ multipleChoices:false,
|
|
|
+ multiple:false,
|
|
|
+ disabled:false,
|
|
|
+ searchShow:true,
|
|
|
+ collapseTags:false,
|
|
|
+ placeholder:'请点击右边按钮选择',
|
|
|
+ dicData:[]
|
|
|
+ },
|
|
|
option: option,
|
|
|
parentId:0,
|
|
|
account:{},
|
|
|
paymentTerm:[],
|
|
|
selectList:[],
|
|
|
+
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
pagerCount: 5,
|
|
@@ -330,14 +446,6 @@
|
|
|
type:'datetime',
|
|
|
},
|
|
|
{
|
|
|
- label: '追加代垫费',
|
|
|
- prop: 'superaddition',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '退费',
|
|
|
- prop: 'costReturn',
|
|
|
- },
|
|
|
- {
|
|
|
label: '备注',
|
|
|
span: 24,
|
|
|
prop: 'remark',
|
|
@@ -351,8 +459,11 @@
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
- //列表假数据
|
|
|
- dataList : [],
|
|
|
+ dataList: [],
|
|
|
+ allDataList:[],
|
|
|
+ data_one:[],
|
|
|
+ data_two:[],
|
|
|
+ data_three:[],
|
|
|
//上传文件
|
|
|
upLoadOption: upLoadOption,
|
|
|
upLoadData:[],
|
|
@@ -360,7 +471,7 @@
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.id = BigInt(this.detailData.id);
|
|
|
+ this.id = this.detailData.id;
|
|
|
this.getProjectDetail();
|
|
|
const params = {
|
|
|
code : "affair_payment_term"
|
|
@@ -373,24 +484,89 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
- //追加代垫费
|
|
|
- costAdd(){
|
|
|
- this.selectList.forEach(item =>{
|
|
|
-
|
|
|
- })
|
|
|
+ value(value,row){
|
|
|
+ row.userid = value.id
|
|
|
+ row.deptid = value.deptId
|
|
|
},
|
|
|
- //退费
|
|
|
- costReturn(){
|
|
|
+ costCount(row){
|
|
|
+ if(row.serviceCharge && row.matMoney){
|
|
|
+ row.amount = _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney));
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClick(tab) {
|
|
|
+ if(tab.name == "first") {
|
|
|
+ this.tab1 = true;
|
|
|
+ this.tab2 = false;
|
|
|
+ this.tab3 = false;
|
|
|
+
|
|
|
+ if(this.secondDisable == 1){
|
|
|
+ this.data_two = this.dataList
|
|
|
+ }
|
|
|
+ if(this.secondDisable == 2){
|
|
|
+ this.data_three = this.dataList
|
|
|
+ }
|
|
|
+
|
|
|
+ this.secondDisable = 0
|
|
|
+ this.option = option //换option
|
|
|
+ this.dataList = this.data_one //切换数据
|
|
|
+ } else if(tab.name == "second") {
|
|
|
+ this.tab1 = false;
|
|
|
+ this.tab2 = true;
|
|
|
+ this.tab3 = false;
|
|
|
+
|
|
|
+ if(this.secondDisable == 0){
|
|
|
+ this.data_one = this.dataList
|
|
|
+ }
|
|
|
+ if(this.secondDisable == 2){
|
|
|
+ this.data_three = this.dataList
|
|
|
+ }
|
|
|
|
|
|
+ this.secondDisable = 1
|
|
|
+ this.option = optionAdd
|
|
|
+ this.dataList = this.data_two
|
|
|
+ }else if(tab.name == "three") {
|
|
|
+ this.tab1 = false;
|
|
|
+ this.tab2 = false;
|
|
|
+ this.tab3 = true;
|
|
|
+
|
|
|
+ if(this.secondDisable == 0){
|
|
|
+ this.data_one = this.dataList
|
|
|
+ }
|
|
|
+ if(this.secondDisable == 1){
|
|
|
+ this.data_two = this.dataList
|
|
|
+ }
|
|
|
+
|
|
|
+ this.secondDisable = 2
|
|
|
+ this.option = optionReturn
|
|
|
+ this.dataList = this.data_three
|
|
|
+ }
|
|
|
},
|
|
|
getProjectDetail(){
|
|
|
if(this.id){
|
|
|
- projectDetail(this.id,"4,5").then(res =>{
|
|
|
+ projectDetail(this.id,"4,5,7,8").then(res =>{
|
|
|
this.form = res.data.data;
|
|
|
this.configuration.dicData = res.data.data.corpName
|
|
|
if(res.data.data.itemList){
|
|
|
this.loading = true;
|
|
|
- this.dataList = res.data.data.itemList;
|
|
|
+ this.allDataList = res.data.data.itemList;
|
|
|
+
|
|
|
+ this.allDataList.map(item =>{
|
|
|
+ if(item.projectType === 0){
|
|
|
+ this.data_one.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.allDataList.map(item =>{
|
|
|
+ if(item.projectType === 1){
|
|
|
+ this.data_two.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.allDataList.map(item =>{
|
|
|
+ if(item.projectType === 2){
|
|
|
+ this.data_three.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.dataList = this.data_one
|
|
|
+
|
|
|
this.loading = false;
|
|
|
}
|
|
|
if(res.data.data.filesList){
|
|
@@ -451,13 +627,67 @@
|
|
|
backToList(){
|
|
|
this.$emit("goBack");
|
|
|
},
|
|
|
+
|
|
|
+ serviceConfirm(list){
|
|
|
+ list.forEach((item)=>{
|
|
|
+ const params = {
|
|
|
+ strStatus:"录入",
|
|
|
+ pname:item.cname,
|
|
|
+ remarks:item.remarks,
|
|
|
+ price:item.price,
|
|
|
+ unit:item.unit,
|
|
|
+ frequency:item.rate,
|
|
|
+ projectType:this.secondDisable,
|
|
|
+ status:this.secondDisable === 1?7:8
|
|
|
+ }
|
|
|
+ this.$refs.crud.rowCellAdd(params);
|
|
|
+ })
|
|
|
+ this.serviceDialog = false
|
|
|
+ },
|
|
|
+ choce(){
|
|
|
+ this.serviceDialog = false
|
|
|
+ },
|
|
|
//新增 修改
|
|
|
editMainProject(){
|
|
|
+ if(this.secondDisable == 0){
|
|
|
+ this.dataList = this.data_one
|
|
|
+ }
|
|
|
+ if(this.secondDisable == 1){
|
|
|
+ this.dataList = this.data_two
|
|
|
+ }
|
|
|
+ if(this.secondDisable == 2){
|
|
|
+ this.dataList = this.data_three
|
|
|
+ }
|
|
|
+ this.allDataList = []
|
|
|
+ this.allDataList.push(...this.data_one,...this.data_two,...this.data_three)
|
|
|
+
|
|
|
+ for (let i = 0; i < this.allDataList.length; i++) {
|
|
|
+ if(this.allDataList[i].superaddition === (null || "") && this.allDataList[i].projectType === 1){
|
|
|
+ return this.$message.error(`请输入明细列表追加费必填项`);
|
|
|
+ }
|
|
|
+ if(this.allDataList[i].costReturn === (null || "") && this.allDataList[i].projectType === 2){
|
|
|
+ return this.$message.error(`请输入明细列表退费必填项`);
|
|
|
+ }
|
|
|
+ if(this.allDataList[i].userid === (null || "")){
|
|
|
+ return this.$message.error(`请输入明细列表承做人必填项`);
|
|
|
+ }
|
|
|
+ if(this.allDataList[i].deptid === (null || "")){
|
|
|
+ return this.$message.error(`请输入明细列表任务部门必填项`);
|
|
|
+ }
|
|
|
+
|
|
|
+ // if(this.allDataList[i].projectType === 2){
|
|
|
+ // this.allDataList[i].serviceCharge = -this.allDataList[i].serviceCharge
|
|
|
+ // this.allDataList[i].matMoney = -this.allDataList[i].matMoney
|
|
|
+ // }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
- itemList:this.dataList,
|
|
|
+ itemList:this.allDataList,
|
|
|
filesList:this.upLoadData
|
|
|
}
|
|
|
+
|
|
|
editMianProject(params).then(res =>{
|
|
|
if(res.data.success){
|
|
|
this.$message({
|
|
@@ -483,6 +713,22 @@
|
|
|
refreshChange() {
|
|
|
console.log('1')
|
|
|
},
|
|
|
+ rowCell(row, index) {
|
|
|
+ this.$refs.crud.rowCell(row, index);
|
|
|
+ // row.$cellEdit = !row.$cellEdit
|
|
|
+ },
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
+ done(row);
|
|
|
+ },
|
|
|
+ rowDel(row,index){
|
|
|
+ this.$confirm("确定将此明细删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.dataList.splice(index,1)
|
|
|
+ });
|
|
|
+ },
|
|
|
//上传文件保存
|
|
|
upLoadSave(row, done, loading){
|
|
|
this.upLoadData.push(row)
|