|
@@ -17,6 +17,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
|
+ {{paymentTerm}}
|
|
|
<containerTitle title="基础信息"></containerTitle>
|
|
|
<basic-container>
|
|
|
<el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
|
|
@@ -25,18 +26,19 @@
|
|
|
<el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
<el-date-picker v-if="item.type === 'datetime'" style="width: 100%;" v-model="form[item.prop]" size="small" type="datetime" :disabled="item.disabled?true:false" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
<el-date-picker v-else-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"/>
|
|
|
- <el-select v-else-if="item.prop === 'paymentType'" style="width: 100%" size="small" placeholder="请选择" clearable filterable>
|
|
|
+ <el-select v-else-if="item.prop === 'paymentType'" style="width: 100%" size="small" placeholder="请选择" clearable filterable @change="selectBD">
|
|
|
<el-option v-for="(item,index) in paymentTerm" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
</el-select>
|
|
|
<selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
- <el-input type="age" v-else v-model="form[item.prop]" :disabled="item.disabled?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="请输入">
|
|
|
+ <template v-if="item.prop === 'debitAmount'|| item.prop === 'advanceAmount'||item.prop === 'settlmentAmount'||item.prop === 'balanceAmount'" slot="append">元</template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</basic-container>
|
|
|
<containerTitle title="明细列表"></containerTitle>
|
|
|
- {{data}}
|
|
|
<basic-container>
|
|
|
<avue-crud
|
|
|
ref="crud"
|
|
@@ -54,7 +56,7 @@
|
|
|
@search-change="searchChange"
|
|
|
@saveColumn="saveColumn"
|
|
|
>
|
|
|
- <template slot="menuLeft">
|
|
|
+ <template slot-scope="scope" slot="menuLeft">
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
icon="el-icon-plus"
|
|
@@ -62,7 +64,7 @@
|
|
|
</el-button>
|
|
|
<el-button type="info"
|
|
|
size="small"
|
|
|
- @click.stop="berforPleaseCheck">请 核
|
|
|
+ @click.stop="beforePleaseCheck">请 核
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="menuRight">
|
|
@@ -79,11 +81,12 @@
|
|
|
type="text"
|
|
|
size="small"
|
|
|
@click="rowCellTwo(row,index)"
|
|
|
- >{{row.$cellEdit?'保存':'修改'}}</el-button>
|
|
|
+ >{{row.$cellEdit?'修改完成':'修改'}}</el-button>
|
|
|
</template>
|
|
|
<template slot="userid" slot-scope="{row,index}">
|
|
|
- <span style="float: left;padding-top: 2px">{{ row.userName }}</span>
|
|
|
- <el-button type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
|
|
|
+ <span v-if="row.$cellEdit" style="float: left;color: #F56C6C;">*</span>
|
|
|
+ <span style="margin-left: 12px;padding-top: 2px">{{ row.userName }}</span>
|
|
|
+ <el-button v-if="row.$cellEdit" type="text" size="mini" style="float: right" @click="selectUser(row)">选择</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
@@ -183,7 +186,7 @@
|
|
|
|
|
|
<script>
|
|
|
import option from "./configuration/detailsPage.json";
|
|
|
- import { projectDetail,editMianProject,updateItemStatus } from "@/api/workManagement/mainProject";
|
|
|
+ import { projectDetail,editMianProject,updateItemStatus,getSysNo } from "@/api/workManagement/mainProject";
|
|
|
//上传文件json
|
|
|
import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json"
|
|
|
//服务列表接口
|
|
@@ -191,11 +194,14 @@
|
|
|
import serviceOption from "./configuration/serviceDialogList.json";
|
|
|
//业务字典
|
|
|
import { getDictionary } from "@/api/system/dictbiz";
|
|
|
+ // 当前登录人
|
|
|
+ import { getUserInfo } from "@/api/system/user";
|
|
|
//用户组件
|
|
|
import userOption from "./configuration/userList.json";
|
|
|
import { getList } from "@/api/system/user";
|
|
|
import { getDeptLazyTree} from "@/api/system/dept";
|
|
|
import type from "../service-items/type";
|
|
|
+ import data from "../../util/data";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -231,6 +237,7 @@
|
|
|
{
|
|
|
label: '系统编号',
|
|
|
prop: 'sysNo',
|
|
|
+ disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -284,8 +291,9 @@
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '未收金额',
|
|
|
- prop: 'balanceAmount',
|
|
|
+ label: '已收金额',
|
|
|
+ prop: 'settlmentAmount',
|
|
|
+ disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
|
pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
|
|
@@ -295,8 +303,9 @@
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '已收金额',
|
|
|
- prop: 'settlmentAmount',
|
|
|
+ label: '未收金额',
|
|
|
+ prop: 'balanceAmount',
|
|
|
+ disabled: true,
|
|
|
rules: [
|
|
|
{
|
|
|
pattern: /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/,
|
|
@@ -438,7 +447,16 @@
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.id = BigInt(this.$route.query.id);
|
|
|
+ // 表格行编辑 输入框change事件
|
|
|
+ //单价
|
|
|
+ this.optionTable.column[4].change = function (val) {
|
|
|
+ val.row.amount = val.row.quantity*val.value;
|
|
|
+ }
|
|
|
+ //数量
|
|
|
+ this.optionTable.column[6].change = function (val) {
|
|
|
+ val.row.amount = val.row.price*val.value;
|
|
|
+ }
|
|
|
+ this.id = BigInt(this.$route.query.id);//字符串转数字 超长用BigInt
|
|
|
this.getProjectDetail();
|
|
|
const params = {
|
|
|
code : "affair_payment_term"
|
|
@@ -451,12 +469,13 @@
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ //查询明细
|
|
|
getProjectDetail(pleaseCheck){
|
|
|
if(this.id){
|
|
|
- projectDetail(this.id,0).then(res =>{
|
|
|
+ projectDetail(this.id,"0,1,2,3,4,5").then(res =>{
|
|
|
this.form = res.data.data;
|
|
|
if(res.data.data.itemList){
|
|
|
- this.dataList = res.data.data.itemList;
|
|
|
+ this.data = res.data.data.itemList;
|
|
|
if(pleaseCheck === 10086){
|
|
|
this.pleaseCheck();
|
|
|
}
|
|
@@ -464,6 +483,14 @@
|
|
|
this.data = [];
|
|
|
}
|
|
|
})
|
|
|
+ }else{
|
|
|
+ getSysNo().then(res =>{
|
|
|
+ this.$set(this.form,"sysNo", res.data.data)
|
|
|
+ this.$set(this.form,"createTime", new Date())
|
|
|
+ });
|
|
|
+ getUserInfo().then(res =>{
|
|
|
+ this.$set(this.form,"createUserName", res.data.data.name)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|
|
@@ -482,6 +509,10 @@
|
|
|
done(row);
|
|
|
});
|
|
|
},
|
|
|
+ //slelect 强制赋值
|
|
|
+ selectBD(){
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
//点击修改或保存时触发
|
|
|
rowCellTwo(row,index){
|
|
|
this.$refs.crud.rowCell(row, index);
|
|
@@ -519,7 +550,7 @@
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
}).then(()=>{
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
if(valid){
|
|
|
this.$router.push({
|
|
|
path: "/mainItems_detailsPage",
|
|
@@ -533,9 +564,18 @@
|
|
|
})
|
|
|
},
|
|
|
//请核
|
|
|
- berforPleaseCheck(){
|
|
|
+ beforePleaseCheck(){
|
|
|
if(this.crudSelection.length!=0){
|
|
|
- this.editMainProject(10086);
|
|
|
+ let result = [];
|
|
|
+ this.crudSelection.forEach(item=>{
|
|
|
+ //新录入状态下 才可提交审核
|
|
|
+ // if(item.status === 0){
|
|
|
+ // result.push("true")
|
|
|
+ // }else{
|
|
|
+ // result.push("false")
|
|
|
+ // }
|
|
|
+ this.editMainProject(10086);
|
|
|
+ })
|
|
|
}else{
|
|
|
this.$message({
|
|
|
type: "error",
|
|
@@ -568,7 +608,18 @@
|
|
|
//新增 修改
|
|
|
editMainProject(pleaseCheck){
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
- if(valid){
|
|
|
+ //校验明细列表
|
|
|
+ let user = true;
|
|
|
+ this.data.forEach((item,index) =>{
|
|
|
+ if(!item.userid && !item.deptid && user){
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "请检查明细列表第"+(index+1)+"行必填数据数据"
|
|
|
+ });
|
|
|
+ user = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(valid && user){
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
itemList:this.data,
|
|
@@ -658,6 +709,7 @@
|
|
|
remarks:item.remarks,
|
|
|
price:item.price,
|
|
|
unit:item.unit,
|
|
|
+ frequency:item.rate,
|
|
|
}
|
|
|
this.$refs.crud.rowCellAdd(params);
|
|
|
this.$refs.crud.rowCell(item, this.optionFrom.length-1)
|
|
@@ -705,6 +757,7 @@
|
|
|
if(this.userSelection){
|
|
|
this.data[this.detailsSelect].userid = this.userSelection[0].id;
|
|
|
this.data[this.detailsSelect].userName = this.userSelection[0].realName;
|
|
|
+ // this.$set(this.data[this.detailsSelect],'userName',this.userSelection[0].realName)
|
|
|
this.userDialog = !this.userDialog
|
|
|
}
|
|
|
}
|