|
@@ -5,63 +5,39 @@
|
|
|
</div>
|
|
|
<y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="getList">
|
|
|
<template slot="left">
|
|
|
- <PermissionButton menu-code="_views_item_add" class-name="filter-item" type="primary" size="mini"
|
|
|
- :page-jump="true" round style="float: left" />
|
|
|
- <el-select v-model="listQuery.state" placeholder="状态" clearable filterable
|
|
|
- style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
|
|
|
+ <PermissionButton menu-code="_views_item_add" class-name="filter-item" type="primary" size="mini" :page-jump="true" round style="float: left" />
|
|
|
+ <el-select v-model="listQuery.state" placeholder="状态" clearable filterable style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
|
|
|
<el-option label="进行中" value="进行中" />
|
|
|
<el-option label="已完成" value="已完成" />
|
|
|
<el-option label="未开始" value="未开始" />
|
|
|
<el-option label="暂停" value="暂停" />
|
|
|
<el-option label="终止" value="终止" />
|
|
|
</el-select>
|
|
|
- <el-select v-model="listQuery.cate" placeholder="项目类型" clearable filterable
|
|
|
- style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
|
|
|
+ <el-select v-model="listQuery.cate" placeholder="项目类型" clearable filterable style="margin-left: 20px;width: 100px;float: left;" class="filter-item">
|
|
|
<el-option v-for="item in cateList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
- <el-input v-model="listQuery.name" placeholder="项目名称" clearable
|
|
|
- style="margin-left: 20px;width: 270px;float: left;">
|
|
|
- </el-input>
|
|
|
- <el-input v-model="listQuery.businessNo" placeholder="流水号" clearable
|
|
|
- style="margin-left: 20px;width: 200px;float: left;">
|
|
|
- </el-input>
|
|
|
- <el-input v-model="listQuery.clientManager" placeholder="客户经理" clearable
|
|
|
- style="margin-left: 20px;width: 100px;float: left;">
|
|
|
- </el-input>
|
|
|
- <el-input v-model="listQuery.skiller" placeholder="项目负责人" clearable
|
|
|
- style="margin-left: 20px;width: 150px;float: left;">
|
|
|
- </el-input>
|
|
|
- <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索
|
|
|
- </el-button>
|
|
|
- <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置
|
|
|
- </el-button>
|
|
|
- <el-button style="margin-left: 10px; float: left;" round type="info" @click="editBusinessState">项目状态
|
|
|
+ <el-input v-model="listQuery.name" placeholder="项目名称" clearable style="margin-left: 20px;width: 270px;float: left;"></el-input>
|
|
|
+ <el-input v-model="listQuery.businessNo" placeholder="流水号" clearable style="margin-left: 20px;width: 200px;float: left;"></el-input>
|
|
|
+ <el-input v-model="listQuery.clientManager" placeholder="客户经理" clearable style="margin-left: 20px;width: 100px;float: left;"></el-input>
|
|
|
+ <el-input v-model="listQuery.skiller" placeholder="项目负责人" clearable style="margin-left: 20px;width: 150px;float: left;"></el-input>
|
|
|
+ <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList" round>搜索</el-button>
|
|
|
+ <el-button class="filter-item" style="float: left;" round type="success" @click="resetSearch()">重置</el-button>
|
|
|
+ <el-button style="margin-left: 10px; float: left;" round type="info" @click="editBusinessState">
|
|
|
+ 项目状态
|
|
|
<i class="el-icon-edit"></i>
|
|
|
</el-button>
|
|
|
- <div v-if=manySelect style="float: left;">
|
|
|
- <el-button style="margin-left: 10px; float: left;" round type="warning" @click="toUpdateState('暂停')">暂停
|
|
|
- </el-button>
|
|
|
- <el-button style="margin-left: 10px; float: left;" round type="danger" @click="toUpdateState('终止')">终止
|
|
|
- </el-button>
|
|
|
- <el-button style="margin-left: 10px; float: left;" round @click="toUpdateState(null)">还原
|
|
|
- </el-button>
|
|
|
+ <div v-if="manySelect" style="float: left;">
|
|
|
+ <el-button style="margin-left: 10px; float: left;" round type="warning" @click="toUpdateState('暂停')">暂停</el-button>
|
|
|
+ <el-button style="margin-left: 10px; float: left;" round type="danger" @click="toUpdateState('终止')">终止</el-button>
|
|
|
+ <el-button style="margin-left: 10px; float: left;" round @click="toUpdateState(null)">还原</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
- <PermissionButton menu-code="_views_item_export" class-name="filter-item" round type="primary" name="导出"
|
|
|
- @click="itemExport">
|
|
|
- </PermissionButton>
|
|
|
- <PermissionButton menu-code="_views_item_mine_export" class-name="filter-item" round type="primary" name="导出"
|
|
|
- @click="itemMineExport">
|
|
|
- </PermissionButton>
|
|
|
+ <PermissionButton menu-code="_views_item_export" class-name="filter-item" round type="primary" name="导出" @click="itemExport"></PermissionButton>
|
|
|
+ <PermissionButton menu-code="_views_item_mine_export" class-name="filter-item" round type="primary" name="导出" @click="itemMineExport"></PermissionButton>
|
|
|
</template>
|
|
|
- <parentTable v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;" :selectionChange="handleSelectionChange">
|
|
|
- <el-table-column
|
|
|
- v-if="manySelect"
|
|
|
- align="center"
|
|
|
- type="selection"
|
|
|
- width="100" border="true">
|
|
|
- </el-table-column>
|
|
|
+ <parentTable v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;" :selectionChange="handleSelectionChange">
|
|
|
+ <el-table-column v-if="manySelect" align="center" type="selection" width="100" border="true"></el-table-column>
|
|
|
<el-table-column label="项目名称" align="center" width="200">
|
|
|
<template slot-scope="{row}">
|
|
|
<span>{{ row.name }}</span>
|
|
@@ -129,51 +105,76 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="电子合同" align="center" width="100">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-button v-if="row.contractUrl" type="success" plain round
|
|
|
- @click="downloadContract(row.contractUrl)">下载</el-button>
|
|
|
+ <el-button v-if="row.contractUrl" type="success" plain round @click="downloadContract(row.contractUrl)">下载</el-button>
|
|
|
<el-button v-else plain round disabled>下载</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="150" fixed="right">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-dropdown type="primary">
|
|
|
+ <!-- <el-dropdown type="primary">
|
|
|
<el-button type="primary" round>
|
|
|
更多按钮<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </el-button>
|
|
|
- <el-dropdown-menu slot="dropdown" >
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_plan" class-name="filter-item" name="" type="primary"
|
|
|
- :page-jump="true" :page-query="{ id: row.id, itemName: row.name, listQuery: listQuery }" round/>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_plan_list" class-name="filter-item" name="" type="primary"
|
|
|
- :page-jump="true" :page-query="{ id: row.id, itemName: row.name, listQuery: listQuery }" round />
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_view_item_log_write" class-name="filter-item" name="" type="success"
|
|
|
+ </el-button>-->
|
|
|
+ <!-- <el-dropdown-menu slot="dropdown" > -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton
|
|
|
+ menu-code="_views_item_plan"
|
|
|
+ class-name="filter-item"
|
|
|
+ name
|
|
|
+ type="text"
|
|
|
:page-jump="true"
|
|
|
- :page-query="{ id: row.id, itemName: row.name, stageName: row.stageName, stageId: row.stageId, listQuery: listQuery }" round/>
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_rate" class-name="filter-item" name="日志" type="info"
|
|
|
- :page-jump="true" :page-query="{ id: row.id, listQuery: listQuery }" round />
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_detail" class-name="filter-item" name="" type="primary"
|
|
|
- :page-jump="true" :page-query="{ id: row.id, listQuery: listQuery }" round />
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_detail_readonly" class-name="filter-item" name="" type="primary"
|
|
|
- :page-jump="true" :page-query="{ id: row.id, listQuery: listQuery }" round />
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_remove" class-name="filter-item" name="" type="danger" round @click="deleteInfo(row.id)" />
|
|
|
- </el-dropdown-item>
|
|
|
- <el-dropdown-item :divided=true >
|
|
|
- <PermissionButton menu-code="_views_item_transfer" class-name="filter-item" name="" type="success" round @click="transfer(row)" />
|
|
|
- </el-dropdown-item>
|
|
|
+ :page-query="{ id: row.id, itemName: row.name, listQuery: listQuery }"
|
|
|
+ style="pading: 5px"
|
|
|
+ />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton
|
|
|
+ menu-code="_views_item_plan_list"
|
|
|
+ class-name="filter-item"
|
|
|
+ name
|
|
|
+ type="text"
|
|
|
+ :page-jump="true"
|
|
|
+ :page-query="{ id: row.id, itemName: row.name, listQuery: listQuery }"
|
|
|
+ style="pading: 5px"
|
|
|
+ />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton
|
|
|
+ menu-code="_view_item_log_write"
|
|
|
+ class-name="filter-item"
|
|
|
+ name
|
|
|
+ type="success"
|
|
|
+ :page-jump="true"
|
|
|
+ :page-query="{ id: row.id, itemName: row.name, stageName: row.stageName, stageId: row.stageId, listQuery: listQuery }"
|
|
|
+ style="pading: 5px"
|
|
|
+ />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton menu-code="_views_item_rate" class-name="filter-item" name="日志" type="text" :page-jump="true" :page-query="{ id: row.id, listQuery: listQuery }" style="pading: 5px" />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton menu-code="_views_item_detail" class-name="filter-item" name type="text" :page-jump="true" :page-query="{ id: row.id, listQuery: listQuery }" style="pading: 5px" />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton
|
|
|
+ menu-code="_views_item_detail_readonly"
|
|
|
+ class-name="filter-item"
|
|
|
+ name
|
|
|
+ type="text"
|
|
|
+ :page-jump="true"
|
|
|
+ :page-query="{ id: row.id, listQuery: listQuery }"
|
|
|
+ style="pading: 5px"
|
|
|
+ />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton menu-code="_views_item_remove" class-name="filter-item" name type="text" @click="deleteInfo(row.id)" style="pading: 5px" />
|
|
|
+ <!-- </el-dropdown-item> -->
|
|
|
+ <!-- <el-dropdown-item :divided=true > -->
|
|
|
+ <PermissionButton menu-code="_views_item_transfer" class-name="filter-item" name type="text" @click="transfer(row)" style="pading: 5px" />
|
|
|
+ <!-- </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
+ </el-dropdown>-->
|
|
|
+ <PermissionButton menu-code="_views_item_add_finance_invoice" class-name="filter-item" name type="text" @click="openFinanceInvoiceDialog(row.orderFundId, row.id)" style="pading: 5px" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</parentTable>
|
|
@@ -196,9 +197,8 @@
|
|
|
<el-option v-for="(item, index) in managers" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
<el-tooltip class="item" effect="dark" content="点击转交" placement="bottom-start">
|
|
|
- <el-button type="success" icon="el-icon-check" circle style="margin-left: 20px;" placeholder="转交"
|
|
|
- @click="saveManager"></el-button>
|
|
|
- </el-tooltip>
|
|
|
+ <el-button type="success" icon="el-icon-check" circle style="margin-left: 20px;" placeholder="转交" @click="saveManager"></el-button>
|
|
|
+ </el-tooltip>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="状态">{{ detail.itemStatus }}</el-descriptions-item>
|
|
|
<el-descriptions-item label="当前阶段">{{ computedStageName(detail.stageName) }}</el-descriptions-item>
|
|
@@ -212,11 +212,21 @@
|
|
|
<el-timeline-item v-for="item in historys" :key="item.id" :timestamp="item.created" placement="top">
|
|
|
<el-card>
|
|
|
<el-descriptions :column="3" border>
|
|
|
- <el-descriptions-item label="前客户经理"><el-tag type="info">{{ item.originalUserName
|
|
|
- }}</el-tag></el-descriptions-item>
|
|
|
- <el-descriptions-item label="后客户经理"><el-tag type="success">{{ item.currentUserName
|
|
|
- }}</el-tag></el-descriptions-item>
|
|
|
- <el-descriptions-item label="操作人"><el-tag>{{ item.operatorName }}</el-tag></el-descriptions-item>
|
|
|
+ <el-descriptions-item label="前客户经理">
|
|
|
+ <el-tag type="info">
|
|
|
+ {{ item.originalUserName
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="后客户经理">
|
|
|
+ <el-tag type="success">
|
|
|
+ {{ item.currentUserName
|
|
|
+ }}
|
|
|
+ </el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="操作人">
|
|
|
+ <el-tag>{{ item.operatorName }}</el-tag>
|
|
|
+ </el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-timeline-item>
|
|
@@ -225,6 +235,111 @@
|
|
|
</el-collapse>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :visible.sync="makeInvoiceListDialog" width="90%" center custom-class="doWarehouseClass" @close="searchList()">
|
|
|
+ <el-button type="danger" round @click="openNewInvoiceDialog()">新增开票</el-button>
|
|
|
+ <div style="margin-top:30px;">
|
|
|
+ <el-table :data="invoiceData" stripe :header-row-style="{ color: '#333333', 'font-size': '14px' }" border style="width: 100%; margin-top:20px;font-size: 14px;">
|
|
|
+ <el-table-column align="center" prop="title" label="发票抬头" width="180"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="taxNo" label="税号" width="180"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="type" label="发票类型"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="state" label="开票状态">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span :style="stateStyle(row.state)">{{ row.state }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" prop="planAmount" label="计划开票金额"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="planMakeDate" label="计划开票日期"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="realAmount" label="实际开票金额"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="realMakeDate" label="实际开票日期"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="reason" label="驳回/作废原因"></el-table-column>
|
|
|
+ <el-table-column align="center" prop="remark" label="备注"></el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" width="200" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button :disabled="row.state != '审核中'" @click="invoiceDetail(row.id)" type="text" size="small">修改</el-button>
|
|
|
+ <el-button :disabled="row.state != '已开票'" @click="cancellation(row.id)" type="text" size="small">申请作废</el-button>
|
|
|
+ <el-button @click="copyInvoice(row)" type="text" size="small">复制</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog :visible.sync="newInvoiceDialog" width="55%" top="10vh" center custom-class="doWarehouseClass" @closed="cleanFinanceInvoiceForm">
|
|
|
+ <el-form ref="invoice" :model="invoice">
|
|
|
+ <el-divider content-position="left">开票信息</el-divider>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="发票抬头:" :rules="{ required: true, message: '发票抬头不能为空', trigger: 'blur' }" prop="title" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.title" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="发票类型:" :rules="{ required: true, message: '发票类型不能为空', trigger: 'blur' }" prop="type" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-select v-model="invoice.type" style="width:100%">
|
|
|
+ <el-option label="普票" value="普票"></el-option>
|
|
|
+ <el-option label="专票" value="专票"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="税号:" :rules="{ required: true, message: '税号不能为空', trigger: 'blur' }" prop="taxNo" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.taxNo" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="计划开票日期:" prop="planMakeDate" :rules="{ required: true, message: '计划开票日期不能为空', trigger: 'blur' }" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-date-picker v-model="invoice.planMakeDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width:100%"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="待开金额(元):" prop="planAmount" :rules="{ required: true, message: '使用权面积不能为空', trigger: 'blur' }" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input-number :precision="2" :min="0" :value-on-clear="0" v-model.number="invoice.planAmount" type="number" style="width:100%" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="是否收款:" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-radio-group :value="invoice.realPayAmount ? '已收款' : '未收款'">
|
|
|
+ <el-radio label="已收款"></el-radio>
|
|
|
+ <el-radio label="未收款"></el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="开票项目:" prop="makeItem" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.makeItem" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="项目数量:" prop="itemQuantity" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.itemQuantity" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12" :span="6">
|
|
|
+ <el-form-item label="计量单位:" prop="itemUnit" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.itemUnit" class="filter-item" placeholder="个/套/箱/次/斤/公斤/..." />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="24" :span="6">
|
|
|
+ <el-form-item label="备注:" prop="remark" label-width="140px" class="postInfo-container-item">
|
|
|
+ <el-input v-model.trim="invoice.remark" type="textarea" :autosize="{ minRows: 5, maxRows: 8 }" class="filter-item" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="newInvoiceDialog = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="saveInvoice()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -270,59 +385,80 @@ export default {
|
|
|
historys: [],
|
|
|
managers: [],
|
|
|
multipleSelection: [],
|
|
|
- manySelect:false
|
|
|
+ manySelect: false,
|
|
|
+ makeInvoiceListDialog: false,
|
|
|
+ newInvoiceDialog: false,
|
|
|
+ invoiceData: [],
|
|
|
+ invoice: {
|
|
|
+ id: null,
|
|
|
+ orderFundId: null,
|
|
|
+ productionFundId: null,
|
|
|
+ title: null,
|
|
|
+ type: null,
|
|
|
+ taxNo: null,
|
|
|
+ planAmount: null,
|
|
|
+ planMakeDate: null,
|
|
|
+ bankName: null,
|
|
|
+ bankAccount: null,
|
|
|
+ bankAddress: null,
|
|
|
+ bankTel: null,
|
|
|
+ makeItem: null,
|
|
|
+ itemQuantity: null,
|
|
|
+ itemUnit: null,
|
|
|
+ taxRate: null,
|
|
|
+ taxAmount: null,
|
|
|
+ remark: null,
|
|
|
+ realPayAmount: null,
|
|
|
+ realAmount: null,
|
|
|
+ realMakeDate: null,
|
|
|
+ itemId: null,
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- const that = this;
|
|
|
+ const that = this
|
|
|
if (that.$route.query.state) {
|
|
|
- that.listQuery.state = that.$route.query.state;
|
|
|
+ that.listQuery.state = that.$route.query.state
|
|
|
}
|
|
|
if (that.$route.query.isCurYear) {
|
|
|
- that.listQuery.isCurYear = that.$route.query.isCurYear;
|
|
|
+ that.listQuery.isCurYear = that.$route.query.isCurYear
|
|
|
}
|
|
|
if (that.$route.query.name) {
|
|
|
- that.listQuery.name = that.$route.query.name;
|
|
|
+ that.listQuery.name = that.$route.query.name
|
|
|
}
|
|
|
if (that.$route.query.current && !isNaN(that.$route.query.current)) {
|
|
|
- that.listQuery.current = parseInt(that.$route.query.current);
|
|
|
+ that.listQuery.current = parseInt(that.$route.query.current)
|
|
|
}
|
|
|
if (that.$route.query.cate) {
|
|
|
- that.listQuery.cate = parseInt(that.$route.query.cate);
|
|
|
+ that.listQuery.cate = parseInt(that.$route.query.cate)
|
|
|
}
|
|
|
if (that.$route.query.clientManager) {
|
|
|
- that.listQuery.clientManager = that.$route.query.clientManager;
|
|
|
+ that.listQuery.clientManager = that.$route.query.clientManager
|
|
|
}
|
|
|
- that.getList();
|
|
|
- that.getCateList();
|
|
|
+ that.getList()
|
|
|
+ that.getCateList()
|
|
|
},
|
|
|
methods: {
|
|
|
itemExport() {
|
|
|
- this.$utils.exportUtil(
|
|
|
- "/item/export", this.listQuery,
|
|
|
- "导出"
|
|
|
- );
|
|
|
+ this.$utils.exportUtil('/item/export', this.listQuery, '导出')
|
|
|
},
|
|
|
itemMineExport() {
|
|
|
- this.$utils.exportUtil(
|
|
|
- "/item/mine/export", this.listQuery,
|
|
|
- "导出"
|
|
|
- );
|
|
|
+ this.$utils.exportUtil('/item/mine/export', this.listQuery, '导出')
|
|
|
},
|
|
|
getCateList() {
|
|
|
- this.$api.dictData.simpleType("项目类型").then(res => {
|
|
|
+ this.$api.dictData.simpleType('项目类型').then((res) => {
|
|
|
this.cateList = res.data
|
|
|
})
|
|
|
},
|
|
|
downloadContract(url) {
|
|
|
- var a = document.createElement('a');
|
|
|
- var event = new MouseEvent('click');
|
|
|
- a.download = url;
|
|
|
- a.href = url;//路径前拼上前缀,完整路径
|
|
|
- a.dispatchEvent(event);
|
|
|
+ var a = document.createElement('a')
|
|
|
+ var event = new MouseEvent('click')
|
|
|
+ a.download = url
|
|
|
+ a.href = url //路径前拼上前缀,完整路径
|
|
|
+ a.dispatchEvent(event)
|
|
|
},
|
|
|
resetSearch() {
|
|
|
- this.$router.push({ query: {} });
|
|
|
+ this.$router.push({ query: {} })
|
|
|
this.listQuery = {
|
|
|
current: 1,
|
|
|
size: 10,
|
|
@@ -333,9 +469,9 @@ export default {
|
|
|
},
|
|
|
computedStageName(val) {
|
|
|
if (val === null || val === undefined || val === '') {
|
|
|
- return "无";
|
|
|
+ return '无'
|
|
|
} else {
|
|
|
- return val;
|
|
|
+ return val
|
|
|
}
|
|
|
},
|
|
|
removeHandle(row) {
|
|
@@ -369,36 +505,42 @@ export default {
|
|
|
this.getList()
|
|
|
},
|
|
|
getList() {
|
|
|
- const that = this;
|
|
|
- this.listLoading = true;
|
|
|
- const key = {};
|
|
|
+ const that = this
|
|
|
+ this.listLoading = true
|
|
|
+ const key = {}
|
|
|
if (this.$router.currentRoute.path === '/item/list/mine') {
|
|
|
- this.$api.item.mine(Object.assign({}, that.listQuery, key)).then((res) => {
|
|
|
- that.pageData = res.data;
|
|
|
- setTimeout(() => {
|
|
|
- that.listLoading = false
|
|
|
- }, 200)
|
|
|
- })
|
|
|
+ this.$api.item
|
|
|
+ .mine(Object.assign({}, that.listQuery, key))
|
|
|
+ .then((res) => {
|
|
|
+ that.pageData = res.data
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
that.listLoading = false
|
|
|
})
|
|
|
} else if (this.$router.currentRoute.path === '/item/list/me') {
|
|
|
- this.$api.item.me(Object.assign({}, that.listQuery, key)).then((res) => {
|
|
|
- that.pageData = res.data;
|
|
|
- setTimeout(() => {
|
|
|
- that.listLoading = false
|
|
|
- }, 200)
|
|
|
- })
|
|
|
+ this.$api.item
|
|
|
+ .me(Object.assign({}, that.listQuery, key))
|
|
|
+ .then((res) => {
|
|
|
+ that.pageData = res.data
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
that.listLoading = false
|
|
|
})
|
|
|
} else {
|
|
|
- this.$api.item.list(Object.assign({}, that.listQuery, key)).then((res) => {
|
|
|
- that.pageData = res.data
|
|
|
- setTimeout(() => {
|
|
|
- that.listLoading = false
|
|
|
- }, 200)
|
|
|
- })
|
|
|
+ this.$api.item
|
|
|
+ .list(Object.assign({}, that.listQuery, key))
|
|
|
+ .then((res) => {
|
|
|
+ that.pageData = res.data
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ })
|
|
|
.catch(() => {
|
|
|
that.listLoading = false
|
|
|
})
|
|
@@ -406,109 +548,260 @@ export default {
|
|
|
},
|
|
|
deleteInfo(id) {
|
|
|
const that = this
|
|
|
- that.$confirm('请确认是否删除该数据?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning',
|
|
|
- center: true
|
|
|
- }).then(() => {
|
|
|
- that.$api.item.delete(id).then(data => {
|
|
|
- that.loading = false
|
|
|
- if (data.code === 200) {
|
|
|
- that.getList()
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- type: 'error',
|
|
|
- message: data.msg
|
|
|
- })
|
|
|
- }
|
|
|
+ that
|
|
|
+ .$confirm('请确认是否删除该数据?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true,
|
|
|
})
|
|
|
- }).catch(() => {
|
|
|
- })
|
|
|
+ .then(() => {
|
|
|
+ that.$api.item.delete(id).then((data) => {
|
|
|
+ that.loading = false
|
|
|
+ if (data.code === 200) {
|
|
|
+ that.getList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: data.msg,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
|
transfer(row) {
|
|
|
- const originalUserId = row.userId;
|
|
|
- this.dialogFormVisible = true;
|
|
|
- this.detail = row;
|
|
|
- this.detail.originalUserId = originalUserId;
|
|
|
- this.getHistroyList(row.id);
|
|
|
- this.getManagers();
|
|
|
-
|
|
|
+ const originalUserId = row.userId
|
|
|
+ this.dialogFormVisible = true
|
|
|
+ this.detail = row
|
|
|
+ this.detail.originalUserId = originalUserId
|
|
|
+ this.getHistroyList(row.id)
|
|
|
+ this.getManagers()
|
|
|
},
|
|
|
getManagers() {
|
|
|
- this.$api.user.usersByDepartment("市场部").then(res => {
|
|
|
+ this.$api.user.usersByDepartment('市场部').then((res) => {
|
|
|
this.managers = res.data
|
|
|
})
|
|
|
},
|
|
|
saveManager() {
|
|
|
- if (this.detail.userId === this.detail.originalUserId){
|
|
|
+ if (this.detail.userId === this.detail.originalUserId) {
|
|
|
this.$message({
|
|
|
- type: 'error',
|
|
|
- message: '抱歉,不能转交给本人。'
|
|
|
- });
|
|
|
- return ;
|
|
|
+ type: 'error',
|
|
|
+ message: '抱歉,不能转交给本人。',
|
|
|
+ })
|
|
|
+ return
|
|
|
}
|
|
|
- this.$api.item.changeManager(this.detail).then(res => {
|
|
|
+ this.$api.item.changeManager(this.detail).then((res) => {
|
|
|
if (res.code === 200 && res.data === true) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
- message: '转交成功'
|
|
|
- });
|
|
|
- this.getHistroyList(this.detail.id);
|
|
|
+ message: '转交成功',
|
|
|
+ })
|
|
|
+ this.getHistroyList(this.detail.id)
|
|
|
}
|
|
|
- }
|
|
|
- );
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- getHistroyList(id){
|
|
|
- this.$api.resourceTransfer.history({"resourceType":"ITEM","resourceId":id}).then(res=>{
|
|
|
- if (res.code === 200){
|
|
|
- this.historys = res.data;
|
|
|
+ getHistroyList(id) {
|
|
|
+ this.$api.resourceTransfer.history({ resourceType: 'ITEM', resourceId: id }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.historys = res.data
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
- this.multipleSelection = [];
|
|
|
- for ( let v in val){
|
|
|
- this.multipleSelection.push(val[v].id)
|
|
|
- }
|
|
|
- },
|
|
|
- editBusinessState(){
|
|
|
- this.manySelect = !this.manySelect
|
|
|
+ this.multipleSelection = []
|
|
|
+ for (let v in val) {
|
|
|
+ this.multipleSelection.push(val[v].id)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ editBusinessState() {
|
|
|
+ this.manySelect = !this.manySelect
|
|
|
},
|
|
|
- toUpdateState(state){
|
|
|
+ toUpdateState(state) {
|
|
|
this.$confirm('请确认是否修改这些项目的状态?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
- center: true
|
|
|
+ center: true,
|
|
|
}).then(() => {
|
|
|
- let ids = this.multipleSelection;
|
|
|
- if (ids.length>0){
|
|
|
- this.$api.item.updateState({"ids":ids,"state":state}).then(res=>{
|
|
|
- if (res.code === 200){
|
|
|
- this.$message({
|
|
|
+ let ids = this.multipleSelection
|
|
|
+ if (ids.length > 0) {
|
|
|
+ this.$api.item.updateState({ ids: ids, state: state }).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '项目状态更新成功',
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'danger',
|
|
|
+ message: '项目状态更新失败',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请选择需要修改的项目',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openFinanceInvoiceDialog(orderFundId, itemId) {
|
|
|
+ console.log(orderFundId)
|
|
|
+ this.invoiceData = []
|
|
|
+ this.makeInvoiceListDialog = true
|
|
|
+ this.invoice.orderFundId = orderFundId
|
|
|
+ this.invoice.itemId = itemId
|
|
|
+ if (orderFundId) {
|
|
|
+ this.getFinanceInvoiceList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getFinanceInvoiceList() {
|
|
|
+ this.$api.financeInvoice.getList(this.invoice.orderFundId, null).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.invoiceData = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openNewInvoiceDialog() {
|
|
|
+ this.invoice.id = null
|
|
|
+ this.newInvoiceDialog = true
|
|
|
+ },
|
|
|
+ saveInvoice() {
|
|
|
+ this.$refs.invoice.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.invoice.id) {
|
|
|
+ this.$api.financeInvoice.edit(this.invoice).then((res) => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '开票申请修改成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ this.getFinanceInvoiceList()
|
|
|
+ this.newInvoiceDialog = false
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '开票申请修改失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$api.financeInvoice.itemAdd(this.invoice).then((res) => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.invoice.orderFundId = res.data;
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '开票申请提交成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ this.getFinanceInvoiceList()
|
|
|
+ this.newInvoiceDialog = false
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '开票申请提交失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ invoiceDetail(id) {
|
|
|
+ this.$api.financeInvoice.detail(id).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.invoice = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.newInvoiceDialog = true
|
|
|
+ },
|
|
|
+ cancellation(id) {
|
|
|
+ this.$prompt('作废原因:', '已开发票作废', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(({ value }) => {
|
|
|
+ this.invoice.reason = value
|
|
|
+ this.invoice.id = id
|
|
|
+ this.$api.financeInvoice.cancellation(this.invoice).then((res) => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '作废申请已提交',
|
|
|
type: 'success',
|
|
|
- message: '项目状态更新成功'
|
|
|
- });
|
|
|
- this.getList();
|
|
|
- }else {
|
|
|
- this.$message({
|
|
|
- type: 'danger',
|
|
|
- message: '项目状态更新失败'
|
|
|
- });
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
+ this.getFinanceInvoiceList()
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '作废提交失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000,
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
- }else{
|
|
|
- this.$message({
|
|
|
- type: 'warning',
|
|
|
- message: '请选择需要修改的项目'
|
|
|
- });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ cleanFinanceInvoiceForm() {
|
|
|
+ this.$refs.invoice.resetFields()
|
|
|
+ this.invoice = {
|
|
|
+ id: null,
|
|
|
+ orderFundId: this.invoice.orderFundId,
|
|
|
+ productionFundId: this.invoice.productionFundId,
|
|
|
+ title: null,
|
|
|
+ type: null,
|
|
|
+ taxNo: null,
|
|
|
+ planAmount: null,
|
|
|
+ planMakeDate: null,
|
|
|
+ bankName: null,
|
|
|
+ bankAccount: null,
|
|
|
+ bankAddress: null,
|
|
|
+ bankTel: null,
|
|
|
+ makeItem: null,
|
|
|
+ itemQuantity: null,
|
|
|
+ itemUnit: null,
|
|
|
+ taxRate: null,
|
|
|
+ taxAmount: null,
|
|
|
+ remark: null,
|
|
|
}
|
|
|
- }
|
|
|
- )},
|
|
|
+ },
|
|
|
+ // 获取部门下拉列表
|
|
|
+ getAllotDepartment() {
|
|
|
+ this.$api.department.allot('ASSET_BUSINESS').then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.allotDepartment = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ copyInvoice(row) {
|
|
|
+ this.invoice = row
|
|
|
+ this.invoice.id = null
|
|
|
+ this.invoice.state = null
|
|
|
+ this.invoice.reason = null
|
|
|
+ this.invoice.created = null
|
|
|
+ this.invoice.modified = null
|
|
|
+ this.newInvoiceDialog = true
|
|
|
+ },
|
|
|
+ stateStyle(state) {
|
|
|
+ if (state === '已开票') {
|
|
|
+ return 'color:green'
|
|
|
+ } else {
|
|
|
+ return 'color:red'
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
-
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|