添加营销系统模块
This commit is contained in:
@@ -0,0 +1,821 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" style="margin-right: 10px" size="small">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName();param = 1" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData1"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
style="width: 100%"
|
||||
height="600"
|
||||
border
|
||||
@row-click="fetchExecutionProgressdata"
|
||||
@expand-change="selectMachine">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="tableData2" border style="width: 600px; text-align: center">
|
||||
<el-table-column label="设备型号" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="editMachine(scope.row);flag = 2">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteMachine(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同编号" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="项目名称" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="付款方式" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="图纸会签节点" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图纸会签节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="设备预验收节点" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备预验收节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="发货节点" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="安装调试节点" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安装调试节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="销售经理" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.营销经理 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称" width="260">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系人" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系电话" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同信息备注" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同信息备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-plus"
|
||||
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click.stop="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="PageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card v-show="ExecutionProgressShow">
|
||||
<h4>合同进度</h4>
|
||||
<el-steps :active="ExecutionProgress" finish-status="success" process-status="process " style="margin-left: 10px">
|
||||
<el-step title="签订合同" icon="el-icon-edit-outline"/>
|
||||
<el-step title="图纸会签" icon="el-icon-picture-outline"/>
|
||||
<el-step title="加工制造" icon="el-icon-setting"/>
|
||||
<el-step title="预备验收" icon="el-icon-view"/>
|
||||
<el-step title="设备发货" icon="el-icon-sold-out"/>
|
||||
<el-step title="安装调试" icon="el-icon-time"/>
|
||||
<el-step title="项目验收" icon="el-icon-circle-check-outline"/>
|
||||
</el-steps>
|
||||
</el-card>
|
||||
<el-card v-show="uploader" style="min-height: 145px;">
|
||||
<h4>纪要文件</h4>
|
||||
<div style="float: right;">
|
||||
<el-upload
|
||||
:action="action"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFailure"
|
||||
:show-file-list="showFileList"
|
||||
:file-list="fileList"
|
||||
class="upload-demo"
|
||||
multiple>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-for="file in hadFile" :key="file.id">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action">
|
||||
<a class="delete" @click="deleteFileData(file.id)">删除</a>
|
||||
</div>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--新增合同信息对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="140px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称" prop="EntryName">
|
||||
<el-input v-model="form.EntryName" size="small" placeholder="请输入项目名称" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已完成进度" prop="executionProgressID">
|
||||
<el-select v-model="form.executionProgressID" :disabled="infoDisable" placeholder="请输入目前执行进度" clearable size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in executionProgress"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="销售经理" prop="MarketingManagerValue">
|
||||
<el-input v-model="form.MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName()" @clear="clear()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图纸会签节点" prop="drawingJointSignNode">
|
||||
<el-date-picker
|
||||
v-model="form.drawingJointSignNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择图纸会签节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备预验节点" prop="EquipmentPreAcceptanceNode">
|
||||
<el-date-picker
|
||||
v-model="form.EquipmentPreAcceptanceNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择设备预验收节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发货节点" prop="ConsignmentNode">
|
||||
<el-date-picker
|
||||
v-model="form.ConsignmentNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择发货节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安装调试节点" prop="installDebugNode">
|
||||
<el-date-picker
|
||||
v-model="form.installDebugNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择安装调试节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" size="small" placeholder="请输入客户名称" style="width:200px" readonly @dblclick.native="CustomerChange()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式" prop="付款方式">
|
||||
<el-select v-model="form.付款方式" :disabled="disabled" placeholder="请选择付款方式" clearable size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in money"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
style="width: 200px"
|
||||
type="textarea"
|
||||
autosize
|
||||
placeholder="请输入项目介绍"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--新增机床对话框-->
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
|
||||
<el-form-item label="设备型号" prop="设备型号">
|
||||
<el-input v-model="form1.设备型号" size="small" placeholder="请输入设备型号" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="设备名称">
|
||||
<el-input v-model="form1.设备名称" size="small" placeholder="请输入设备名称" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff2('form1')">取消</el-button>
|
||||
<el-button type="primary" @click="submitMachine('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--营销经理选择-->
|
||||
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="30%">
|
||||
<span>责权省份</span>
|
||||
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">
|
||||
<el-option
|
||||
v-for="item in Province"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<div style="margin-top: 15px">
|
||||
<el-table :data="tableData3" border style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
|
||||
<el-table-column label="销售经理" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="offName">取消</el-button>
|
||||
<el-button type="primary" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--客户选择-->
|
||||
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
|
||||
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
|
||||
<el-table-column label="省份" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.省份 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="PageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="offCustomerChange">取消</el-button>
|
||||
<el-button type="primary" @click="getCustomerCode">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
|
||||
import { upload, download } from '@/utils/request'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
a: 1,
|
||||
b: 1,
|
||||
c: 1,
|
||||
money: [],
|
||||
expands: [],
|
||||
flag: '',
|
||||
title1: '',
|
||||
dialogFormVisible2: false,
|
||||
ProvinceValue: '',
|
||||
Province: [],
|
||||
CustomerCode: '',
|
||||
loading1: false,
|
||||
CustomerData: [],
|
||||
Customer: '',
|
||||
id1: '',
|
||||
action: '',
|
||||
peoplename: '',
|
||||
peopleid: '',
|
||||
dataPeople: [],
|
||||
ListPeople: [],
|
||||
fileList: [],
|
||||
hadFile: [],
|
||||
disabled: false,
|
||||
projectNum: null,
|
||||
dialogFormVisiblePeople: false,
|
||||
dialogFormVisiblePeople1: false,
|
||||
dialogCustomerFormVisible: false,
|
||||
listLoading: false,
|
||||
showFileList: true,
|
||||
entryNameValue: '', // 项目名称下拉框
|
||||
entryName: [], // 项目名称下拉框数据
|
||||
list1: [], // 项目名称临时存储
|
||||
MarketingManagerValue: '', // 营销经理下拉框
|
||||
MarketingManager: [], // 营销经理下拉框数据
|
||||
list2: [], // 营销经理临时存储
|
||||
tableData1: [], // 合同信息表
|
||||
tableData2: [], // 机床信息表
|
||||
tableData3: [], // 营销经理表
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: null,
|
||||
infoDisable: true,
|
||||
hetongID: '',
|
||||
ExecutionProgress: null, // 执行进度
|
||||
ExecutionProgressShow: false, // 执行进度可见性
|
||||
uploader: false, // 上传可见性
|
||||
dialogFormVisible1: false, // 新增对话框可见性
|
||||
form: {
|
||||
MarketingManagerValue: '',
|
||||
EntryName: '', // 项目名称
|
||||
drawingJointSignNode: '', // 图纸会签节点
|
||||
EquipmentPreAcceptanceNode: '', // 设备预验收节点
|
||||
ConsignmentNode: '', // 发货节点
|
||||
installDebugNode: '', // 安装调试节点
|
||||
executionProgressID: 1, // 执行进度ID
|
||||
customerName: '', // 客户名称
|
||||
remark: '',
|
||||
付款方式: 1
|
||||
},
|
||||
form1: {
|
||||
设备型号: '',
|
||||
设备名称: ''
|
||||
},
|
||||
title: '',
|
||||
param: 0,
|
||||
executionProgress: [], // 执行进度下拉框数据
|
||||
executionProgressID1: '', // 中间变量存储执行进度ID
|
||||
ProjectTypeIDV: [],
|
||||
temp: '', // 增加或修改的标志位
|
||||
rules: { // 表单验证规则
|
||||
EntryName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
MarketingManagerValue: [{ required: true, message: '请选择营销经理', trigger: 'change' }],
|
||||
executionProgressID: [{ required: true, message: '请选择已完成进度', trigger: 'change' }],
|
||||
付款方式: [{ required: true, message: '请选择付款方式', trigger: 'change' }]
|
||||
},
|
||||
rules1: { // 表单验证规则
|
||||
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
|
||||
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.fetchTableData1()
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.dataPeople = tree(data, 0)
|
||||
})
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'executionProgress')
|
||||
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
|
||||
this.getSelect(money, ['付款方式', '付款方式代码'], 'money')
|
||||
},
|
||||
openName() {
|
||||
this.dialogFormVisiblePeople = true
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.项目流水号
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
getTablePeople(data.id).then(response => {
|
||||
this.ListPeople = response.data
|
||||
})
|
||||
},
|
||||
handleChange(row) {
|
||||
this.peopleid = row.营销经理流水号
|
||||
this.peoplename = row.姓名
|
||||
},
|
||||
getName() {
|
||||
if (this.param === 1) {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.MarketingManagerValue = this.peoplename
|
||||
this.param = 0
|
||||
} else {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.id1 = this.peopleid
|
||||
this.form.MarketingManagerValue = this.peoplename
|
||||
}
|
||||
},
|
||||
offName() {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.dialogFormVisiblePeople1 = false
|
||||
this.peopleid = ''
|
||||
this.peoplename = ''
|
||||
},
|
||||
fetchTableData1() {
|
||||
this.ExecutionProgressShow = false
|
||||
this.uploader = false
|
||||
this.ExecutionProgress = null
|
||||
this.listLoading = true
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid], ['tableData1', 'total', 'listLoading'])
|
||||
},
|
||||
fetchExecutionProgressdata(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.projectNum}`
|
||||
this.getFileData(this.projectNum)
|
||||
fetchExecutionProgress(row.项目流水号).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
},
|
||||
selectMachine(row) {
|
||||
if (this.a === 1) {
|
||||
this.expands.push(row.项目流水号)
|
||||
this.b = row.项目流水号
|
||||
this.a = 0
|
||||
} else {
|
||||
if (this.b === row.项目流水号) {
|
||||
this.expands = []
|
||||
this.a = 1
|
||||
} else {
|
||||
this.expands = []
|
||||
this.expands.push(row.项目流水号)
|
||||
this.a = 0
|
||||
this.b = row.项目流水号
|
||||
}
|
||||
}
|
||||
this.projectNum = row.项目流水号
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.projectNum}`
|
||||
this.getFileData(this.projectNum)
|
||||
fetchExecutionProgress(row.项目流水号).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
selectMachine(row.项目流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
ADD() {
|
||||
this.addForm('form')
|
||||
this.dialogFormVisible1 = true
|
||||
this.temp = 1
|
||||
this.title = '增加'
|
||||
this.disabled = false
|
||||
},
|
||||
addTableData1() {
|
||||
addList(this.form.EntryName, this.form.drawingJointSignNode, this.form.EquipmentPreAcceptanceNode, this.form.ConsignmentNode, this.form.installDebugNode, this.id1, this.form.executionProgressID, this.CustomerCode, this.form.remark, this.form.付款方式).then(response => {
|
||||
this.dialogFormVisible1 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.peopleid = ''
|
||||
this.title = ''
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, '', ''], ['tableData1', 'total', 'listLoading'])
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addTableData1()
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
this.temp = null
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.contractNumber = row.合同编号
|
||||
this.form.EntryName = row.项目名称
|
||||
this.form.drawingJointSignNode = row.图纸会签节点
|
||||
this.form.EquipmentPreAcceptanceNode = row.设备预验收节点
|
||||
this.form.ConsignmentNode = row.发货节点
|
||||
this.form.installDebugNode = row.安装调试节点
|
||||
this.form.MarketingManagerValue = row.营销经理
|
||||
this.form.executionProgressID = parseInt(row.执行进度流水号)
|
||||
this.form.customerName = row.客户名称
|
||||
this.hetongID = row.项目流水号
|
||||
this.form.remark = row.合同信息备注
|
||||
this.CustomerCode = row.客户流水号
|
||||
this.form.付款方式 = parseInt(row.付款方式代码)
|
||||
this.disabled = true
|
||||
this.temp = 2
|
||||
this.infoDisable = false
|
||||
},
|
||||
chaEdit() {
|
||||
editchar(this.form.EntryName, this.form.drawingJointSignNode, this.form.EquipmentPreAcceptanceNode, this.form.ConsignmentNode, this.form.installDebugNode, this.id1, this.form.executionProgressID, this.CustomerCode, this.form.remark, this.hetongID, this.form.付款方式).then(response => {
|
||||
this.dialogFormVisible1 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.peopleid = ''
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, '', ''], ['tableData1', 'total', 'listLoading'])
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.hetongID}`
|
||||
fetchExecutionProgress(this.hetongID).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
},
|
||||
clear() {
|
||||
this.peopleid = ''
|
||||
this.tableData3 = []
|
||||
this.ProvinceValue = ''
|
||||
},
|
||||
CustomerChange() {
|
||||
this.dialogCustomerFormVisible = true
|
||||
},
|
||||
offCustomerChange() {
|
||||
this.dialogCustomerFormVisible = false
|
||||
},
|
||||
fetchCustomerData() {
|
||||
this.loading1 = true
|
||||
this.getTable(fetchCustomerData, [this.PageCurrent1, this.PageSize1, this.Customer], ['CustomerData', 'total1', 'loading1'])
|
||||
},
|
||||
handleCustomerChange(row) {
|
||||
this.CustomerCode = row.客户流水号
|
||||
this.form.customerName = row.客户名称
|
||||
},
|
||||
getCustomerCode() {
|
||||
this.dialogCustomerFormVisible = false
|
||||
},
|
||||
async submitUpload() {
|
||||
await this.$refs.upload.submit()
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
this.getFileData(this.projectNum)
|
||||
}
|
||||
},
|
||||
uploadFailure(a, file, fileList) {
|
||||
fileList.map(file => {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
})
|
||||
},
|
||||
getFileData(row) {
|
||||
this.hadFile = []
|
||||
getFileData(row).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${download}?id=${item.文件标识}.${item.文件后缀}&name=${item.文件名称}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteFileData(id) {
|
||||
this.deleteRow(deleteFileData, id, function() { this.getFileData(this.projectNum) })
|
||||
},
|
||||
changeProvince() {
|
||||
SelectMarketingManager(this.ProvinceValue).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addMachine(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '新增'
|
||||
this.addForm('form1')
|
||||
},
|
||||
editMachine(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '编辑'
|
||||
this.c = row.机床流水号
|
||||
this.form1.设备型号 = row.机床图号
|
||||
this.form1.设备名称 = row.机床名称
|
||||
},
|
||||
callOff2() {
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
submitMachine() {
|
||||
function a() {
|
||||
selectMachine(this.projectNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible2 = false
|
||||
}
|
||||
if (this.flag === 1) {
|
||||
this.addTable(submitMachine, [this.projectNum, this.form1.设备型号, this.form1.设备名称], 'form1', a)
|
||||
} else {
|
||||
this.editTable(editMachine, [this.c, this.form1.设备型号, this.form1.设备名称], 'form1', a)
|
||||
}
|
||||
},
|
||||
deleteMachine(row) {
|
||||
function a() {
|
||||
selectMachine(this.projectNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
this.deleteRow(delMachine, row.机床流水号, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px;
|
||||
}
|
||||
|
||||
.wrapper{
|
||||
width: 260px;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #b8c7d9;
|
||||
float: left;
|
||||
margin: 10px;
|
||||
}
|
||||
.content{
|
||||
position: relative;
|
||||
padding: 8px 8px 0 8px;
|
||||
}
|
||||
.action{
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 8px;
|
||||
}
|
||||
.delete{
|
||||
padding: 0 5px;
|
||||
border-radius: 3px;
|
||||
color: #0f84b0;
|
||||
font-size: 12px;
|
||||
}
|
||||
.delete:hover{
|
||||
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||
color: #fff;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
.icon{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
margin-right: 7px;
|
||||
margin-top: 2px;
|
||||
font-size: 26px;
|
||||
}
|
||||
.info{
|
||||
position: absolute;
|
||||
left: 44px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user