index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <!-- <el-form-item label="填报单位" prop="deptName">
  5. <el-input v-model="queryParams.deptName" placeholder="请输入填报单位" clearable size="small" @keyup.enter.native="handleQuery" />
  6. </el-form-item> -->
  7. <el-form-item label="项目名称" prop="name">
  8. <el-input v-model="queryParams.name" placeholder="请输入项目名称" clearable size="small" @keyup.enter.native="handleQuery" />
  9. </el-form-item>
  10. <el-form-item label="填报单位" prop="name">
  11. <el-input v-model="queryParams.deptName" placeholder="请输入填报单位" clearable size="small" @keyup.enter.native="handleQuery" />
  12. </el-form-item>
  13. <el-form-item label="填报日期" prop="addtime">
  14. <el-date-picker value-format="yyyy-MM-dd" @change="tiemsChange" v-model="times" type="daterange"
  15. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  16. </el-date-picker>
  17. </el-form-item>
  18. <el-form-item label="状态" prop="projectStatus">
  19. <el-select v-model="queryParams.projectStatus" placeholder="请选择状态" clearable size="small">
  20. <el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item>
  24. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  25. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  26. </el-form-item>
  27. </el-form>
  28. <el-row :gutter="10" class="mb8">
  29. <el-col :span="1.5">
  30. <el-button type="primary" plain style="background-color: #1C84C6;color: #fff;border: none;" size="mini" @click="handleAdd"
  31. v-hasPermi="['bmProject:project:add']">添加线索</el-button>
  32. </el-col>
  33. <!-- <el-col :span="1.5">
  34. <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
  35. v-hasPermi="['projectInfo:info:edit']">修改</el-button>
  36. </el-col> -->
  37. <el-col :span="1.5">
  38. <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
  39. v-hasPermi="['bmProject:project:remove']">销号</el-button>
  40. </el-col>
  41. <!-- <el-col :span="1.5">
  42. <el-button
  43. type="warning"
  44. plain
  45. icon="el-icon-download"
  46. size="mini"
  47. @click="handleExport"
  48. v-hasPermi="['projectInfo:info:export']"
  49. >导出</el-button>
  50. </el-col> -->
  51. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  52. </el-row>
  53. <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
  54. <el-table-column type="selection" width="55" align="center" />
  55. <el-table-column label="项目名称" align="center" prop="name" />
  56. <el-table-column label="总投资金额(万)" align="center" prop="totAmt" />
  57. <el-table-column label="填报单位" align="center" prop="deptName" />
  58. <el-table-column label="审核情况" align="center">
  59. <template slot-scope="scope">
  60. <div v-html="scope.row.remark"></div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="状态" align="center" prop="dictLabel" />
  64. <el-table-column label="填报日期" width="180" align="center" prop="createTime" />
  65. <el-table-column label="操作" width="280" align="center" class-name="small-padding fixed-width">
  66. <template slot-scope="scope">
  67. <el-button size="mini" type="text" style="background: #0669B2;color: #FFF;padding: 7px;" v-hasPermi="['bmProject:project:query']"
  68. @click="chei(scope.row)">查看和编辑</el-button>
  69. <el-button size="mini" type="text" style="background: #00B034;color: #FFF;padding: 7px;" v-hasPermi="['bmProject:project:pass']" v-if="scope.row.projectStatus%2==0"
  70. @click="getPass(scope.row)">审核</el-button>
  71. <el-button size="mini" type="text" style="background: #3FBCEF;color: #FFF;padding: 7px;" v-hasPermi="['bmProject:project:examine']"
  72. @click="infoBtn(scope.row)" v-if="scope.row.projectStatus%2==1">提交</el-button>
  73. <el-button size="mini" type="text" style="background: #3FBCEF;color: #FFF;padding: 7px;" v-hasPermi="['bmProject:project:reject']"
  74. @click="infoBtn(scope.row)" v-if="scope.row.projectStatus%2==0">驳回</el-button>
  75. <!-- <el-button size="mini" type="text" style="background: #F5A40C;color: #FFF;padding: 7px;" v-hasPermi="['bmProject:project:edit']">修改</el-button> -->
  76. <el-button size="mini" type="text" style="background: #DE1939;color: #FFF;padding: 7px;" @click="handleDelete(scope.row)"
  77. v-hasPermi="['bmProject:project:remove']">销号</el-button>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  82. @pagination="getList" />
  83. <el-dialog :close-on-click-modal="false" title="添加线索" :visible.sync="flags" append-to-body>
  84. <el-form ref="forms" :model="xs_form" :rules="xs_rules" label-width="100px">
  85. <el-form-item label="名称:" prop="name">
  86. <el-input v-model="xs_form.name" placeholder="请输入项目名称" />
  87. </el-form-item>
  88. <el-form-item label="产品类别:" prop="industryCategory">
  89. <el-checkbox-group v-model="xs_form.industryCategory">
  90. <el-checkbox label="首位产业" name="type"></el-checkbox>
  91. <el-checkbox label="战略新兴" name="type"></el-checkbox>
  92. </el-checkbox-group>
  93. </el-form-item>
  94. <el-form-item label="所属行业:" prop="industry">
  95. <el-row>
  96. <el-col :span="4" style="font-weight: bold;">
  97. 工业项目
  98. </el-col>
  99. <el-col :span="20">
  100. <el-radio-group v-model="xs_form.industry">
  101. <el-radio :label="item.dictValue" v-for="(item,index) in industryOptions.filter(res => {
  102. if(res.dictValue.substring(0,1) == '1'){
  103. return res
  104. }
  105. })" :key="index">
  106. {{item.dictLabel}}
  107. </el-radio>
  108. </el-radio-group>
  109. </el-col>
  110. </el-row>
  111. <el-row>
  112. <el-col :span="4" style="font-weight: bold;">
  113. 服务业项目
  114. </el-col>
  115. <el-col :span="20">
  116. <el-radio-group v-model="xs_form.industry">
  117. <el-radio :label="item.dictValue" v-for="(item,index) in industryOptions.filter(res => {
  118. if(res.dictValue.substring(0,1) == '2'){
  119. return res
  120. }
  121. })" :key="index">
  122. {{item.dictLabel}}
  123. </el-radio>
  124. </el-radio-group>
  125. </el-col>
  126. </el-row>
  127. <el-row>
  128. <el-col :span="4" style="font-weight: bold;">
  129. 总部经济项目
  130. </el-col>
  131. <el-col :span="20">
  132. <el-radio-group v-model="xs_form.industry">
  133. <el-radio :label="item.dictValue" v-for="(item,index) in industryOptions.filter(res => {
  134. if(res.dictValue.substring(0,1) == '3'){
  135. return res
  136. }
  137. })" :key="index">
  138. {{item.dictLabel}}
  139. </el-radio>
  140. </el-radio-group>
  141. </el-col>
  142. </el-row>
  143. </el-form-item>
  144. <el-form-item label="是否返乡:" prop="isBackbussiness">
  145. <el-select v-model="xs_form.isBackbussiness" placeholder="请选择状态" clearable size="small">
  146. <el-option label="是" value="Y" />
  147. <el-option label="否" value="N" />
  148. </el-select>
  149. </el-form-item>
  150. </el-form>
  151. <div slot="footer" class="dialog-footer">
  152. <el-button type="primary" @click="xs_submit">确 定</el-button>
  153. <el-button @click="flags=false">取 消</el-button>
  154. </div>
  155. </el-dialog>
  156. <!-- 添加或修改项目-线索信息对话框 -->
  157. <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
  158. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  159. <el-form-item label="项目id*" prop="bmProjectId">
  160. <el-input v-model="form.bmProjectId" placeholder="请输入项目id*" />
  161. </el-form-item>
  162. <el-form-item label="项目名称*" prop="name">
  163. <el-input v-model="form.name" placeholder="请输入项目名称*" />
  164. </el-form-item>
  165. <el-form-item label="是否删除(0未删除、1已删除)" prop="isDel">
  166. <el-input v-model="form.isDel" placeholder="请输入是否删除(0未删除、1已删除)" />
  167. </el-form-item>
  168. <el-form-item label="投资方联系人*" prop="contactor">
  169. <el-input v-model="form.contactor" placeholder="请输入投资方联系人*" />
  170. </el-form-item>
  171. <el-form-item label="投资方联系方式*" prop="phone">
  172. <el-input v-model="form.phone" placeholder="请输入投资方联系方式*" />
  173. </el-form-item>
  174. <el-form-item label="预计投资额*" prop="needAmt">
  175. <el-input v-model="form.needAmt" placeholder="请输入预计投资额*" />
  176. </el-form-item>
  177. <el-form-item label="固定资产投资*" prop="fixedAssets">
  178. <el-input v-model="form.fixedAssets" placeholder="请输入固定资产投资*" />
  179. </el-form-item>
  180. <el-form-item label="产品名称*" prop="productName">
  181. <el-input v-model="form.productName" placeholder="请输入产品名称*" />
  182. </el-form-item>
  183. <el-form-item label="设计产能*" prop="productQty">
  184. <el-input v-model="form.productQty" placeholder="请输入设计产能*" />
  185. </el-form-item>
  186. <el-form-item label="预计产值*" prop="productPrice">
  187. <el-input v-model="form.productPrice" placeholder="请输入预计产值*" />
  188. </el-form-item>
  189. <el-form-item label="预计税收*" prop="productTax">
  190. <el-input v-model="form.productTax" placeholder="请输入预计税收*" />
  191. </el-form-item>
  192. <el-form-item label="预计用工*" prop="productEmp">
  193. <el-input v-model="form.productEmp" placeholder="请输入预计用工*" />
  194. </el-form-item>
  195. <el-form-item label="项目计划用地" prop="plannedLand">
  196. <el-input v-model="form.plannedLand" placeholder="请输入项目计划用地" />
  197. </el-form-item>
  198. <el-form-item label="独立供地" prop="independentLand">
  199. <el-input v-model="form.independentLand" placeholder="请输入独立供地" />
  200. </el-form-item>
  201. <el-form-item label="流转土地" prop="circulationLan">
  202. <el-input v-model="form.circulationLan" placeholder="请输入流转土地" />
  203. </el-form-item>
  204. <el-form-item label="计划租赁用房" prop="needRoom">
  205. <el-input v-model="form.needRoom" placeholder="请输入计划租赁用房" />
  206. </el-form-item>
  207. <el-form-item label="计划租赁厂房" prop="needFactoryRoom">
  208. <el-input v-model="form.needFactoryRoom" placeholder="请输入计划租赁厂房" />
  209. </el-form-item>
  210. <el-form-item label="计划租赁办公生活用房" prop="needBusRoom">
  211. <el-input v-model="form.needBusRoom" placeholder="请输入计划租赁办公生活用房" />
  212. </el-form-item>
  213. <el-form-item label="其他需求" prop="other">
  214. <el-input v-model="form.other" placeholder="请输入其他需求" />
  215. </el-form-item>
  216. <el-form-item label="拟落户地点*" prop="address">
  217. <el-input v-model="form.address" placeholder="请输入拟落户地点*" />
  218. </el-form-item>
  219. <el-form-item label="是否签订框架协议* Y/N" prop="isFrameorder">
  220. <el-input v-model="form.isFrameorder" placeholder="请输入是否签订框架协议* Y/N" />
  221. </el-form-item>
  222. <el-form-item label="框架协议附件url(框架协议为是,需要上传)" prop="attachment">
  223. <el-input v-model="form.attachment" type="textarea" placeholder="请输入内容" />
  224. </el-form-item>
  225. <el-form-item label="备注" prop="description">
  226. <el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
  227. </el-form-item>
  228. </el-form>
  229. <div slot="footer" class="dialog-footer">
  230. <el-button type="primary" @click="submitForm">确 定</el-button>
  231. <el-button @click="cancel">取 消</el-button>
  232. </div>
  233. </el-dialog>
  234. </div>
  235. </template>
  236. <script>
  237. import {
  238. setReject,
  239. setExamine,
  240. listInfo,
  241. getInfo,
  242. delInfo,
  243. addInfo,
  244. updateInfo,
  245. listProject,
  246. setPass,
  247. exportInfo
  248. } from "@/api/projectInfo/info";
  249. import { listDept } from '@/api/system/dept'
  250. let vm = ''
  251. export default {
  252. name: "Info",
  253. components: {},
  254. data() {
  255. vm = this
  256. return {
  257. xs_form: {
  258. industryCategory: []
  259. },
  260. flags: false,
  261. xs_rules: {
  262. name: [{
  263. required: true,
  264. message: "名称不能为空",
  265. trigger: "blur"
  266. }],
  267. industryCategory: [{
  268. required: true,
  269. message: "请选择产品类别",
  270. trigger: "blur"
  271. }],
  272. industry: [{
  273. required: true,
  274. message: "请选择所属行业",
  275. trigger: "blur"
  276. }],
  277. isBackbussiness: [{
  278. required: true,
  279. message: "状态不能为空",
  280. trigger: "blur"
  281. }],
  282. },
  283. times: '',
  284. industryOptions: [],
  285. statusOptions: [],
  286. // 遮罩层
  287. loading: true,
  288. // 选中数组
  289. ids: [],
  290. // 非单个禁用
  291. single: true,
  292. // 非多个禁用
  293. multiple: true,
  294. // 显示搜索条件
  295. showSearch: true,
  296. // 总条数
  297. total: 0,
  298. // 项目-线索信息表格数据
  299. infoList: [],
  300. // 弹出层标题
  301. title: "",
  302. // 是否显示弹出层
  303. open: false,
  304. // 查询参数
  305. queryParams: {
  306. pageNum: 1,
  307. pageSize: 10,
  308. bmProjectId: null,
  309. name: null,
  310. isDel: null,
  311. contactor: null,
  312. phone: null,
  313. needAmt: null,
  314. fixedAssets: null,
  315. productName: null,
  316. productQty: null,
  317. productPrice: null,
  318. productTax: null,
  319. productEmp: null,
  320. plannedLand: null,
  321. independentLand: null,
  322. circulationLan: null,
  323. needRoom: null,
  324. needFactoryRoom: null,
  325. needBusRoom: null,
  326. other: null,
  327. address: null,
  328. isFrameorder: null,
  329. attachment: null,
  330. description: null,
  331. deptName: undefined,
  332. deptList: []
  333. },
  334. // 表单参数
  335. form: {},
  336. // 表单校验
  337. rules: {}
  338. };
  339. },
  340. created() {
  341. this.getDicts('project_status').then(res => {
  342. this.statusOptions = res.data
  343. })
  344. this.getDicts('project_industry').then(res => {
  345. this.industryOptions = res.data
  346. })
  347. this.getList();
  348. },
  349. filters: {
  350. dictStatus(e) {
  351. let is = ''
  352. for (let item of vm.statusOptions) {
  353. if (e == item.dictValue) {
  354. is = item.dictLabel
  355. }
  356. }
  357. return is
  358. }
  359. },
  360. methods: {
  361. getPass(row) {
  362. const _this = this
  363. this.$confirm('是否提交通过', "提醒", {
  364. confirmButtonText: "确定",
  365. cancelButtonText: "取消",
  366. type: "warning"
  367. }).then(function() {
  368. return setPass({
  369. code: 3,
  370. bmProjectId: row.id,
  371. })
  372. }).then(() => {
  373. _this.getList();
  374. _this.msgSuccess("提交成功");
  375. })
  376. },
  377. infoBtn(scrop) {
  378. const _this = this
  379. if (scrop.projectStatus % 2 == 1) {
  380. this.$confirm('是否确认提交审核', "提醒", {
  381. confirmButtonText: "确定",
  382. cancelButtonText: "取消",
  383. type: "warning"
  384. }).then(function() {
  385. return setExamine({
  386. code: 1,
  387. bmProjectId: scrop.id
  388. });
  389. }).then(() => {
  390. _this.getList();
  391. _this.msgSuccess("提交成功");
  392. })
  393. } else {
  394. this.$prompt("请输入驳回意见", "提醒", {
  395. confirmButtonText: "确定",
  396. cancelButtonText: "取消",
  397. type: "warning",
  398. })
  399. .then(function({ value }) {
  400. return setReject({
  401. code: 2,
  402. bmProjectId: scrop.id,
  403. remark:value
  404. });
  405. })
  406. .then(({ value }) => {
  407. _this.msgSuccess("驳回成功");
  408. _this.getList();
  409. });
  410. }
  411. },
  412. xs_submit() {
  413. this.$refs["forms"].validate(valid => {
  414. if (valid) {
  415. let data = JSON.parse(JSON.stringify(this.xs_form))
  416. data.industryCategory = data.industryCategory.join(',')
  417. listProject(data).then(res => {
  418. this.msgSuccess("添加成功");
  419. this.flags = false;
  420. this.getList();
  421. this.chei(res.data)
  422. })
  423. }
  424. });
  425. },
  426. tiemsChange(e) {
  427. console.log(e, this.times)
  428. if (this.times) {
  429. this.queryParams.beginTime = this.times[0]
  430. this.queryParams.endTime = this.times[1]
  431. } else {
  432. this.queryParams.beginTime = ''
  433. this.queryParams.endTime = ''
  434. }
  435. },
  436. /** 查询项目-线索信息列表 */
  437. getList() {
  438. this.loading = true;
  439. listInfo(this.queryParams).then(response => {
  440. this.infoList = response.rows;
  441. this.total = response.total;
  442. this.loading = false;
  443. });
  444. },
  445. // 取消按钮
  446. cancel() {
  447. this.open = false;
  448. this.reset();
  449. },
  450. // 表单重置
  451. reset() {
  452. this.form = {
  453. id: null,
  454. bmProjectId: null,
  455. createBy: null,
  456. createTime: null,
  457. updateBy: null,
  458. updateTime: null,
  459. name: null,
  460. isDel: null,
  461. contactor: null,
  462. phone: null,
  463. needAmt: null,
  464. fixedAssets: null,
  465. productName: null,
  466. productQty: null,
  467. productPrice: null,
  468. productTax: null,
  469. productEmp: null,
  470. plannedLand: null,
  471. independentLand: null,
  472. circulationLan: null,
  473. needRoom: null,
  474. needFactoryRoom: null,
  475. needBusRoom: null,
  476. other: null,
  477. address: null,
  478. isFrameorder: null,
  479. attachment: null,
  480. description: null,
  481. deptName: undefined,
  482. deptList: []
  483. };
  484. this.resetForm("form");
  485. },
  486. /** 搜索按钮操作 */
  487. handleQuery() {
  488. this.queryParams.pageNum = 1;
  489. listDept(this.queryParams).then(response => {
  490. if (response.data.length !== 0){
  491. for (var i = 0; i < response.data.length; i++) {
  492. this.queryParams.deptList.push(response.data[i].deptId)
  493. }
  494. }
  495. });
  496. this.getList();
  497. },
  498. /** 重置按钮操作 */
  499. resetQuery() {
  500. this.resetForm("queryForm");
  501. this.handleQuery();
  502. },
  503. // 多选框选中数据
  504. handleSelectionChange(selection) {
  505. this.ids = selection.map(item => item.id)
  506. this.single = selection.length !== 1
  507. this.multiple = !selection.length
  508. },
  509. /** 新增按钮操作 */
  510. handleAdd() {
  511. this.reset();
  512. this.flags = true;
  513. },
  514. /** 修改按钮操作 */
  515. handleUpdate(row) {
  516. this.reset();
  517. const id = row.id || this.ids
  518. getInfo(id).then(response => {
  519. this.form = response.data;
  520. this.open = true;
  521. this.title = "修改项目-线索信息";
  522. });
  523. },
  524. /** 提交按钮 */
  525. submitForm() {
  526. this.$refs["form"].validate(valid => {
  527. if (valid) {
  528. if (this.form.id != null) {
  529. updateInfo(this.form).then(response => {
  530. this.msgSuccess("修改成功");
  531. this.open = false;
  532. this.getList();
  533. });
  534. } else {
  535. addInfo(this.form).then(response => {
  536. this.msgSuccess("新增成功");
  537. this.open = false;
  538. this.getList();
  539. });
  540. }
  541. }
  542. });
  543. },
  544. /** 删除按钮操作 */
  545. handleDelete(row) {
  546. const ids = row.id || this.ids;
  547. this.$confirm('是否确认删除项目-线索信息"' + (row.name||this.ids) + '"的数据项?', "警告", {
  548. confirmButtonText: "确定",
  549. cancelButtonText: "取消",
  550. type: "warning"
  551. }).then(function() {
  552. return delInfo(ids);
  553. }).then(() => {
  554. this.getList();
  555. this.msgSuccess("删除成功");
  556. })
  557. },
  558. /** 导出按钮操作 */
  559. handleExport() {
  560. const queryParams = this.queryParams;
  561. this.$confirm('是否确认导出所有项目-线索信息数据项?', "警告", {
  562. confirmButtonText: "确定",
  563. cancelButtonText: "取消",
  564. type: "warning"
  565. }).then(function() {
  566. return exportInfo(queryParams);
  567. }).then(response => {
  568. this.download(response.msg);
  569. })
  570. },
  571. //查看
  572. chei(row) {
  573. this.$router.push({
  574. path: '/management/row/index',
  575. query: {
  576. setid: row.id,
  577. setrd: row.projectStatus
  578. },
  579. })
  580. }
  581. }
  582. };
  583. </script>
  584. <style lang="scss" scoped>
  585. .lab_box{
  586. }
  587. </style>