You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1526 lines
50 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
4 years ago
5 years ago
5 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top">
  4. <el-form-item :label = "inputSearch10">
  5. <el-input style="width: 110px;" placeholder="" v-model = "queryViewIfs.transactionId"></el-input>
  6. </el-form-item>
  7. <el-form-item :label = "inputSearch1">
  8. <el-input style="width: 110px;" placeholder="" v-model = "queryViewIfs.toolId"></el-input>
  9. </el-form-item>
  10. <el-form-item :label = "inputSearch2">
  11. <el-input style="width: 110px;" placeholder="" v-model = "queryViewIfs.description"></el-input>
  12. </el-form-item>
  13. <el-form-item :label="inputSearch12">
  14. <el-select v-model="queryViewIfs.receiveFlag" placeholder="请选择" style="width: 75px;">
  15. <el-option
  16. v-for="item in selectList.select1"
  17. :key="item.value"
  18. :label="item.label"
  19. :value="item.value">
  20. </el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-form-item style="margin-top: 20px;">
  24. <el-button @click="initViewIfsTable('Y')" type="primary">{{ buttons.search }}</el-button>
  25. <el-button @click="saveColumnList()" type="primary" v-show="showDefault">{{ buttons.defaultTable }}
  26. </el-button>
  27. <el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :defaultValue="exportDefaultValue"
  36. :fetch="createExportData"
  37. :before-generate="startDownload"
  38. :before-finish="finishDownload"
  39. worksheet="导出信息"
  40. class="el-button el-button--primary el-button--medium">
  41. {{ buttons.download }}
  42. </download-excel>
  43. <el-button v-if="isAuth(':prd:delete')" type="danger" @click="deleteHandle()"
  44. :disabled="dataListSelections.length <= 0">{{ buttons.deleteList }}
  45. </el-button>
  46. </el-form-item>
  47. </el-form>
  48. <el-table
  49. :height="height"
  50. :data="dataList"
  51. border
  52. v-loading="dataListLoading"
  53. @selection-change="selectionChangeHandle"
  54. style="width: 100%;">
  55. <el-table-column
  56. v-for="(item,index) in columnList" :key="index"
  57. :sortable="item.columnSortable"
  58. :prop="item.columnProp"
  59. :header-align="item.headerAlign"
  60. :show-overflow-tooltip="item.showOverflowTooltip"
  61. :align="item.align"
  62. :fixed="item.fixed"
  63. :width="item.columnWidth"
  64. :label="item.columnLabel">
  65. <template slot-scope="scope">
  66. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  67. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  68. style="width: 100px; height: 80px"/></span>
  69. </template>
  70. </el-table-column>
  71. <el-table-column
  72. fixed="right"
  73. header-align="center"
  74. align="center"
  75. width="100"
  76. :label="buttons.operating">
  77. <template slot-scope="scope">
  78. <a @click="initBannersFlag(scope.row)">{{buttons.receive}}</a>
  79. <a @click="initFileModel(scope.row)">{{buttons.appendixInfo}}</a>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. <el-pagination
  84. @size-change="sizeChangeHandle"
  85. @current-change="currentChangeHandle"
  86. :current-page="pageIndex"
  87. :page-sizes="[100, 200, 500]"
  88. :page-size="pageSize"
  89. :total="totalPage"
  90. layout="total, sizes, prev, pager, next, jumper">
  91. </el-pagination>
  92. <column v-if="visible" ref="column" @refreshData="getTableUserColumn"></column>
  93. <el-dialog title="横幅宽幅设定" :visible.sync="bannersFlag" width="325px">
  94. <el-form :inline="true">
  95. <el-form-item :label = "inputSearch8">
  96. <el-input style="width: 90px;text-align: left;padding: 0px 5px;" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model = "torNumacc"></el-input>
  97. </el-form-item>
  98. <el-form-item :label = "inputSearch9">
  99. <el-input style="width: 90px;text-align: left;padding: 0px 5px;" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model = "torNumdown"></el-input>
  100. </el-form-item>
  101. </el-form>
  102. <span slot="footer" class="dialog-footer">
  103. <el-button @click="bannersFlag = false">取消</el-button>
  104. <el-button type="primary" :disabled="bannersBut" @click="saveBanners()">确定</el-button>
  105. </span>
  106. </el-dialog>
  107. <el-dialog title="检验方式选择" :visible.sync="poToolFlag" width="770px">
  108. <el-form :inline="true">
  109. <el-form-item :label = "inputSearch3">
  110. <el-input style="width: 90px;text-align: left;padding: 0px 5px;" @change="initQtyAlert()" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model = "receiveQuantity"></el-input>
  111. </el-form-item>
  112. <el-form-item :label = "inputSearch4">
  113. <el-input style="width: 90px;text-align: left;padding: 0px 5px;" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model = "serviceLife"></el-input>
  114. </el-form-item>
  115. <el-form-item :label = "inputSearch11">
  116. <el-input style="width: 90px;text-align: left;padding: 0px 5px;" oninput="value=value.replace(/^\.+|[^\d.]/g,'')" v-model = "invoicePrice"></el-input>
  117. </el-form-item>
  118. <!--<el-form-item >
  119. <el-radio v-model="radio" label="N">{{inputSearch5}}</el-radio>
  120. <el-radio style="margin-left: 10px;" v-model="radio" label="Y">{{inputSearch6}}</el-radio>
  121. </el-form-item>
  122. <el-form-item :label = "inputSearch7">
  123. <el-input :disabled="radio=='Y'?false :true" style="width: 110px;text-align: left;padding: 0px 5px;" v-model = "locationNo"></el-input>
  124. </el-form-item>-->
  125. <el-form-item>
  126. <el-button type="primary" :disabled="generateFlag" @click="initMailFlag()" >{{buttons.generate}}</el-button> <!--@click="onSubmit"-->
  127. <el-button type="primary" @click="printMethod('Y')">{{buttons.toolLabel}}</el-button> <!--@click="onSubmit"-->
  128. <el-button type="primary" @click="printMethod('N')">{{buttons.screenLabel}}</el-button> <!--@click="onSubmit"-->
  129. </el-form-item>
  130. <el-table
  131. :data="poToolList"
  132. height="290"
  133. border
  134. v-loading="dataListLoading"
  135. @selection-change="getCurrSelectList"
  136. style="width: 100%;">
  137. <el-table-column
  138. type="selection"
  139. header-align="center"
  140. width="40"
  141. align="center">
  142. </el-table-column>
  143. <el-table-column
  144. v-for="(item,index) in poToolColumnList" :key="index"
  145. :sortable="item.columnSortable"
  146. :prop="item.columnProp"
  147. :header-align="item.headerAlign"
  148. :show-overflow-tooltip="item.showOverflowTooltip"
  149. :align="item.align"
  150. :fixed="item.fixed"
  151. :width="item.columnWidth"
  152. :label="item.columnLabel">
  153. <template slot-scope="scope">
  154. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  155. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  156. style="width: 100px; height: 80px"/></span>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <el-footer style="height: 20px;background-color: #fbfbfb;" ></el-footer>
  161. </el-form>
  162. </el-dialog>
  163. <el-dialog title="附件信息" :visible.sync="setUp.fileFlag" width="672px" :close-on-click-modal="false"
  164. :close-on-press-escape="false" v-drag>
  165. <el-form :inline="true" label-position="top">
  166. <el-form-item style="margin-top: 10px">
  167. <upload v-on:childByValue="childByValue"></upload>
  168. </el-form-item>
  169. <el-table
  170. height="170"
  171. :data="fileList"
  172. border
  173. v-loading="dataListLoading"
  174. @selection-change="selectionChangeHandle"
  175. style="width: 100%;">
  176. <el-table-column
  177. v-for="(item,index) in columnList2" :key="index"
  178. :sortable="item.columnSortable"
  179. :prop="item.columnProp"
  180. :header-align="item.headerAlign"
  181. :show-overflow-tooltip="item.showOverflowTooltip"
  182. :align="item.align"
  183. :fixed="item.fixed"
  184. :width="item.columnWidth"
  185. :label="item.columnLabel">
  186. <template slot-scope="scope">
  187. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  188. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  189. style="width: 100px; height: 80px"/></span>
  190. </template>
  191. </el-table-column>
  192. <el-table-column
  193. header-align="center"
  194. align="center"
  195. width="50"
  196. :label="buttons.operating">
  197. <template slot-scope="scope">
  198. <a @click="fileDownload(scope.row)">{{ buttons.fileDownload }}</a>
  199. <a @click="filePreview(scope.row)">{{ buttons.preview }}</a>
  200. </template>
  201. </el-table-column>
  202. </el-table>
  203. </el-form>
  204. </el-dialog>
  205. <el-dialog title="预览" :visible.sync="pdfVisible" center width="60%" >
  206. <iframe :src="this.pdfUrl" frameborder="0" width="100%" height="400px"></iframe>
  207. <!-- <div class="pdf">-->
  208. <!-- <div class="pdf-tab">-->
  209. <!-- <span-->
  210. <!-- class="btn-def btn-pre"-->
  211. <!-- @click.stop="prePage">上一页</span>-->
  212. <!-- <span-->
  213. <!-- class="btn-def btn-next"-->
  214. <!-- @click.stop="nextPage">下一页</span>-->
  215. <!-- <span-->
  216. <!-- class="btn-def"-->
  217. <!-- @click.stop="clock">顺时针</span>-->
  218. <!-- <span-->
  219. <!-- class="btn-def"-->
  220. <!-- @click.stop="counterClock">逆时针</span>-->
  221. <!-- <span-->
  222. <!-- class="btn-def"-->
  223. <!-- @click.stop="pdfPrintAll">全部打印</span>-->
  224. <!-- <span-->
  225. <!-- class="btn-def"-->
  226. <!-- @click.stop="pdfPrint">部分打印</span>-->
  227. <!-- </div>-->
  228. <!-- <pdf-->
  229. <!-- ref="pdf"-->
  230. <!-- :src="this.pdfUrl"-->
  231. <!-- :page="pageNum"-->
  232. <!-- :rotate="pageRotate"-->
  233. <!-- @password="password"-->
  234. <!-- @progress="loadedRatio = $event"-->
  235. <!-- @page-loaded="pageLoaded($event)"-->
  236. <!-- @num-pages="pageTotalNum=$event"-->
  237. <!-- @error="pdfError($event)"-->
  238. <!-- @link-clicked="page = $event">-->
  239. <!-- </pdf>-->
  240. <!--&lt;!&ndash; <div>{{pageNum}}/{{pageTotalNum}}</div>&ndash;&gt;-->
  241. <!--&lt;!&ndash; <div>进度{{loadedRatio}}</div>&ndash;&gt;-->
  242. <!--&lt;!&ndash; <div>页面加载成功: {{curPageNum}}</div>&ndash;&gt;-->
  243. <!-- </div>-->
  244. </el-dialog>
  245. </div>
  246. </template>
  247. <script>
  248. import column from "../common/column";
  249. import {
  250. searchSysLanguagePackList,
  251. searchSysLanguageParam,
  252. searchFunctionButtonList,
  253. saveButtonList,
  254. searchSysLanguage,
  255. searchLanguageListByLanguageCode,
  256. saveSysLanguageOne
  257. } from "@/api/sysLanguage.js"
  258. import {
  259. saveTableDefaultList,
  260. saveTableUser,
  261. getTableDefaultListLanguage,
  262. getTableUserListLanguage
  263. } from "@/api/table.js"
  264. import {
  265. getViewIfsList,
  266. getPoToolList,
  267. getLocationList,
  268. saveToolDetail,
  269. updateIfsTool,
  270. exportList,
  271. getFileList,
  272. printTool,
  273. saveFileAssociate,
  274. } from "@/api/knifemold/receive.js"
  275. import axios from "axios";
  276. import Vue from "vue";
  277. import upload from "../common/upload";
  278. export default {
  279. components: {
  280. column
  281. ,upload
  282. },
  283. data() {
  284. return {
  285. pdfUrl : '',
  286. fileList : [],
  287. //设置
  288. setUp: {
  289. fileFlag : false,
  290. },
  291. selectList: {
  292. select1: [{
  293. value: 'Y',
  294. label: '显示'
  295. }, {
  296. value: 'N',
  297. label: '不显示'
  298. }],
  299. select2 :[
  300. ],
  301. },
  302. height: 0,
  303. //搜索名称
  304. inputSearch1 : "工具编码",
  305. inputSearch2 : "工具名称",
  306. inputSearch3 : "接收数量",
  307. inputSearch4 : "使用寿命",
  308. inputSearch5 : "IQC检验",
  309. inputSearch6 : "上机检验",
  310. inputSearch7 : "录入库位",
  311. inputSearch8 : "横幅",
  312. inputSearch9 : "宽幅",
  313. inputSearch10 : "接收号",
  314. inputSearch11 : "入库价格",
  315. inputSearch12 : "接收完成",
  316. //横幅宽幅设定
  317. bannersFlag : false,
  318. bannersBut : false,
  319. pdfVisible : false,
  320. torNumacc : '',
  321. torNumdown : '',
  322. //生成按钮是否可用
  323. generateFlag : false,
  324. //接收数量
  325. receiveQuantity : '',
  326. //使用寿命
  327. serviceLife : '',
  328. //检验方式
  329. radio : '',
  330. //录入库位
  331. locationNo : '' ,
  332. //入库价格
  333. invoicePrice : 0,
  334. site: this.$store.state.user.site,
  335. addLanguage: false,
  336. functionId: 1001,
  337. tableId: "1001viewIfsTable",
  338. value1: true,
  339. visible: false,
  340. showDefault: false,
  341. poToolFlag : false,
  342. poToolData : {},
  343. ifsToolData : {},
  344. queryViewIfs: {
  345. //接收号
  346. transactionId : '',
  347. //工具编码搜索
  348. toolId : "",
  349. //工具名称搜索
  350. description : "",
  351. //工厂搜索
  352. site: "",
  353. //行数
  354. limit : "",
  355. //页数
  356. page : "",
  357. receiveFlag : 'N',
  358. },
  359. // 默认table 查询参数
  360. queryTable: {
  361. functionId: 1001,
  362. tableId: "1001viewIfsTable",
  363. languageCode: this.$i18n.locale
  364. },
  365. // 用户table 查询参数
  366. queryTableUser: {
  367. userId: this.$store.state.user.name,
  368. functionId: 1001,
  369. tableId: "1001viewIfsTable",
  370. status: true,
  371. languageCode: this.$i18n.locale
  372. },
  373. // 语言词典查询参数
  374. querySysLanguageParam: {
  375. languageCode: this.$i18n.locale
  376. },
  377. // 语言词典集合
  378. sysLanguageParams: [],
  379. // 用户table 配置集合
  380. userColumnList: [],
  381. // 展示列集
  382. poToolColumnList : [
  383. {
  384. userId: this.$store.state.user.name,
  385. functionId: 1001,
  386. serialNumber: '1001viewIfsTableTransactionId',
  387. tableId: "1001poToolTable",
  388. tableName: "poToolTable",
  389. columnProp: "toolInstanceId",
  390. headerAlign: "center",
  391. align: "center",
  392. columnLabel: "实例编码",
  393. columnHidden: false,
  394. columnImage: false,
  395. columnSortable: false,
  396. sortLv: 0,
  397. status: true,
  398. fixed: false
  399. },
  400. {
  401. userId: this.$store.state.user.name,
  402. functionId: 1001,
  403. serialNumber: '1001viewIfsTableToolDescription',
  404. tableId: "1001poToolTable",
  405. tableName: "poToolTable",
  406. columnProp: "toolDescription",
  407. headerAlign: "center",
  408. align: "center",
  409. columnLabel: "实例名称",
  410. columnHidden: false,
  411. columnImage: false,
  412. columnSortable: false,
  413. sortLv: 0,
  414. status: true,
  415. fixed: false
  416. },
  417. // {
  418. // userId: this.$store.state.user.name,
  419. // functionId: 1001,
  420. // serialNumber: '1001viewIfsTableTransactionId',
  421. // tableId: "1001poToolTable",
  422. // tableName: "poToolTable",
  423. // columnProp: "status2",
  424. // headerAlign: "center",
  425. // align: "center",
  426. // columnLabel: "校验方式",
  427. // columnHidden: false,
  428. // columnImage: false,
  429. // columnSortable: false,
  430. // sortLv: 0,
  431. // status: true,
  432. // fixed: false
  433. // },
  434. // {
  435. // userId: this.$store.state.user.name,
  436. // functionId: 1001,
  437. // serialNumber: '1001viewIfsTableTransactionId',
  438. // tableId: "1001poToolTable",
  439. // tableName: "poToolTable",
  440. // columnProp: "status",
  441. // headerAlign: "center",
  442. // align: "center",
  443. // columnLabel: "是否检验",
  444. // columnHidden: false,
  445. // columnImage: false,
  446. // columnSortable: false,
  447. // sortLv: 0,
  448. // status: true,
  449. // fixed: false
  450. // },
  451. ],
  452. // 展示列集
  453. columnList: [
  454. {
  455. userId: this.$store.state.user.name,
  456. functionId: 1001,
  457. serialNumber: '1001viewIfsTableTransactionId',
  458. tableId: "1001viewIfsTable",
  459. tableName: "viewIfsTable",
  460. columnProp: "transactionId",
  461. headerAlign: "center",
  462. align: "center",
  463. columnLabel: "接收号",
  464. columnHidden: false,
  465. columnImage: false,
  466. columnSortable: false,
  467. sortLv: 0,
  468. status: true,
  469. fixed: false
  470. },
  471. {
  472. userId: this.$store.state.user.name,
  473. functionId: 1001,
  474. serialNumber: '1001viewIfsTableToolId',
  475. tableId: "1001viewIfsTable",
  476. tableName: "viewIfsTable",
  477. columnProp: "toolId",
  478. headerAlign: "center",
  479. align: "center",
  480. columnLabel: "工具编码",
  481. columnHidden: false,
  482. columnImage: false,
  483. columnSortable: false,
  484. sortLv: 0,
  485. status: true,
  486. fixed: false,
  487. },
  488. {
  489. userId: this.$store.state.user.name,
  490. functionId: 1001,
  491. serialNumber: '1001viewIfsTableDescription',
  492. tableId: "1001viewIfsTable",
  493. tableName: "viewIfsTable",
  494. columnProp: "description",
  495. headerAlign: "center",
  496. align: "center",
  497. columnLabel: "工具名称",
  498. columnHidden: false,
  499. columnImage: false,
  500. columnSortable: false,
  501. sortLv: 0,
  502. status: true,
  503. fixed: false,
  504. },
  505. // {
  506. // userId: this.$store.state.user.name,
  507. // functionId: 1001,
  508. // serialNumber: '1001viewIfsTableOrderNo',
  509. // tableId: "1001viewIfsTable",
  510. // tableName: "viewIfsTable",
  511. // columnProp: "orderNo",
  512. // headerAlign: "center",
  513. // align: "center",
  514. // columnLabel: "采购单号",
  515. // columnHidden: false,
  516. // columnImage: false,
  517. // columnSortable: false,
  518. // sortLv: 0,
  519. // status: true,
  520. // fixed: false,
  521. // },
  522. // {
  523. // userId: this.$store.state.user.name,
  524. // functionId: 1001,
  525. // serialNumber: '1001viewIfsTablelineItemNo',
  526. // tableId: "1001viewIfsTable",
  527. // tableName: "viewIfsTable",
  528. // columnProp: "lineItemNo",
  529. // headerAlign: "center",
  530. // align: "center",
  531. // columnLabel: "行号",
  532. // columnHidden: false,
  533. // columnImage: false,
  534. // columnSortable: false,
  535. // sortLv: 0,
  536. // status: true,
  537. // fixed: false,
  538. // },
  539. {
  540. userId: this.$store.state.user.name,
  541. functionId: 1001,
  542. serialNumber: '1001viewIfsTableVendorNo',
  543. tableId: "1001viewIfsTable",
  544. tableName: "viewIfsTable",
  545. columnProp: "vendorNo",
  546. headerAlign: "center",
  547. align: "center",
  548. columnLabel: "供应商编码",
  549. columnHidden: false,
  550. columnImage: false,
  551. columnSortable: false,
  552. sortLv: 0,
  553. status: true,
  554. fixed: false,
  555. },
  556. {
  557. userId: this.$store.state.user.name,
  558. functionId: 1001,
  559. serialNumber: '1001viewIfsTableVendorName',
  560. tableId: "1001viewIfsTable",
  561. tableName: "viewIfsTable",
  562. columnProp: "vendorName",
  563. headerAlign: "center",
  564. align: "center",
  565. columnLabel: "供应商名称",
  566. columnHidden: false,
  567. columnImage: false,
  568. columnSortable: false,
  569. sortLv: 0,
  570. status: true,
  571. fixed: false,
  572. },
  573. {
  574. userId: this.$store.state.user.name,
  575. functionId: 1001,
  576. serialNumber: '1001viewIfsTableQuantity',
  577. tableId: "1001viewIfsTable",
  578. tableName: "viewIfsTable",
  579. columnProp: "quantity",
  580. headerAlign: "center",
  581. align: "center",
  582. columnLabel: "数量",
  583. columnHidden: false,
  584. columnImage: false,
  585. columnSortable: false,
  586. sortLv: 0,
  587. status: true,
  588. fixed: false,
  589. },
  590. {
  591. userId: this.$store.state.user.name,
  592. functionId: 1001,
  593. serialNumber: '1001viewIfsTableGenerateQuantity',
  594. tableId: "1001viewIfsTable",
  595. tableName: "viewIfsTable",
  596. columnProp: "generateQuantity",
  597. headerAlign: "center",
  598. align: "center",
  599. columnLabel: "已接收数量",
  600. columnHidden: false,
  601. columnImage: false,
  602. columnSortable: false,
  603. sortLv: 0,
  604. status: true,
  605. fixed: false,
  606. },
  607. ],
  608. // 展示列集
  609. columnList1: [
  610. // {
  611. // userId: this.$store.state.user.name,
  612. // functionId: 1001,
  613. // tableId: "common1002",
  614. // tableName: "commonLanguage",
  615. // columnProp: "functionId",
  616. // headerAlign: "center",
  617. // align: "center",
  618. // columnLabel: "功能编码",
  619. // columnHidden: false,
  620. // columnImage: false,
  621. // columnSortable: false,
  622. // sortLv: 0,
  623. // status: true,
  624. // fixed: false
  625. // },
  626. // {
  627. // userId: this.$store.state.user.name,
  628. // functionId: 1001,
  629. // tableId: "common1002",
  630. // tableName: "commonLanguage",
  631. // columnProp: "objectId",
  632. // headerAlign: "center",
  633. // align: "center",
  634. // columnLabel: "序列化编码",
  635. // columnHidden: false,
  636. // columnImage: false,
  637. // columnSortable: false,
  638. // sortLv: 0,
  639. // status: true,
  640. // fixed: false,
  641. // },
  642. // {
  643. // userId: this.$store.state.user.name,
  644. // functionId: 1001,
  645. // tableId: "common1002",
  646. // tableName: "commonLanguage",
  647. // columnProp: "objectType",
  648. // headerAlign: "center",
  649. // align: "center",
  650. // columnLabel: "类型",
  651. // columnHidden: false,
  652. // columnImage: false,
  653. // columnSortable: false,
  654. // sortLv: 0,
  655. // status: true,
  656. // fixed: false,
  657. // },
  658. // {
  659. // userId: this.$store.state.user.name,
  660. // functionId: 1001,
  661. // tableId: "common1002",
  662. // tableName: "commonLanguage",
  663. // columnProp: "languageValue",
  664. // headerAlign: "center",
  665. // align: "center",
  666. // columnLabel: "语言值",
  667. // columnHidden: false,
  668. // columnImage: false,
  669. // columnSortable: false,
  670. // sortLv: 0,
  671. // status: true,
  672. // fixed: false,
  673. // },
  674. // {
  675. // userId: this.$store.state.user.name,
  676. // functionId: 1001,
  677. // tableId: "common1002",
  678. // tableName: "commonLanguage",
  679. // columnProp: "languageCode",
  680. // headerAlign: "center",
  681. // align: "center",
  682. // columnLabel: "语言编码",
  683. // columnHidden: false,
  684. // columnImage: false,
  685. // columnSortable: false,
  686. // sortLv: 0,
  687. // status: true,
  688. // fixed: false,
  689. // }
  690. ],
  691. // 展示列集
  692. columnList2: [
  693. {
  694. userId: this.$store.state.user.name,
  695. functionId: 2102,
  696. tableId: "fileDetail2102",
  697. tableName: "fileDetailTable",
  698. columnProp: "fileName",
  699. headerAlign: "center",
  700. align: "center",
  701. columnLabel: "文件名称",
  702. columnHidden: false,
  703. columnImage: false,
  704. columnSortable: false,
  705. sortLv: 0,
  706. status: true,
  707. fixed: false
  708. },
  709. {
  710. userId: this.$store.state.user.name,
  711. functionId: 2102,
  712. tableId: "fileDetail2102",
  713. tableName: "fileDetailTable",
  714. columnProp: "createDate",
  715. headerAlign: "center",
  716. align: "center",
  717. columnLabel: "创建时间",
  718. columnHidden: false,
  719. columnImage: false,
  720. columnSortable: false,
  721. sortLv: 0,
  722. status: true,
  723. fixed: false,
  724. columnWidth: 135,
  725. },
  726. {
  727. userId: this.$store.state.user.name,
  728. functionId: 2102,
  729. tableId: "fileDetail2102",
  730. tableName: "fileDetailTable",
  731. columnProp: "createdBy",
  732. headerAlign: "center",
  733. align: "center",
  734. columnLabel: "创建人",
  735. columnHidden: false,
  736. columnImage: false,
  737. columnSortable: false,
  738. sortLv: 0,
  739. status: true,
  740. fixed: false,
  741. columnWidth: 70,
  742. },
  743. ],
  744. // 数据集
  745. dataList: [],
  746. currSelectList : [],
  747. poToolList : [],
  748. queryButton: {
  749. functionId: 1001,
  750. table_id: '1001viewIfsTable',
  751. languageCode: this.$i18n.locale,
  752. objectType: 'button'
  753. },
  754. buttons: {
  755. receive : '接收',
  756. add: '添加',
  757. edit: '编辑',
  758. delete: '删除',
  759. deleteList: '批量删除',
  760. operating: '操作',
  761. search: '查询',
  762. download: '导出',
  763. settingTable: '设置列表',
  764. defaultTable: '设置默认配置',
  765. generate : "生成",
  766. print : '打印',
  767. appendixInfo: '附件信息',
  768. fileDownload: '下载',
  769. toolLabel : '工具标签',
  770. screenLabel : '网版标签',
  771. },
  772. // 导出 start
  773. exportData: [],
  774. exportDataStandard: {
  775. "功能编码": "functionId",
  776. "序列化编码": "objectId",
  777. "类型": "objectType",
  778. "语言值": "languageValue"
  779. },
  780. exportName: "工具接收",
  781. exportHeader: ["工具接收"],
  782. exportFooter: [],
  783. exportDefaultValue: "",
  784. // 导出 end
  785. buttonList: [
  786. {
  787. functionId: "1001",
  788. languageValue: '接收',
  789. objectId: 'receive',
  790. objectType: "button",
  791. tableId: "1001viewIfsTable"
  792. },
  793. {
  794. functionId: "1001",
  795. languageValue: '生成',
  796. objectId: 'generate',
  797. objectType: "button",
  798. tableId: "1001poToolTable"
  799. },
  800. {
  801. functionId: "1001",
  802. languageValue: '打印',
  803. objectId: 'print',
  804. objectType: "button",
  805. tableId: "1001poToolTable"
  806. },
  807. {
  808. functionId: "1001",
  809. languageValue: '关闭',
  810. objectId: 'shutSown',
  811. objectType: "button",
  812. tableId: "1001poToolTable"
  813. },
  814. {
  815. functionId: "1001",
  816. languageValue: '操作',
  817. objectId: 'operating',
  818. objectType: "button",
  819. tableId: "1001viewIfsTable"
  820. },
  821. {
  822. functionId: "1001",
  823. languageValue: '查询',
  824. objectId: 'search',
  825. objectType: "button",
  826. tableId: "1001viewIfsTable"
  827. },
  828. {
  829. functionId: "1001",
  830. languageValue: '导出',
  831. objectId: 'download',
  832. objectType: "button",
  833. tableId: "1001viewIfsTable"
  834. },
  835. {
  836. functionId: "1001",
  837. languageValue: '设置列表',
  838. objectId: 'settingTable',
  839. objectType: "button",
  840. tableId: "1001viewIfsTable"
  841. },
  842. {
  843. functionId: "1001",
  844. languageValue: '设置默认配置',
  845. objectId: 'defaultTable',
  846. objectType: "button",
  847. tableId: "1001viewIfsTable"
  848. },
  849. ],
  850. languageList: [],
  851. languageColumnList: [],
  852. languageDataList: [],
  853. queryLanguage: {},
  854. // 数据集条件
  855. querySysLanguagePack: {
  856. page: 1,
  857. limit: 1,
  858. languageValue: '',
  859. objectType: '',
  860. objectId: ''
  861. },
  862. // 分页
  863. pageIndex: 1,
  864. pageSize: 100,
  865. totalPage: 0,
  866. dataListLoading: false,
  867. dataListSelections: [],
  868. addOrUpdateVisible: false,
  869. insertFileList : [],
  870. currentData : {},
  871. }
  872. },
  873. activated() {
  874. this.getDataList()
  875. this.initViewIfsTable();
  876. this.getLanguageList()
  877. },
  878. mounted() {
  879. this.$nextTick(() => {
  880. this.height = window.innerHeight - 200;
  881. })
  882. },
  883. watch: {
  884. radio() {
  885. this.locationNo = ''
  886. },
  887. locationNo(){
  888. this.locationNo = this.locationNo.toUpperCase()
  889. },
  890. poToolFlag(){
  891. if(this.poToolFlag == false){
  892. this.initViewIfsTable()
  893. }
  894. }
  895. },
  896. methods: {
  897. childByValue(childValue) {
  898. // childValue就是子组件传过来的值
  899. this.fileList.push(childValue)
  900. this.saveAssociate(childValue)
  901. },
  902. saveAssociate(row){
  903. let jsonList = [];
  904. let jsonData = {
  905. site : this.site,
  906. sysOssId : row.id,
  907. type : 'ReveiveFile',
  908. associatedField1: this.currentData.transactionId,
  909. }
  910. jsonList.push(jsonData)
  911. saveFileAssociate(jsonList).then(({data}) =>{
  912. })
  913. },
  914. printMethod(val){
  915. if (this.currSelectList.length <= 0){
  916. this.$alert('请选择工具信息!', '操作提示', {
  917. confirmButtonText: '确定',
  918. callback: action => {
  919. this.bannersBut = false
  920. }
  921. });
  922. return
  923. }
  924. let reportFamily = ''
  925. if (val == 'Y'){
  926. reportFamily = '工具标签'
  927. }else {
  928. reportFamily = '网版标签'
  929. }
  930. let toolInstanceId = ''
  931. for (let i = 0; i < this.currSelectList.length; i++) {
  932. toolInstanceId += this.currSelectList[i].toolInstanceId + ";"
  933. }
  934. toolInstanceId = toolInstanceId.substring(0 ,toolInstanceId.length -1)
  935. let jsonData = {
  936. reportFamily : reportFamily,
  937. toolInstanceId : toolInstanceId,
  938. }
  939. printTool(jsonData).then(({data}) =>{
  940. if (data.code != 0){
  941. this.$alert(data.msg, '操作提示', {
  942. confirmButtonText: '确定',
  943. callback: action => {
  944. this.bannersBut = false
  945. }
  946. });
  947. }
  948. })
  949. },
  950. // 文件下载
  951. fileDownload(row) {
  952. axios.get('/api/ftp/file/downFtpFile/' + row.id, {
  953. responseType: 'blob',
  954. headers: {
  955. 'Content-Type': 'application/json',
  956. 'token':Vue.cookie.get('token')
  957. }
  958. }).then(({data}) => {
  959. // 不限制文件下载类型
  960. const blob = new Blob([data], {type: "application/octet-stream"})
  961. // 下载文件名称
  962. const fileName = row.fileName
  963. // a标签下载
  964. const linkNode = document.createElement('a')
  965. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  966. linkNode.style.display = 'none'
  967. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  968. // if(val == 'Y'){
  969. // this.pdfVisible = true
  970. // this.pdfUrl = linkNode.href
  971. // }else {
  972. document.body.appendChild(linkNode)
  973. linkNode.click() // 模拟在按钮上的一次鼠标单击
  974. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  975. document.body.removeChild(linkNode)
  976. // }
  977. })
  978. },
  979. filePreview(row){
  980. this.pdfVisible = true
  981. this.pdfUrl= 'http://192.168.1.2:9002/file/'+row.newFileName
  982. },
  983. //初始化文件信息模态框
  984. initFileModel(row){
  985. this.currentData = row
  986. this.getFileList(row)
  987. this.setUp.fileFlag = true
  988. },
  989. //获取申请单号文件信息
  990. getFileList(row){
  991. let jsonData = {
  992. site : row.site,
  993. // type : 'PRFile',
  994. associatedField1 : row.transactionId
  995. }
  996. this.fileList = []
  997. getFileList(jsonData).then(({data}) =>{
  998. if(data.code == 0){
  999. this.fileList = data.row
  1000. }
  1001. })
  1002. },
  1003. getCurrSelectList(row){
  1004. this.currSelectList = row
  1005. },
  1006. //检验横幅宽幅是否存在
  1007. saveBanners(){
  1008. this.bannersBut = true
  1009. if(this.torNumacc =="" || this.torNumacc <= 0){
  1010. this.$alert('请输入正确的横幅!', '横幅', {
  1011. confirmButtonText: '确定',
  1012. callback: action => {
  1013. this.bannersBut = false
  1014. }
  1015. });
  1016. return
  1017. }else if(this.torNumdown =="" || this.torNumacc <= 0){
  1018. this.$alert('请输入正确的宽幅!', '宽幅', {
  1019. confirmButtonText: '确定',
  1020. callback: action => {
  1021. this.bannersBut = false
  1022. }
  1023. });
  1024. return
  1025. }
  1026. let updateData = {
  1027. site : this.site,
  1028. transactionId : this.ifsToolData.transactionId,
  1029. torNumacc : this.torNumacc,
  1030. torNumdown : this.torNumdown,
  1031. }
  1032. updateIfsTool(updateData).then(({data}) =>{
  1033. this.bannersBut = false
  1034. if (data.code == 0) {
  1035. this.ifsToolData.torNumacc = this.torNumacc
  1036. this.ifsToolData.torNumacc = this.torNumacc
  1037. this.bannersFlag = false
  1038. this.$message.success(data.msg)
  1039. this.initPoToolTable()
  1040. } else {
  1041. this.$message.error(data.msg)
  1042. }
  1043. })
  1044. },
  1045. //检验生成事件
  1046. initMailFlag(){
  1047. this.generateFlag = true
  1048. /*if(this.radio != 'Y' && this.radio != 'N'){
  1049. this.$alert('请选择检验方式!', '检验方式', {
  1050. confirmButtonText: '确定',
  1051. callback: action => {
  1052. this.generateFlag = false
  1053. }
  1054. });
  1055. return
  1056. }else if(this.radio == 'Y' && (this.locationNo == null || this.locationNo == '')){
  1057. this.$alert('请输入录入库位!', '录入库位', {
  1058. confirmButtonText: '确定',
  1059. callback: action => {
  1060. this.generateFlag = false
  1061. }
  1062. });
  1063. return
  1064. }else*/
  1065. if(this.receiveQuantity == null || this.receiveQuantity == '' ){
  1066. this.$alert('请输入接收数量!', '接收数量', {
  1067. confirmButtonText: '确定',
  1068. callback: action => {
  1069. this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
  1070. this.generateFlag = false
  1071. }
  1072. });
  1073. return
  1074. }else if(this.receiveQuantity <= 0){
  1075. this.$alert('请输入正确的接收数量!', '接收数量', {
  1076. confirmButtonText: '确定',
  1077. callback: action => {
  1078. this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
  1079. this.generateFlag = false
  1080. }
  1081. });
  1082. return
  1083. }else if(this.serviceLife == null || this.serviceLife == ''){
  1084. this.$alert('请输入使用寿命!', '使用寿命', {
  1085. confirmButtonText: '确定',
  1086. callback: action => {
  1087. this.serviceLife = 0
  1088. this.generateFlag = false
  1089. }
  1090. });
  1091. return
  1092. }else if(this.serviceLife <= 0){
  1093. this.$alert('请输入正确的使用寿命!', '使用寿命', {
  1094. confirmButtonText: '确定',
  1095. callback: action => {
  1096. this.serviceLife = 0
  1097. this.generateFlag = false
  1098. }
  1099. });
  1100. return
  1101. }else if(this.invoicePrice <= 0){
  1102. this.$alert('请输入入库价格!', '使用寿命', {
  1103. confirmButtonText: '确定',
  1104. callback: action => {
  1105. this.serviceLife = 0
  1106. this.generateFlag = false
  1107. }
  1108. });
  1109. return
  1110. }
  1111. if(this.radio == 'N'){
  1112. this.saveToolInstanceId()
  1113. }else{
  1114. let queryLocation = {
  1115. site : this.site,
  1116. locationid : this.locationNo,
  1117. limit : 1,
  1118. page : 1,
  1119. }
  1120. this.saveToolInstanceId()
  1121. // this.initLocationFlag(queryLocation)
  1122. }
  1123. },
  1124. //保存接收信息
  1125. saveToolInstanceId(){
  1126. let status;
  1127. if(this.radio == "Y"){
  1128. status = "出库"
  1129. }else{
  1130. status = "已启用"
  1131. }
  1132. let saveData = {
  1133. site : this.site,
  1134. toolId : this.ifsToolData.toolId,
  1135. description : this.ifsToolData.description,
  1136. userName : this.$store.state.user.name,
  1137. locationId : this.locationNo,
  1138. vendorNo : this.ifsToolData.vendorNo,
  1139. status : status,
  1140. estUseQty : this.serviceLife,
  1141. torNumacc : this.ifsToolData.torNumacc,
  1142. torNumdown : this.ifsToolData.torNumdown,
  1143. transactionId : this.ifsToolData.transactionId,
  1144. receiveQuantity : this.receiveQuantity,
  1145. type : this.radio,
  1146. orderNo : this.ifsToolData.orderNo,
  1147. releaseNo : this.ifsToolData.releaseNo,
  1148. sequenceNo : this.ifsToolData.sequenceNo,
  1149. lineItemNo : this.ifsToolData.lineItemNo,
  1150. vendorName : this.ifsToolData.vendorName,
  1151. invoicePrice : this.invoicePrice,
  1152. }
  1153. let currQty = this.receiveQuantity
  1154. saveToolDetail(saveData).then(({data}) =>{
  1155. this.generateFlag = false
  1156. if (data.code == 0) {
  1157. this.ifsToolData.generateQuantity += parseInt(currQty)
  1158. this.initPoToolTable()
  1159. } else {
  1160. }
  1161. this.$alert(data.msg, '操作提示', {
  1162. confirmButtonText: '确定',
  1163. callback: action => {
  1164. this.addPRDetailFlag = false
  1165. this.bannersBut = false
  1166. }
  1167. });
  1168. })
  1169. },
  1170. //校验是否存在库位
  1171. async initLocationFlag(queryLocation){
  1172. let locationFlag
  1173. await getLocationList(queryLocation).then(({data}) =>{
  1174. if (data && data.code === 0) {
  1175. let list = data.rows.list
  1176. if(list.length >0){
  1177. this.saveToolInstanceId()
  1178. }else {
  1179. this.$alert('请输入正确的库位!', '录入库位', {
  1180. confirmButtonText: '确定',
  1181. callback: action => {
  1182. this.serviceLife = 0
  1183. this.generateFlag = false
  1184. }
  1185. });
  1186. }
  1187. }
  1188. })
  1189. return locationFlag
  1190. },
  1191. //判断是否超过接收总数量
  1192. initQtyAlert(){
  1193. if(this.receiveQuantity > this.ifsToolData.quantity - this.ifsToolData.generateQuantity){
  1194. this.$alert('超过当前接收数量!', '接收数量', {
  1195. confirmButtonText: '确定',
  1196. callback: action => {
  1197. this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
  1198. }
  1199. });
  1200. }
  1201. },
  1202. //校验横幅宽幅是否存在
  1203. initBannersFlag(row){
  1204. this.ifsToolData = row
  1205. if(this.ifsToolData.torNumacc == null || this.ifsToolData.torNumacc == "" || this.ifsToolData.torNumdown == null || this.ifsToolData.torNumdown == ""){
  1206. this.torNumacc = ''
  1207. this.torNumdown = ''
  1208. this.bannersFlag = true;
  1209. }else {
  1210. this.torNumacc = this.ifsToolData.torNumacc
  1211. this.torNumdown = this.ifsToolData.torNumdown
  1212. this.initPoToolTable()
  1213. }
  1214. },
  1215. initPoToolTable(){
  1216. //是否显示加载效果
  1217. this.poToolFlag = true
  1218. this.dataListLoading = true
  1219. let queryPoTool = {
  1220. // 工具编码
  1221. toolId : this.ifsToolData.toolId,
  1222. // 工厂
  1223. site : this.site,
  1224. // 接收号
  1225. toolInstanceId : this.ifsToolData.transactionId,
  1226. }
  1227. this.receiveQuantity = this.ifsToolData.quantity - this.ifsToolData.generateQuantity
  1228. this.serviceLife = 0
  1229. this.radio = '0'
  1230. this.invoicePrice = 0
  1231. this.locationNo = ''
  1232. this.generateFlag = false
  1233. getPoToolList(queryPoTool).then(({data}) =>{
  1234. if (data && data.code === 0) {
  1235. this.poToolList = data.rows
  1236. } else {
  1237. this.poToolList = []
  1238. }
  1239. this.dataListLoading = false
  1240. })
  1241. },
  1242. // 获取数据列表
  1243. initViewIfsTable(val) {
  1244. if(val == "Y"){
  1245. this.pageIndex = 1
  1246. }
  1247. //是否显示加载效果
  1248. this.dataListLoading = true
  1249. //显示数据条数
  1250. this.queryViewIfs.limit = this.pageSize
  1251. //分页页面
  1252. this.queryViewIfs.page = this.pageIndex
  1253. //设置工厂
  1254. this.queryViewIfs.site = this.site
  1255. //
  1256. getViewIfsList(this.queryViewIfs).then(({data}) => {
  1257. if (data && data.code === 0) {
  1258. this.dataList = data.rows.list
  1259. this.totalPage = data.rows.totalCount
  1260. } else {
  1261. this.dataList = []
  1262. this.totalPage = 0
  1263. }
  1264. this.dataListLoading = false
  1265. })
  1266. },
  1267. // 收藏
  1268. favorites() {
  1269. },
  1270. // 保存语言编辑
  1271. saveLanguageList(val) {
  1272. saveSysLanguageOne(val).then(({data}) => {
  1273. if (data.code == 0) {
  1274. this.$message.success(data.msg)
  1275. } else {
  1276. this.$message.error(data.msg)
  1277. }
  1278. })
  1279. },
  1280. // 编辑语言
  1281. addLanguageFun() {
  1282. if (this.querySysLanguagePack.languageCode) {
  1283. this.addLanguage = true
  1284. this.languageColumnList = []
  1285. let query = {
  1286. functionId: 1001,
  1287. tableId: "common1002",
  1288. languageCode: this.$i18n.locale
  1289. }
  1290. getTableDefaultListLanguage(query).then(({data}) => {
  1291. if (data.rows.length > 0) {
  1292. this.languageColumnList = data.rows
  1293. }
  1294. })
  1295. this.languageColumnList = this.columnList
  1296. searchLanguageListByLanguageCode(this.querySysLanguagePack).then(({data}) => {
  1297. this.languageDataList = data.rows
  1298. })
  1299. } else {
  1300. this.$message("请选中一种语言")
  1301. }
  1302. },
  1303. // 获取多语言列表
  1304. getLanguageList() {
  1305. searchSysLanguage(this.queryLanguage).then(({data}) => {
  1306. this.languageList = data.rows
  1307. })
  1308. },
  1309. // 获取button的词典
  1310. getFunctionButtonList() {
  1311. searchFunctionButtonList(this.queryButton).then(({data}) => {
  1312. if (data.data.length>0) {
  1313. this.buttons = data.data
  1314. } else {
  1315. saveButtonList(this.buttonList).then(({data}) => {
  1316. })
  1317. }
  1318. })
  1319. },
  1320. // 获取语言词典
  1321. getSysLanguageParamList() {
  1322. searchSysLanguageParam(this.querySysLanguageParam).then(({data}) => {
  1323. this.sysLanguageParams = data.rows
  1324. })
  1325. },
  1326. // 打开页面设置
  1327. userSetting() {
  1328. this.visible = true;
  1329. this.getTableUserAll()
  1330. },
  1331. // 获取 用户的配置
  1332. getTableUserAll() {
  1333. let queryTable = {
  1334. userId: this.$store.state.user.name,
  1335. functionId: 1001,
  1336. tableId: this.tableId,
  1337. languageCode: this.$i18n.locale
  1338. }
  1339. this.visible = true;
  1340. this.$nextTick(() => {
  1341. this.$refs.column.init(queryTable);
  1342. });
  1343. },
  1344. // 获取 用户保存的 格式列
  1345. getTableUserColumn() {
  1346. getTableUserListLanguage(this.queryTableUser).then(({data}) => {
  1347. if (data.rows.length > 0) {
  1348. //this.columnList = []
  1349. this.columnList = data.rows
  1350. } else {
  1351. this.getColumnList()
  1352. }
  1353. })
  1354. },
  1355. // 保存 默认配置 列
  1356. saveColumnList() {
  1357. saveTableDefaultList(this.columnList).then(({data}) => {
  1358. if (data.code == 0) {
  1359. this.$message.success(data.msg)
  1360. this.showDefault = false
  1361. } else {
  1362. this.$message.error(data.msg)
  1363. }
  1364. })
  1365. saveTableDefaultList(this.columnList1).then(({data}) => {
  1366. if (data.code == 0) {
  1367. this.$message.success(data.msg)
  1368. this.showDefault = false
  1369. } else {
  1370. this.$message.error(data.msg)
  1371. }
  1372. })
  1373. this.getFunctionButtonList();
  1374. this.getColumnList()
  1375. },
  1376. // 获取 tableDefault 列
  1377. getColumnList() {
  1378. getTableDefaultListLanguage(this.queryTable).then(({data}) => {
  1379. if (!data.rows.length == 0) {
  1380. this.showDefault = false
  1381. this.columnList = data.rows
  1382. } else {
  1383. this.showDefault = true
  1384. }
  1385. })
  1386. },
  1387. // 获取数据列表
  1388. getDataList() {
  1389. this.dataListLoading = true
  1390. this.querySysLanguagePack.limit = this.pageSize
  1391. this.querySysLanguagePack.page = this.pageIndex
  1392. searchSysLanguagePackList(this.querySysLanguagePack).then(({data}) => {
  1393. if (data && data.code === 0) {
  1394. this.dataList = data.page.list
  1395. this.totalPage = data.page.totalCount
  1396. } else {
  1397. this.dataList = []
  1398. this.totalPage = 0
  1399. }
  1400. this.dataListLoading = false
  1401. })
  1402. },
  1403. // 每页数
  1404. sizeChangeHandle(val) {
  1405. this.pageSize = val
  1406. this.pageIndex = 1
  1407. this.initViewIfsTable()
  1408. },
  1409. // 当前页
  1410. currentChangeHandle(val) {
  1411. this.pageIndex = val
  1412. this.initViewIfsTable()
  1413. },
  1414. // 多选
  1415. selectionChangeHandle(val) {
  1416. this.dataListSelections = val
  1417. },
  1418. // 删除
  1419. deleteHandle(id) {
  1420. var ids = id ? [id] : this.dataListSelections.map(item => {
  1421. return item.id
  1422. })
  1423. this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
  1424. confirmButtonText: '确定',
  1425. cancelButtonText: '取消',
  1426. type: 'warning'
  1427. }).then(() => {
  1428. this.$http({
  1429. url: this.$http.adornUrl('//prd/delete'),
  1430. method: 'post',
  1431. data: this.$http.adornData(ids, false)
  1432. }).then(({data}) => {
  1433. if (data && data.code === 0) {
  1434. this.$message({
  1435. message: '操作成功',
  1436. type: 'success',
  1437. duration: 1500,
  1438. onClose: () => {
  1439. this.getDataList()
  1440. }
  1441. })
  1442. } else {
  1443. this.$message.error(data.msg)
  1444. }
  1445. })
  1446. })
  1447. },
  1448. fields(){
  1449. let json = "{"
  1450. this.columnList.forEach((item,index) =>{
  1451. if (index == this.columnList.length-1 ){
  1452. json +="\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\""
  1453. }else {
  1454. json += "\""+item.columnLabel+"\"" +":"+"\""+item.columnProp+"\""+ ","
  1455. }
  1456. })
  1457. json +="}"
  1458. let s = eval("(" + json + ")")
  1459. return s
  1460. },
  1461. createExportData() {
  1462. // 点击导出按钮之后,开始导出数据之前的执行函数,返回值为需要下载的数据
  1463. // TODO:构造需要下载的数据返回
  1464. exportList(this.queryViewIfs).then(({data}) => {
  1465. if (data && data.code === 0) {
  1466. return data.rows.list;
  1467. }
  1468. })
  1469. return this.dataList;
  1470. },
  1471. startDownload() {
  1472. // this.exportData = this.dataList
  1473. console.log("数据开始")
  1474. },
  1475. finishDownload() {
  1476. console.log("数据下载完成")
  1477. }
  1478. },
  1479. created() {
  1480. this.getTableUserColumn()
  1481. this.getSysLanguageParamList()
  1482. this.getFunctionButtonList()
  1483. }
  1484. }
  1485. </script>
  1486. <style>
  1487. .sl-input {
  1488. background-color: transparent;
  1489. border: 0 !important;
  1490. font-size: 12px !important;
  1491. height: 12px !important;
  1492. line-height: 14px !important;
  1493. background-color: transparent !important;
  1494. width: 140px;
  1495. }
  1496. .sl-input:focus, textarea:focus {
  1497. outline: none;
  1498. }
  1499. </style>