index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="部门" prop="deptName">
  5. <el-select v-model="form.deptName" @change="deptSelect" placeholder="请选择">
  6. <el-option v-for="(item, index) in deptList" :key="index" :label="item.deptName" :value="index">
  7. </el-option>
  8. </el-select>
  9. </el-form-item>
  10. <el-form-item>
  11. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  12. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  13. </el-form-item>
  14. </el-form>
  15. <el-row :gutter="10" class="mb8">
  16. <el-col :span="1.5">
  17. <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
  18. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:add']">新增</el-button>
  19. </el-col>
  20. <el-col :span="1.5">
  21. <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
  22. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']">修改</el-button>
  23. </el-col>
  24. <el-col :span="1.5">
  25. <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
  26. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']">删除</el-button>
  27. </el-col>
  28. <el-col :span="1.5">
  29. <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
  30. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:export']">导出</el-button>
  31. </el-col>
  32. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  33. </el-row>
  34. <el-table :data="ENTERPRISETRADEPERFORMANCEList" @selection-change="handleSelectionChange">
  35. <el-table-column type="selection" width="55" align="center" />
  36. <!-- <el-table-column label="企业贸易绩效数据" align="center" prop="id">
  37. </el-table-column> -->
  38. <!-- <el-table-column label="部门id" align="center" prop="deptId">
  39. </el-table-column> -->
  40. <el-table-column label="部门名称" align="center" prop="deptName">
  41. </el-table-column>
  42. <el-table-column label="规模以上工业产值" align="center" prop="gmysgycz">
  43. </el-table-column>
  44. <el-table-column label="固定资产投资" align="center" prop="gdzctz">
  45. </el-table-column>
  46. <el-table-column label="资产分类 " align="center" prop="zcfl">
  47. </el-table-column>
  48. <el-table-column label="主要贸易国家 " align="center" prop="zymygj">
  49. </el-table-column>
  50. <el-table-column label="电子账册分类 " align="center" prop="dzzcfl">
  51. </el-table-column>
  52. <el-table-column label="进、出口总值" align="center" prop="jckzz">
  53. </el-table-column>
  54. <el-table-column label="进口总值" align="center" prop="jkzz">
  55. </el-table-column>
  56. <el-table-column label="出口总值" align="center" prop="ckzz">
  57. </el-table-column>
  58. <el-table-column label="加工贸易进出口值 " align="center" prop="jgmyjckz">
  59. </el-table-column>
  60. <el-table-column label="物流货物进出口值 " align="center" prop="wlhwjckz">
  61. </el-table-column>
  62. <el-table-column label="一般贸易进出口值 " align="center" prop="ybmyjckz">
  63. </el-table-column>
  64. <el-table-column label="海关税收" align="center" prop="hgss">
  65. </el-table-column>
  66. <el-table-column label="税务部门税收" align="center" prop="swbmss">
  67. </el-table-column>
  68. <el-table-column label="期末企业从业人员" align="center" prop="qmqycyry">
  69. </el-table-column>
  70. <el-table-column label="实际使用外资金额" align="center" prop="sjsywzje">
  71. </el-table-column>
  72. <el-table-column label="维修业务进出口值 " align="center" prop="wxyejckz">
  73. </el-table-column>
  74. <el-table-column label="研发业务进出口值 " align="center" prop="yfywjckz">
  75. </el-table-column>
  76. <el-table-column label="租赁贸易进出口值 " align="center" prop="zlmyjckz">
  77. </el-table-column>
  78. <el-table-column label="跨境电商业务进出口值 " align="center" prop="kjdsywjckz">
  79. </el-table-column>
  80. <el-table-column label="创建时间" align="center" prop="createTime">
  81. </el-table-column>
  82. <el-table-column label="创建人" align="center" prop="createBy">
  83. </el-table-column>
  84. <el-table-column label="更新时间" align="center" prop="updateTime">
  85. </el-table-column>
  86. <el-table-column label="更新人" align="center" prop="updateBy">
  87. </el-table-column>
  88. <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width">
  89. <template slot-scope="scope">
  90. <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
  91. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:edit']">修改</el-button>
  92. <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
  93. v-hasPermi="['business:ENTERPRISETRADEPERFORMANCE:remove']">删除</el-button>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  98. @pagination="getList" />
  99. <!-- 添加或修改企业贸易绩效数据(每个月填报)对话框 -->
  100. <el-dialog :title="title" :visible.sync="open" :close-on-click-modal="false" width="60%" append-to-body>
  101. <el-tabs v-model="activeName">
  102. <el-tab-pane label="基本信息" name="first">
  103. <el-form ref="forms" :model="form" :rules="rules" label-width="180px">
  104. <el-row>
  105. <el-col :span="12">
  106. <el-form-item label="部门" prop="deptName">
  107. <el-select v-model="form.deptName" @change="deptSelect" placeholder="请选择">
  108. <el-option v-for="(item, index) in deptList" :key="index" :label="item.deptName" :value="index">
  109. </el-option>
  110. </el-select>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="12">
  114. <el-form-item label="年月" prop="dateValue">
  115. <el-date-picker v-model="form.dateValue" type="month" @change="changeDate" value-format="yyyy-MM"
  116. format="yyyy 年 MM 月" placeholder="选择年月">
  117. </el-date-picker>
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="12">
  121. <el-form-item label="资产分类 " prop="zcfl">
  122. <el-input v-model="form.zcfl" placeholder="请输入资产分类 "></el-input>
  123. </el-form-item>
  124. </el-col>
  125. <el-col :span="12">
  126. <el-form-item label="主要贸易国家 " prop="zymygj">
  127. <el-input v-model="form.zymygj" placeholder="请输入主要贸易国家 "></el-input>
  128. </el-form-item>
  129. </el-col>
  130. <el-col :span="12">
  131. <el-form-item label="电子账册分类 " prop="dzzcfl">
  132. <el-input v-model="form.dzzcfl" placeholder="请输入电子账册分类 "></el-input>
  133. </el-form-item>
  134. </el-col>
  135. <el-col :span="12">
  136. <el-form-item label="海关税收" prop="hgss">
  137. <el-input v-model="form.hgss" placeholder="请输入海关税收"></el-input>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :span="12">
  141. <el-form-item label="税务部门税收" prop="swbmss">
  142. <el-input v-model="form.swbmss" placeholder="请输入税务部门税收"></el-input>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="12">
  146. <el-form-item label="期末企业从业人员" prop="qmqycyry">
  147. <el-input v-model="form.qmqycyry" placeholder="请输入期末企业从业人员"></el-input>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :span="12">
  151. <el-form-item label="实际使用外资金额" prop="sjsywzje">
  152. <el-input v-model="form.sjsywzje" placeholder="请输入实际使用外资金额"></el-input>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="12">
  156. <el-form-item label="固定资产投资" prop="gdzctz">
  157. <el-input v-model="form.gdzctz" placeholder="请输入固定资产投资"></el-input>
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="12">
  161. <el-form-item label="经营总收入" prop="jysr">
  162. <el-input v-model="form.jysr" placeholder="请输入经营总收入"></el-input>
  163. </el-form-item>
  164. </el-col>
  165. </el-row>
  166. </el-form>
  167. </el-tab-pane>
  168. <el-tab-pane label="进出口信息" name="second">
  169. <el-form ref="form" :model="form" :rules="rules" label-width="180px">
  170. <el-row>
  171. <el-col :span="12">
  172. <el-form-item label="规模以上工业产值" prop="gmysgycz">
  173. <el-input type="number" v-model="form.gmysgycz" placeholder="请输入规模以上工业产值"></el-input>
  174. </el-form-item>
  175. </el-col>
  176. <el-col :span="12">
  177. <el-form-item label="进出口总值" prop="jckzz">
  178. <el-input type="number" v-model="form.jckzz" placeholder="请输入进出口总值"></el-input>
  179. </el-form-item>
  180. </el-col>
  181. <el-col :span="12">
  182. <el-form-item label="进口总值" prop="jkzz">
  183. <el-input type="number" v-model="form.jkzz" placeholder="请输入进口总值"></el-input>
  184. </el-form-item>
  185. </el-col>
  186. <el-col :span="12">
  187. <el-form-item label="出口总值" prop="ckzz">
  188. <el-input type="number" v-model="form.ckzz" placeholder="请输入出口总值"></el-input>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="12">
  192. <el-form-item label="加工贸易进出口值 " prop="jgmyjckz">
  193. <el-input type="number" v-model="form.jgmyjckz" placeholder="请输入加工贸易进出口值 "></el-input>
  194. </el-form-item>
  195. </el-col>
  196. <el-col :span="12">
  197. <el-form-item label="物流货物进出口值 " prop="wlhwjckz">
  198. <el-input type="number" v-model="form.wlhwjckz" placeholder="请输入物流货物进出口值 "></el-input>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="12">
  202. <el-form-item label="一般贸易进出口值 " prop="ybmyjckz">
  203. <el-input type="number" v-model="form.ybmyjckz" placeholder="请输入一般贸易进出口值 "></el-input>
  204. </el-form-item>
  205. </el-col>
  206. <el-col :span="12">
  207. <el-form-item label="维修业务进出口值 " prop="wxyejckz">
  208. <el-input type="number" v-model="form.wxyejckz" placeholder="请输入维修业务进出口值 "></el-input>
  209. </el-form-item>
  210. </el-col>
  211. <el-col :span="12">
  212. <el-form-item label="研发业务进出口值 " prop="yfywjckz">
  213. <el-input type="number" v-model="form.yfywjckz" placeholder="请输入研发业务进出口值 "></el-input>
  214. </el-form-item>
  215. </el-col>
  216. <el-col :span="12">
  217. <el-form-item label="租赁贸易进出口值 " prop="zlmyjckz">
  218. <el-input type="number" v-model="form.zlmyjckz" placeholder="请输入租赁贸易进出口值 "></el-input>
  219. </el-form-item>
  220. </el-col>
  221. <el-col :span="12">
  222. <el-form-item label="跨境电商业务进出口值 " prop="kjdsywjckz">
  223. <el-input type="number" v-model="form.kjdsywjckz" placeholder="请输入跨境电商业务进出口值 "></el-input>
  224. </el-form-item>
  225. </el-col>
  226. </el-row>
  227. </el-form>
  228. </el-tab-pane>
  229. </el-tabs>
  230. <div slot="footer" class="dialog-footer">
  231. <el-button type="primary" @click="submitForm">确 定</el-button>
  232. <el-button @click="cancel">取 消</el-button>
  233. </div>
  234. </el-dialog>
  235. </div>
  236. </template>
  237. <script>
  238. import {
  239. listENTERPRISETRADEPERFORMANCE,
  240. getDeptList,
  241. getENTERPRISETRADEPERFORMANCE,
  242. delENTERPRISETRADEPERFORMANCE,
  243. addENTERPRISETRADEPERFORMANCE,
  244. updateENTERPRISETRADEPERFORMANCE,
  245. } from "@/api/portal/ENTERPRISETRADEPERFORMANCE/ENTERPRISETRADEPERFORMANCE";
  246. export default {
  247. name: "ENTERPRISETRADEPERFORMANCE",
  248. data() {
  249. return {
  250. // 部门列表
  251. deptList: [],
  252. // 根路径
  253. baseURL: process.env.VUE_APP_BASE_API,
  254. // 遮罩层
  255. loading: true,
  256. // 选中数组
  257. ids: [],
  258. // 非单个禁用
  259. single: true,
  260. // 非多个禁用
  261. multiple: true,
  262. // 显示搜索条件
  263. showSearch: true,
  264. // 总条数
  265. total: 0,
  266. // 企业贸易绩效数据(每个月填报)表格数据
  267. ENTERPRISETRADEPERFORMANCEList: [],
  268. // 弹出层标题
  269. title: "",
  270. // 是否显示弹出层
  271. open: false,
  272. activeName: "first",
  273. // 查询参数
  274. queryParams: {
  275. pageNum: 1,
  276. pageSize: 10,
  277. id: null,
  278. deptId: null,
  279. gmysgycz: null,
  280. gdzctz: null,
  281. zcfl: null,
  282. zymygj: null,
  283. dzzcfl: null,
  284. jckzz: null,
  285. jkzz: null,
  286. ckzz: null,
  287. jgmyjckz: null,
  288. wlhwjckz: null,
  289. ybmyjckz: null,
  290. hgss: null,
  291. swbmss: null,
  292. qmqycyry: null,
  293. sjsywzje: null,
  294. wxyejckz: null,
  295. yfywjckz: null,
  296. zlmyjckz: null,
  297. kjdsywjckz: null,
  298. createTime: null,
  299. createBy: null,
  300. updateTime: null,
  301. updateBy: null,
  302. },
  303. // 表单参数
  304. form: {},
  305. // 表单校验
  306. rules: {
  307. id: [
  308. {
  309. required: true,
  310. message: "企业贸易绩效数据不能为空",
  311. trigger: "blur",
  312. },
  313. ],
  314. deptId: [
  315. { required: true, message: "部门id不能为空", trigger: "blur" },
  316. ],
  317. dateValue: [
  318. { required: true, message: "年月不能为空", trigger: "blur" },
  319. ],
  320. gmysgycz: [
  321. {
  322. required: true,
  323. message: "规模以上工业产值不能为空",
  324. trigger: "blur",
  325. },
  326. {
  327. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  328. message: "不能为负数",
  329. trigger: "blur"
  330. }
  331. ],
  332. deptName: [
  333. { required: true, message: "部门信息不能为空", trigger: "blur" },
  334. ],
  335. gdzctz: [
  336. { required: true, message: "固定资产投资不能为空", trigger: "blur" },
  337. {
  338. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  339. message: "不能为负数",
  340. trigger: "blur"
  341. }
  342. ],
  343. jysr: [
  344. { required: true, message: "经营总收入不能为空", trigger: "blur" },
  345. ],
  346. zcfl: [
  347. { required: true, message: "资产分类 不能为空", trigger: "blur" },
  348. ],
  349. zymygj: [
  350. { required: true, message: "主要贸易国家 不能为空", trigger: "blur" },
  351. ],
  352. dzzcfl: [
  353. { required: true, message: "电子账册分类 不能为空", trigger: "blur" },
  354. ],
  355. jckzz: [
  356. { required: true, message: "进、出口总值不能为空", trigger: "blur" },
  357. {
  358. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  359. message: "不能为负数",
  360. trigger: "blur"
  361. }
  362. ],
  363. jkzz: [
  364. { required: true, message: "进口总值不能为空", trigger: "blur" },
  365. {
  366. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  367. message: "不能为负数",
  368. trigger: "blur"
  369. }
  370. ],
  371. ckzz: [
  372. { required: true, message: "出口总值不能为空", trigger: "blur" },
  373. {
  374. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  375. message: "不能为负数",
  376. trigger: "blur"
  377. }
  378. ],
  379. jgmyjckz: [
  380. {
  381. required: true,
  382. message: "加工贸易进出口值 不能为空",
  383. trigger: "blur",
  384. },
  385. {
  386. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  387. message: "不能为负数",
  388. trigger: "blur"
  389. }
  390. ],
  391. wlhwjckz: [
  392. {
  393. required: true,
  394. message: "物流货物进出口值 不能为空",
  395. trigger: "blur",
  396. },
  397. {
  398. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  399. message: "不能为负数",
  400. trigger: "blur"
  401. }
  402. ],
  403. ybmyjckz: [
  404. {
  405. required: true,
  406. message: "一般贸易进出口值 不能为空",
  407. trigger: "blur",
  408. },
  409. {
  410. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  411. message: "不能为负数",
  412. trigger: "blur"
  413. }
  414. ],
  415. hgss: [
  416. { required: true, message: "海关税收不能为空", trigger: "blur" },
  417. {
  418. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  419. message: "不能为负数",
  420. trigger: "blur"
  421. }
  422. ],
  423. swbmss: [
  424. { required: true, message: "税务部门税收不能为空", trigger: "blur" },
  425. {
  426. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  427. message: "不能为负数",
  428. trigger: "blur"
  429. }
  430. ],
  431. qmqycyry: [
  432. {
  433. required: true,
  434. message: "期末企业从业人员不能为空",
  435. trigger: "blur",
  436. },
  437. ],
  438. sjsywzje: [
  439. {
  440. required: true,
  441. message: "实际使用外资金额不能为空",
  442. trigger: "blur",
  443. },
  444. {
  445. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  446. message: "不能为负数",
  447. trigger: "blur"
  448. }
  449. ],
  450. wxyejckz: [
  451. {
  452. required: true,
  453. message: "维修业务进出口值 不能为空",
  454. trigger: "blur",
  455. },
  456. {
  457. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  458. message: "不能为负数",
  459. trigger: "blur"
  460. }
  461. ],
  462. yfywjckz: [
  463. {
  464. required: true,
  465. message: "研发业务进出口值 不能为空",
  466. trigger: "blur",
  467. },
  468. {
  469. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  470. message: "不能为负数",
  471. trigger: "blur"
  472. }
  473. ],
  474. zlmyjckz: [
  475. {
  476. required: true,
  477. message: "租赁贸易进出口值 不能为空",
  478. trigger: "blur",
  479. },
  480. {
  481. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  482. message: "不能为负数",
  483. trigger: "blur"
  484. }
  485. ],
  486. kjdsywjckz: [
  487. {
  488. required: true,
  489. message: "跨境电商业务进出口值 不能为空",
  490. trigger: "blur",
  491. },
  492. {
  493. pattern: /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/,
  494. message: "不能为负数",
  495. trigger: "blur"
  496. }
  497. ],
  498. },
  499. };
  500. },
  501. created() {
  502. this.getList();
  503. getDeptList().then((res) => {
  504. this.deptList = res.data;
  505. });
  506. },
  507. methods: {
  508. /** 查询企业贸易绩效数据(每个月填报)列表 */
  509. getList() {
  510. this.loading = true;
  511. listENTERPRISETRADEPERFORMANCE(this.queryParams).then((response) => {
  512. this.ENTERPRISETRADEPERFORMANCEList = response.rows;
  513. this.total = response.total;
  514. this.loading = false;
  515. });
  516. },
  517. // 取消按钮
  518. cancel() {
  519. this.open = false;
  520. this.reset();
  521. },
  522. // 表单重置
  523. reset() {
  524. this.form = {
  525. id: null,
  526. deptId: null,
  527. gmysgycz: null,
  528. gdzctz: null,
  529. zcfl: null,
  530. zymygj: null,
  531. dzzcfl: null,
  532. jckzz: null,
  533. jkzz: null,
  534. ckzz: null,
  535. jgmyjckz: null,
  536. wlhwjckz: null,
  537. ybmyjckz: null,
  538. hgss: null,
  539. swbmss: null,
  540. qmqycyry: null,
  541. sjsywzje: null,
  542. wxyejckz: null,
  543. yfywjckz: null,
  544. zlmyjckz: null,
  545. kjdsywjckz: null,
  546. dateValue: null,
  547. year: null,
  548. month: null
  549. };
  550. this.resetForm("form");
  551. },
  552. /** 搜索按钮操作 */
  553. handleQuery() {
  554. this.queryParams.pageNum = 1;
  555. this.getList();
  556. },
  557. /** 重置按钮操作 */
  558. resetQuery() {
  559. this.resetForm("queryForm");
  560. this.handleQuery();
  561. },
  562. // 多选框选中数据
  563. handleSelectionChange(selection) {
  564. this.ids = selection.map((item) => item.id);
  565. this.single = selection.length !== 1;
  566. this.multiple = !selection.length;
  567. },
  568. changeDate(val) {
  569. this.form.year = this.form.dateValue.slice(0, 4)
  570. this.form.month = this.form.dateValue.slice(5)
  571. },
  572. /** 新增按钮操作 */
  573. handleAdd() {
  574. this.reset();
  575. this.open = true;
  576. this.title = "添加企业贸易绩效数据(每个月填报)";
  577. },
  578. /** 修改按钮操作 */
  579. handleUpdate(row) {
  580. this.activeName = "first";
  581. this.reset();
  582. const id = row.id || this.ids;
  583. getENTERPRISETRADEPERFORMANCE(id).then((response) => {
  584. this.form = response.data;
  585. this.form.dateValue = this.form.year + '-' + this.form.month
  586. this.open = true;
  587. this.title = "修改企业贸易绩效数据(每个月填报)";
  588. });
  589. },
  590. deptSelect(index) {
  591. this.form.deptId = this.deptList[index].deptId;
  592. this.form.deptName = this.deptList[index].deptName;
  593. },
  594. /** 提交按钮 */
  595. submitForm() {
  596. let is;
  597. this.$refs["forms"].validate((valid) => {
  598. if (!valid) {
  599. this.$message.error("请补全基本信息");
  600. is = true;
  601. return;
  602. }
  603. });
  604. if (is) return;
  605. this.$refs["form"].validate((valid) => {
  606. if (valid) {
  607. if (this.form.id != null) {
  608. updateENTERPRISETRADEPERFORMANCE(this.form).then((response) => {
  609. this.$modal.msgSuccess("修改成功");
  610. this.open = false;
  611. this.getList();
  612. });
  613. } else {
  614. addENTERPRISETRADEPERFORMANCE(this.form).then((response) => {
  615. this.$modal.msgSuccess("新增成功");
  616. this.open = false;
  617. this.getList();
  618. });
  619. }
  620. } else {
  621. this.$message.error("请补全进出口信息");
  622. }
  623. });
  624. },
  625. /** 删除按钮操作 */
  626. handleDelete(row) {
  627. const ids = row.id || this.ids;
  628. this.$modal
  629. .confirm(
  630. '是否确认删除企业贸易绩效数据(每个月填报)编号为"' +
  631. ids +
  632. '"的数据项?'
  633. )
  634. .then(function () {
  635. return delENTERPRISETRADEPERFORMANCE(ids);
  636. })
  637. .then(() => {
  638. this.getList();
  639. this.$modal.msgSuccess("删除成功");
  640. })
  641. .catch(() => { });
  642. },
  643. /** 导出按钮操作 */
  644. handleExport() {
  645. this.download(
  646. "business/ENTERPRISETRADEPERFORMANCE/export",
  647. {
  648. ...this.queryParams,
  649. },
  650. `ENTERPRISETRADEPERFORMANCE_${new Date().getTime()}.xlsx`
  651. );
  652. },
  653. },
  654. };
  655. </script>