|
@@ -0,0 +1,663 @@
|
|
|
+<template>
|
|
|
+ <div class="borderless">
|
|
|
+ <div class="customer-head">
|
|
|
+ <div class="customer-back">
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
+ @click="backToList">返回列表
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-button
|
|
|
+ class="el-button--small-yh add-customer-btn"
|
|
|
+ type="primary"
|
|
|
+ :disabled="disabled"
|
|
|
+ @click="editCustomer"
|
|
|
+ >{{form.id?'确认修改':'确认新增'}}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 60px">
|
|
|
+ <el-form :model="form" ref="form" label-width="130px">
|
|
|
+ <containerTitle title="基础信息"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 10px">
|
|
|
+ <el-row>
|
|
|
+ <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:8" :key="index">
|
|
|
+ <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" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ <el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
|
|
|
+ <el-input type="age" v-else v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </basic-container>
|
|
|
+<!-- 采购明细-->
|
|
|
+ <containerTitle title="采购明细"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 10px">
|
|
|
+ <avue-crud
|
|
|
+ :option="detailedList"
|
|
|
+ :data="detailedData"
|
|
|
+ ref="detailedList"
|
|
|
+ @row-save="rowSaveProject"
|
|
|
+ @row-update="rowUpdateProject"
|
|
|
+ @row-del="rowDelProject"
|
|
|
+ >
|
|
|
+ <template slot-scope="{row,index}" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="rowCellDetailed(row,index)"
|
|
|
+ >{{row.$cellEdit?'保存':'修改'}}</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menuLeft" slot-scope="{size}">
|
|
|
+<!-- <el-button type="primary"-->
|
|
|
+<!-- icon="el-icon-plus"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- >保 存</el-button>-->
|
|
|
+<!-- <el-button type="warning"-->
|
|
|
+<!-- icon="el-icon-check"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- >请 核</el-button>-->
|
|
|
+<!-- <el-button type="info"-->
|
|
|
+<!-- icon="el-icon-printer"-->
|
|
|
+<!-- size="small"-->
|
|
|
+<!-- >打 印</el-button>-->
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+<!-- 其他费用-->
|
|
|
+ <containerTitle title="其他费用"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 40px">
|
|
|
+ <avue-crud
|
|
|
+ :option="advantageProject"
|
|
|
+ v-model="advantageProjectForm"
|
|
|
+ :data="advantageProjectData"
|
|
|
+ ref="crudProject"
|
|
|
+ @row-save="rowSaveProject"
|
|
|
+ @row-update="rowUpdateAdvantageProject"
|
|
|
+ @row-del="rowDelAdvantageProject"
|
|
|
+ >
|
|
|
+ <template slot="code" slot-scope="{row,index}">
|
|
|
+ <span style="float: left;padding-top: 2px">{{row.code}}</span><el-button type="text" size="mini" style="float: right" @click="choice(row)">选择</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{row,index}" slot="menu">
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="rowCellTwo(row,index)"
|
|
|
+ >{{row.$cellEdit?'保存':'修改'}}</el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menuLeft" slot-scope="{size}">
|
|
|
+ <el-button type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="small"
|
|
|
+ @click="costIncrease"
|
|
|
+ >新增</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+<!-- 合同上传-->
|
|
|
+ <containerTitle title="附件上传"></containerTitle>
|
|
|
+ <basic-container style="margin-bottom: 40px">
|
|
|
+ <avue-crud
|
|
|
+ :option="uploadList"
|
|
|
+ v-model="bankOfDepositForm"
|
|
|
+ :data="bankOfDepositData"
|
|
|
+ @row-save="rowSaveBankOfDeposit"
|
|
|
+ @row-update="rowUpdateBankOfDeposit"
|
|
|
+ @row-del="rowDelBankOfDeposit"
|
|
|
+ ></avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="导入费用"
|
|
|
+ append-to-body
|
|
|
+ class="el-dialogDeep"
|
|
|
+ :visible.sync="dialogCost"
|
|
|
+ width="80%"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :destroy-on-close="true"
|
|
|
+ :close-on-press-escape="false">
|
|
|
+ <el-row style="height: 0;">
|
|
|
+ <el-col :span="5">
|
|
|
+ <div>
|
|
|
+ <el-scrollbar>
|
|
|
+ <basic-container>
|
|
|
+ <avue-tree :option="treeOptionCost" :data="treeData" @node-click="nodeClickCost"/>
|
|
|
+ </basic-container>
|
|
|
+ </el-scrollbar>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="19">
|
|
|
+ <basic-container>
|
|
|
+ <avue-crud :option="optionTwoCost"
|
|
|
+ :table-loading="loadingCost"
|
|
|
+ :data="dataCost"
|
|
|
+ ref="crud"
|
|
|
+ @refresh-change="refreshChangeCost"
|
|
|
+ @selection-change="selectionChangeCost"
|
|
|
+ :page.sync="pageCost"
|
|
|
+ @on-load="onLoadCost">
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogCost = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="importCost" v-if="choiceData !== true">导入</el-button>
|
|
|
+ <el-button type="primary" @click="choiceCost" v-if="choiceData === true" :disabled="tableDataCost.length !== 1">导入</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import detailedList from './config/detailedList.json'
|
|
|
+import uploadList from './config/uploadList.json'
|
|
|
+import advantageProject from "./config/advantageProject.json"
|
|
|
+import {getDeptLazyTree,customerList} from "@/api/basicData/basicFeesDesc";
|
|
|
+import optionTwoCost from "./config/mainListCost.json"
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "detailsPage",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form: {},
|
|
|
+ disabled: false,
|
|
|
+ // 明细配置
|
|
|
+ detailedList: detailedList,
|
|
|
+ // 明细数据
|
|
|
+ detailedData: [],
|
|
|
+ // 合同上传数据
|
|
|
+ uploadList: uploadList,
|
|
|
+ // 合同数据
|
|
|
+ bankOfDepositData: [],
|
|
|
+ bankOfDepositForm: {},
|
|
|
+ // 其他费用
|
|
|
+ advantageProject: advantageProject,
|
|
|
+ advantageProjectData: [],
|
|
|
+ advantageProjectForm: {},
|
|
|
+ dialogCost: false,
|
|
|
+ choiceData: false,
|
|
|
+ treeOptionCost:{
|
|
|
+ nodeKey: 'id',
|
|
|
+ lazy: true,
|
|
|
+ treeLoad: function (node, resolve) {
|
|
|
+ const parentId = (node.level === 0) ? 0 : node.data.id;
|
|
|
+ getDeptLazyTree(parentId).then(res => {
|
|
|
+ resolve(res.data.data.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ leaf: !item.hasChildren
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addBtn: false,
|
|
|
+ menu: false,
|
|
|
+ size: 'small',
|
|
|
+ props: {
|
|
|
+ labelText: '标题',
|
|
|
+ label: 'title',
|
|
|
+ value: 'value',
|
|
|
+ children: 'children'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 导入其他费用配置
|
|
|
+ optionTwoCost: optionTwoCost,
|
|
|
+ loadingCost: false,
|
|
|
+ dataCost:[],
|
|
|
+ pageCost:{
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ tableDataCost: [],
|
|
|
+ treeDeptIdCost: '',
|
|
|
+ choiceIndex: '',
|
|
|
+ // 基础信息
|
|
|
+ basicData: {
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '系统编号',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: false,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '到港日期',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'datetime',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '供应商',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'select',
|
|
|
+ data: [],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '业务员',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'select',
|
|
|
+ data: [],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '合同号',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '合同日期',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'datetime',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '合同类型',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'select',
|
|
|
+ data: [],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '采购商',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'select',
|
|
|
+ data: [],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '付款方式',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'select',
|
|
|
+ data: [],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '付款/开证日期',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'datetime',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '信用证到期日',
|
|
|
+ prop: 'orderNo',
|
|
|
+ type:'datetime',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '合同金额',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '人民币金额',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '预付(保证)金额',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '单价',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '币别',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '汇率',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '合同重量',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '码头重量',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: '已付金额',
|
|
|
+ prop: 'orderNo',
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: ' ',
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "订单备注",
|
|
|
+ span: 24,
|
|
|
+ prop: "orderRemark",
|
|
|
+ mock: {
|
|
|
+ type: 'county'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //修改提交触发
|
|
|
+ editCustomer() {},
|
|
|
+ // 采购明细编辑
|
|
|
+ rowCellDetailed(row, index) {
|
|
|
+ this.$refs.detailedList.rowCell(row, index)
|
|
|
+ },
|
|
|
+ //其他费用编辑
|
|
|
+ rowCellTwo(row, index) {
|
|
|
+ this.$refs.crudProject.rowCell(row, index)
|
|
|
+ },
|
|
|
+ //新增明细保存触发
|
|
|
+ rowSaveProject(row, done, loading){
|
|
|
+ // this.advantageProjectData.push(row)
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ //修改明细触发
|
|
|
+ rowUpdateProject(row, index, done, loading) {
|
|
|
+ done(row);
|
|
|
+ },
|
|
|
+ //删除明细触发
|
|
|
+ rowDelProject(row, index, donerowDel) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id){
|
|
|
+ // corpsitem(row.id).then(res=>{
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "操作成功!"
|
|
|
+ // });
|
|
|
+ // this.detailedData.splice(index, 1);
|
|
|
+ // })
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.detailedData.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 修改其他费用明细
|
|
|
+ rowUpdateAdvantageProject(row, index, done, loading) {
|
|
|
+ done(row);
|
|
|
+ },
|
|
|
+ // 删除其他费用明细
|
|
|
+ rowDelAdvantageProject(row, index, donerowDel) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id){
|
|
|
+ // corpsitem(row.id).then(res=>{
|
|
|
+ // this.$message({
|
|
|
+ // type: "success",
|
|
|
+ // message: "操作成功!"
|
|
|
+ // });
|
|
|
+ // this.detailedData.splice(index, 1);
|
|
|
+ // })
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.advantageProjectData.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //其他费用新增触发
|
|
|
+ costIncrease(){
|
|
|
+ this.dialogCost = !this.dialogCost
|
|
|
+ this.choiceData = false
|
|
|
+ },
|
|
|
+ //新增附件上传保存触发
|
|
|
+ rowSaveBankOfDeposit(row, done, loading){
|
|
|
+ this.bankOfDepositData.push(row)
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ //修改附件上传触发
|
|
|
+ rowUpdateBankOfDeposit(row, index, done, loading) {
|
|
|
+ done(row);
|
|
|
+ },
|
|
|
+ //删除附件上传触发
|
|
|
+ rowDelBankOfDeposit(row, index, donerowDel) {
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id){
|
|
|
+ corpsbank(row.id).then(res=>{
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.bankOfDepositData.splice(index, 1);
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.bankOfDepositData.splice(index, 1);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //费用查询
|
|
|
+ onLoadCost(page, params = {}) {
|
|
|
+ this.loadingCost = true;
|
|
|
+ let queryParams = Object.assign({}, params, {pageSize: page.pageSize, pageNum: page.currentPage,parentId:0,feesTypeId:this.treeDeptIdCost})
|
|
|
+ customerList(queryParams).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ const data = res.data.data;
|
|
|
+ this.pageCost.total = data.total;
|
|
|
+ this.dataCost = data.records;
|
|
|
+ this.loadingCost = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //点击费用明细选择触发
|
|
|
+ choice(row){
|
|
|
+ this.dialogCost = !this.dialogCost
|
|
|
+ this.choiceData = true
|
|
|
+ this.choiceIndex = row.$index
|
|
|
+ },
|
|
|
+ nodeClickCost(data){
|
|
|
+ this.treeDeptIdCost = data.id;
|
|
|
+ this.pageCost.currentPage = 1;
|
|
|
+ this.onLoadCost(this.pageCost);
|
|
|
+ },
|
|
|
+ //费用刷新触发
|
|
|
+ refreshChangeCost() {
|
|
|
+ this.treeDeptIdCost = '';
|
|
|
+ this.pageCost.currentPage = 1;
|
|
|
+ this.onLoadCost(this.pageCost);
|
|
|
+ },
|
|
|
+ //费用选中触发
|
|
|
+ selectionChangeCost(list){
|
|
|
+ this.tableDataCost = list
|
|
|
+ },
|
|
|
+ //费用导入触发
|
|
|
+ importCost(){
|
|
|
+ // this.advantageProjectForm = this.advantageProjectForm.concat(this.tableDataCost)
|
|
|
+ if (this.tableDataCost.length>0){
|
|
|
+ for(let item in this.tableDataCost){
|
|
|
+ console.log(this.tableDataCost[item])
|
|
|
+ this.tableDataCost[item].itemId = this.tableDataCost[item].id
|
|
|
+ this.tableDataCost[item].feeName = this.tableDataCost[item].cname
|
|
|
+ delete this.tableDataCost[item].id
|
|
|
+ this.$refs.crudProject.rowCellAdd(this.tableDataCost[item]);
|
|
|
+ this.$refs.crudProject.rowCell(this.tableDataCost[item], this.advantageProjectForm.length-1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableDataCost = []
|
|
|
+ this.dialogCost = false
|
|
|
+ },
|
|
|
+ //费用编辑导入触发
|
|
|
+ choiceCost(){
|
|
|
+ if (this.tableDataCost.length === 1){
|
|
|
+ this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
|
|
|
+ this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id
|
|
|
+ this.advantageProjectData[this.choiceIndex].code = this.tableDataCost[0].code
|
|
|
+ }
|
|
|
+ this.dialogCost = !this.dialogCost
|
|
|
+ this.choiceData = false
|
|
|
+ },
|
|
|
+ backToList() {
|
|
|
+ this.$router.$avueRouter.closeTag();
|
|
|
+ this.$router.push({
|
|
|
+ path: '/purchase/contract/index',
|
|
|
+ query: {}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.customer-head {
|
|
|
+ position: fixed;
|
|
|
+ top: 105px;
|
|
|
+ width: 100%;
|
|
|
+ margin-left: -10px;
|
|
|
+ height: 62px;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
|
|
|
+ z-index: 999;
|
|
|
+ /* display: flex;
|
|
|
+ justify-content: left; */
|
|
|
+}
|
|
|
+
|
|
|
+.customer-back {
|
|
|
+ cursor: pointer;
|
|
|
+ line-height: 62px;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #323233;
|
|
|
+ font-weight: 400;
|
|
|
+}
|
|
|
+
|
|
|
+.add-customer-btn {
|
|
|
+ position: fixed;
|
|
|
+ right: 36px;
|
|
|
+ top: 115px;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-form-item {
|
|
|
+ margin-bottom: 0;
|
|
|
+}
|
|
|
+//el-icon-plus avue-upload__icon
|
|
|
+.avue-upload /deep/ .avue-upload__icon {
|
|
|
+ line-height: 178px !important;
|
|
|
+}
|
|
|
+</style>
|