plm前端
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.

1491 lines
51 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'客户编码'">
  6. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'客户名称'">
  9. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'跟单员'">
  12. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'产品编码'">
  15. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'产品名称'">
  18. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'要求交付日期'">
  21. <el-date-picker
  22. style="width: 120px"
  23. v-model="searchData.startDate"
  24. type="date"
  25. value-format="yyyy-MM-dd"
  26. placeholder="选择日期">
  27. </el-date-picker>
  28. </el-form-item>
  29. <el-form-item style="margin-top: 23px;">
  30. <laber style="margin-left: 0px;font-size: 19px">&#10142</laber>
  31. </el-form-item>
  32. <el-form-item :label="' '">
  33. <el-date-picker
  34. style="width: 120px"
  35. v-model="searchData.endDate"
  36. type="date"
  37. value-format="yyyy-MM-dd"
  38. placeholder="选择日期">
  39. </el-date-picker>
  40. </el-form-item>
  41. </el-form>
  42. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  43. <el-form-item :label="'项目编码'">
  44. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  45. </el-form-item>
  46. <el-form-item :label="'项目名称'">
  47. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'工程师'">
  50. <el-input v-model="searchData.engineerName" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'优先等级'">
  53. <el-select v-model="searchData.priorityLevel" style="width: 120px">
  54. <el-option label="全部" value=""></el-option>
  55. <el-option label="紧急" value="紧急"></el-option>
  56. <el-option label="一般" value="一般"></el-option>
  57. <el-option label="不紧急" value="不紧急"></el-option>
  58. </el-select>
  59. </el-form-item>
  60. <el-form-item :label="'状态'">
  61. <el-select v-model="searchData.proofingResultStatus" style="width: 120px">
  62. <el-option label="全部" value=""></el-option>
  63. <el-option label="已下达" value="C"></el-option>
  64. <el-option label="已完成打样" value="E"></el-option>
  65. <el-option label="已提交打样" value="S"></el-option>
  66. <el-option label="客户已反馈" value="R"></el-option>
  67. </el-select>
  68. </el-form-item>
  69. <el-form-item :label="' '">
  70. <el-button @click="getDataList()">查询</el-button>
  71. <download-excel
  72. :fields="fields()"
  73. :data="exportData"
  74. type="xls"
  75. :name="exportName"
  76. :header="exportHeader"
  77. :footer="exportFooter"
  78. :fetch="createExportData"
  79. :before-generate="startDownload"
  80. :before-finish="finishDownload"
  81. worksheet="导出信息"
  82. class="el-button el-button--primary el-button--medium">
  83. {{ "导出" }}
  84. </download-excel>
  85. </el-form-item>
  86. </el-form>
  87. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  88. <el-form-item :label="' '">
  89. <el-button @click="proofingResultModal()" class="el-button el-button--primary el-button--medium">录入打样结果</el-button>
  90. <el-button @click="submitProofingModal()" class="el-button el-button--primary el-button--medium">录入送样信息</el-button>
  91. <el-button @click="customerResponseModal()" class="el-button el-button--primary el-button--medium">客户回复</el-button>
  92. </el-form-item>
  93. </el-form>
  94. <!-- 打样列表 -->
  95. <el-table
  96. :height="height"
  97. :data="dataList"
  98. border
  99. ref="proofingTable"
  100. @row-click="proofingClickRow"
  101. @selection-change="selectionProofing"
  102. v-loading="dataListLoading"
  103. style="width: 100%;">
  104. <el-table-column
  105. type="selection"
  106. header-align="center"
  107. align="center"
  108. :selectable="selectFlag"
  109. width="50">
  110. </el-table-column>
  111. <el-table-column
  112. prop="proofingResultStatus"
  113. header-align="center"
  114. align="center"
  115. label="状态">
  116. <template slot-scope="scope">
  117. <span v-show="scope.row.proofingResultStatus === 'C'">已下达</span>
  118. <span v-show="scope.row.proofingResultStatus === 'E'">已完成打样</span>
  119. <span v-show="scope.row.proofingResultStatus === 'S'">已提交打样</span>
  120. <span v-show="scope.row.proofingResultStatus === 'R'">客户已反馈</span>
  121. </template>
  122. </el-table-column>
  123. <el-table-column
  124. v-for="(item,index) in columnList" :key="index"
  125. :sortable="item.columnSortable"
  126. :prop="item.columnProp"
  127. :header-align="item.headerAlign"
  128. :show-overflow-tooltip="item.showOverflowTooltip"
  129. :align="item.align"
  130. :fixed="item.fixed === ''?false:item.fixed"
  131. :min-width="item.columnWidth"
  132. :label="item.columnLabel">
  133. <template slot-scope="scope">
  134. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  135. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  136. </template>
  137. </el-table-column>
  138. </el-table>
  139. <selectDiv ref="selectDiv"></selectDiv>
  140. <!-- 分页插件 -->
  141. <el-pagination style="margin-top: 0px"
  142. @size-change="sizeChangeHandle"
  143. @current-change="currentChangeHandle"
  144. :current-page="pageIndex"
  145. :page-sizes="[20, 50, 100, 200, 500]"
  146. :page-size="pageSize"
  147. :total="totalPage"
  148. layout="total, sizes, prev, pager, next, jumper">
  149. </el-pagination>
  150. <!-- 录入打样结果模态框 -->
  151. <el-dialog title="录入打样结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag" width="785px">
  152. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left: 0px;margin-top: 10px;">
  153. <el-form-item label="实际交付日期" prop="actualityDeliveryDate" :rules="enterResultRules.actualityDeliveryDate">
  154. <el-date-picker v-model="enterResultData.actualityDeliveryDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  155. </el-form-item>
  156. </el-form>
  157. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left:0px;margin-top: 5px;">
  158. <el-form-item label="打样结果信息" prop="proofingResultInformation" :rules="enterResultRules.proofingResultInformation">
  159. <el-input type="textarea" v-model="enterResultData.proofingResultInformation" :rows="3" resize='none' show-word-limit style="width: 500px;height: 30px"></el-input>
  160. </el-form-item>
  161. </el-form>
  162. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  163. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  164. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  165. </el-form>
  166. <el-table
  167. :height="200"
  168. :data="enterResultData.fileContentList"
  169. border
  170. v-loading="dataListLoading"
  171. style="width: 100%">
  172. <el-table-column
  173. v-for="(item,index) in fileColumnList" :key="index"
  174. :sortable="item.columnSortable"
  175. :prop="item.columnProp"
  176. :header-align="item.headerAlign"
  177. :show-overflow-tooltip="item.showOverflowTooltip"
  178. :align="item.align"
  179. :fixed="item.fixed===''?false:item.fixed"
  180. :min-width="item.columnWidth"
  181. :label="item.columnLabel">
  182. <template slot-scope="scope">
  183. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  184. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  185. </template>
  186. </el-table-column>
  187. <el-table-column
  188. fixed="right"
  189. header-align="center"
  190. align="center"
  191. width="100"
  192. label="操作">
  193. <template slot-scope="scope">
  194. <a @click="deleteFile(scope.row)">删除</a>
  195. </template>
  196. </el-table-column>
  197. </el-table>
  198. </el-form>
  199. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  200. <el-button type="primary" @click="saveProofingResult()">保存</el-button>
  201. <el-button type="primary" @click="closeProofingResultModal()">关闭</el-button>
  202. </el-footer>
  203. </el-dialog>
  204. <!-- 录入送样信息模态框 -->
  205. <el-dialog title="录入送样信息" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag" width="620px">
  206. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules" style="margin-left: 0px;margin-top: 10px;">
  207. <el-form-item label="实际提交客户日期" prop="actualitySubmissionDate" :rules="submitResultRules.actualitySendSamplesDate">
  208. <el-date-picker v-model="submitResultData.actualitySendSamplesDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  209. </el-form-item>
  210. <el-form-item label="提交方式" prop="submissionMethod" :rules="submitResultData.sendSamplesMethod">
  211. <el-select v-model="submitResultData.sendSamplesMethod" style="width: 221px">
  212. <el-option label="邮件" value="邮件"></el-option>
  213. <el-option label="口头" value="口头"></el-option>
  214. <el-option label="微信" value="微信"></el-option>
  215. <el-option label="其它" value="其它"></el-option>
  216. </el-select>
  217. </el-form-item>
  218. </el-form>
  219. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  220. <el-form-item label="提交备注">
  221. <el-input type="textarea" v-model="submitResultData.submissionRemark" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  222. </el-form-item>
  223. </el-form>
  224. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  225. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  226. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  227. </el-footer>
  228. </el-dialog>
  229. <!-- 客户回复模态框 -->
  230. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag" width="620px">
  231. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules" style="margin-left: 0px;margin-top: 10px;">
  232. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  233. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 185px"></el-date-picker>
  234. </el-form-item>
  235. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  236. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  237. <el-option label="接受" value="接受"></el-option>
  238. <el-option label="不接受" value="不接受"></el-option>
  239. </el-select>
  240. </el-form-item>
  241. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  242. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  243. </el-form-item>
  244. </el-form>
  245. <el-form :inline="true" label-position="top" :model="customerResponseData" style="margin-left:0px;margin-top: 5px;">
  246. <el-form-item label="客户回复信息">
  247. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none' show-word-limit style="width: 595px;height: 30px"></el-input>
  248. </el-form-item>
  249. </el-form>
  250. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  251. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  252. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  253. </el-footer>
  254. </el-dialog>
  255. <!-- 上传文件的modal -->
  256. <proofingUploadFile ref="proofingUploadFile" @refreshPageTables="getFileContentData()" v-drag></proofingUploadFile>
  257. </div>
  258. </template>
  259. <script>
  260. import {
  261. proofingInformationSearch, // 打样信息列表查询
  262. getFileContentList, // 获取报价单附件列表
  263. batchDeleteProofingFile, // 批量文件删除
  264. saveProofingResult, // 保存打样结果
  265. saveSubmitResult, // 保存提交结果
  266. saveCustomerResponse, // 保存客户回复
  267. checkProofingStatus, // 检查打样进度
  268. closeModalDeleteFile, // 关闭模态框删除文件
  269. } from '@/api/proofing/proofingInformation.js'
  270. import proofingUploadFile from "./proofing_upload_file"
  271. export default {
  272. components: {
  273. proofingUploadFile
  274. },
  275. watch: {
  276. searchData: {
  277. deep: true,
  278. handler: function (newV, oldV) {
  279. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  280. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  281. }
  282. },
  283. modalData: {
  284. deep: true,
  285. handler: function (newV, oldV) {
  286. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  287. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  288. this.modalData.proofingNo = this.modalData.proofingNo.toUpperCase()
  289. }
  290. }
  291. },
  292. data () {
  293. return {
  294. // 导出
  295. exportData: [],
  296. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  297. exportHeader: ['设备分类'],
  298. exportFooter: [],
  299. resultList: [],
  300. // ======== 行高 ========
  301. height: 200,
  302. // ======== 分页 ========
  303. pageIndex: 1,
  304. pageSize: 50,
  305. totalPage: 0,
  306. selectedDataNum: 0,
  307. // 条件查询
  308. searchData: {
  309. site: this.$store.state.user.site,
  310. customerNo: '',
  311. customerDesc: '',
  312. trackerName: '',
  313. testPartNo: '',
  314. partName: '',
  315. proofingStatus: '下达',
  316. proofingResultStatus: '',
  317. startDate: '',
  318. endDate: '',
  319. projectId: '',
  320. projectName: '',
  321. engineerName: '',
  322. priorityLevel: '',
  323. page: 1,
  324. limit: 10
  325. },
  326. // 其它
  327. dataListLoading: false,
  328. // ======== 数据对象 ========
  329. modalData: {
  330. flag: '',
  331. title: '',
  332. site: this.$store.state.user.site,
  333. quotationNo: '',
  334. customerNo: '',
  335. customerDesc: '',
  336. projectId: '',
  337. projectName: '',
  338. tracker: '',
  339. trackerName: '',
  340. quoter: '',
  341. quoterName: '',
  342. quotationStatus: '',
  343. testPartNo: '',
  344. partName: '',
  345. priorityLevel: '',
  346. requiredCompletionDate: '',
  347. remark: '',
  348. technicalConsiderations: '',
  349. customerResponsiblePerson: '',
  350. customerResponsiblePersonPhone: '',
  351. nextToDo: '',
  352. actualityQuotationDate: '',
  353. quotationResultInformation: '',
  354. actualitySubmissionDate: new Date(),
  355. submissionMethod: '',
  356. submissionRemark: '',
  357. actualityReplyDate: '',
  358. confirmResults: '',
  359. confirmBy: '',
  360. confirmInformation: '',
  361. proofingResultStatus: '',
  362. createDate: '',
  363. createBy: '',
  364. updateDate: '',
  365. updateBy: ''
  366. },
  367. quotationResultData: {
  368. actualityQuotationDate: '',
  369. quotationResultInformation: '',
  370. actualitySubmissionDate: '',
  371. submissionMethod: '',
  372. submissionRemark: '',
  373. confirmResults: '',
  374. actualityReplyDate: '',
  375. confirmBy: '',
  376. confirmInformation: '',
  377. proofingResultStatus: '',
  378. },
  379. enterResultData: {
  380. site: this.$store.state.user.site,
  381. proofingNo: '',
  382. actualityDeliveryDate: new Date(),
  383. proofingResultInformation: '',
  384. updateBy: this.$store.state.user.name,
  385. proofingResultStatus: '',
  386. fileContentList: []
  387. },
  388. submitResultData: {
  389. site: this.$store.state.user.site,
  390. quotationNo: '',
  391. actualitySubmissionDate: '',
  392. submissionMethod: '',
  393. submissionRemark: '',
  394. updateBy: this.$store.state.user.name,
  395. proofingResultStatus: ''
  396. },
  397. customerResponseData: {
  398. site: this.$store.state.user.site,
  399. quotationNo: '',
  400. actualityReplyDate: '',
  401. confirmResults: '',
  402. confirmBy: '',
  403. confirmInformation: '',
  404. updateBy: this.$store.state.user.name,
  405. proofingResultStatus: ''
  406. },
  407. // ======== 数据列表 ========
  408. dataList: [],
  409. // ======== 列表表头 ========
  410. columnList: [
  411. {
  412. userId: this.$store.state.user.name,
  413. functionId: 103001,
  414. serialNumber: '103001Table1ProofingNo',
  415. tableId: '103001Table1',
  416. tableName: '打样信息表',
  417. columnProp: 'proofingNo',
  418. headerAlign: 'center',
  419. align: 'center',
  420. columnLabel: '打样单号',
  421. columnHidden: false,
  422. columnImage: false,
  423. columnSortable: false,
  424. sortLv: 0,
  425. status: true,
  426. fixed: '',
  427. columnWidth: 120
  428. },
  429. {
  430. userId: this.$store.state.user.name,
  431. functionId: 103001,
  432. serialNumber: '103001Table1CustomerNo',
  433. tableId: '103001Table1',
  434. tableName: '打样信息表',
  435. columnProp: 'customerNo',
  436. headerAlign: 'center',
  437. align: 'center',
  438. columnLabel: '客户编码',
  439. columnHidden: false,
  440. columnImage: false,
  441. columnSortable: false,
  442. sortLv: 0,
  443. status: true,
  444. fixed: '',
  445. columnWidth: 100
  446. },
  447. {
  448. userId: this.$store.state.user.name,
  449. functionId: 103001,
  450. serialNumber: '103001Table1CustomerDesc',
  451. tableId: '103001Table1',
  452. tableName: '打样信息表',
  453. columnProp: 'customerDesc',
  454. headerAlign: 'center',
  455. align: 'center',
  456. columnLabel: '客户名称',
  457. columnHidden: false,
  458. columnImage: false,
  459. columnSortable: false,
  460. sortLv: 0,
  461. status: true,
  462. fixed: '',
  463. columnWidth: 120
  464. },
  465. {
  466. userId: this.$store.state.user.name,
  467. functionId: 103001,
  468. serialNumber: '103001Table1ProjectId',
  469. tableId: '103001Table1',
  470. tableName: '打样信息表',
  471. columnProp: 'projectId',
  472. headerAlign: 'center',
  473. align: 'center',
  474. columnLabel: '项目编码',
  475. columnHidden: false,
  476. columnImage: false,
  477. columnSortable: false,
  478. sortLv: 0,
  479. status: true,
  480. fixed: '',
  481. columnWidth: 100
  482. },
  483. {
  484. userId: this.$store.state.user.name,
  485. functionId: 103001,
  486. serialNumber: '103001Table1ProjectName',
  487. tableId: '103001Table1',
  488. tableName: '打样信息表',
  489. columnProp: 'projectName',
  490. headerAlign: 'center',
  491. align: 'center',
  492. columnLabel: '项目名称',
  493. columnHidden: false,
  494. columnImage: false,
  495. columnSortable: false,
  496. sortLv: 0,
  497. status: true,
  498. fixed: '',
  499. columnWidth: 120
  500. },
  501. {
  502. userId: this.$store.state.user.name,
  503. functionId: 103001,
  504. serialNumber: '103001Table1TrackerName',
  505. tableId: '103001Table1',
  506. tableName: '打样信息表',
  507. columnProp: 'trackerName',
  508. headerAlign: 'center',
  509. align: 'center',
  510. columnLabel: '跟单员',
  511. columnHidden: false,
  512. columnImage: false,
  513. columnSortable: false,
  514. sortLv: 0,
  515. status: true,
  516. fixed: '',
  517. columnWidth: 80
  518. },
  519. {
  520. userId: this.$store.state.user.name,
  521. functionId: 103001,
  522. serialNumber: '103001Table1EngineerName',
  523. tableId: '103001Table1',
  524. tableName: '打样信息表',
  525. columnProp: 'engineerName',
  526. headerAlign: 'center',
  527. align: 'center',
  528. columnLabel: '工程师',
  529. columnHidden: false,
  530. columnImage: false,
  531. columnSortable: false,
  532. sortLv: 0,
  533. status: true,
  534. fixed: '',
  535. columnWidth: 80
  536. },
  537. {
  538. userId: this.$store.state.user.name,
  539. functionId: 103001,
  540. serialNumber: '103001Table1TestPartNo',
  541. tableId: '103001Table1',
  542. tableName: '打样信息表',
  543. columnProp: 'testPartNo',
  544. headerAlign: 'center',
  545. align: 'center',
  546. columnLabel: '项目料号',
  547. columnHidden: false,
  548. columnImage: false,
  549. columnSortable: false,
  550. sortLv: 0,
  551. status: true,
  552. fixed: '',
  553. columnWidth: 100
  554. },
  555. {
  556. userId: this.$store.state.user.name,
  557. functionId: 103001,
  558. serialNumber: '103001Table1PartName',
  559. tableId: '103001Table1',
  560. tableName: '打样信息表',
  561. columnProp: 'partName',
  562. headerAlign: 'center',
  563. align: 'center',
  564. columnLabel: '物料名称',
  565. columnHidden: false,
  566. columnImage: false,
  567. columnSortable: false,
  568. sortLv: 0,
  569. status: true,
  570. fixed: '',
  571. columnWidth: 100
  572. },
  573. {
  574. userId: this.$store.state.user.name,
  575. functionId: 103001,
  576. serialNumber: '103001Table1PriorityLevel',
  577. tableId: '103001Table1',
  578. tableName: '打样信息表',
  579. columnProp: 'priorityLevel',
  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: '',
  589. columnWidth: 80
  590. },
  591. {
  592. userId: this.$store.state.user.name,
  593. functionId: 103001,
  594. serialNumber: '103001Table1ProofingNumber',
  595. tableId: '103001Table1',
  596. tableName: '打样信息表',
  597. columnProp: 'proofingNumber',
  598. headerAlign: 'center',
  599. align: 'center',
  600. columnLabel: '打样数量',
  601. columnHidden: false,
  602. columnImage: false,
  603. columnSortable: false,
  604. sortLv: 0,
  605. status: true,
  606. fixed: '',
  607. columnWidth: 80
  608. },
  609. {
  610. userId: this.$store.state.user.name,
  611. functionId: 103001,
  612. serialNumber: '103001Table1RequiredDeliveryDate',
  613. tableId: '103001Table1',
  614. tableName: '打样信息表',
  615. columnProp: 'requiredDeliveryDate',
  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: '',
  625. columnWidth: 160
  626. },
  627. {
  628. userId: this.$store.state.user.name,
  629. functionId: 103001,
  630. serialNumber: '103001Table1ProofingStatus',
  631. tableId: '103001Table1',
  632. tableName: '打样信息表',
  633. columnProp: 'proofingStatus',
  634. headerAlign: 'center',
  635. align: 'center',
  636. columnLabel: '状态',
  637. columnHidden: false,
  638. columnImage: false,
  639. columnSortable: false,
  640. sortLv: 0,
  641. status: true,
  642. fixed: '',
  643. columnWidth: 80
  644. },
  645. {
  646. userId: this.$store.state.user.name,
  647. functionId: 103001,
  648. serialNumber: '103001Table1CreateDate',
  649. tableId: '103001Table1',
  650. tableName: '打样信息表',
  651. columnProp: 'createDate',
  652. headerAlign: 'center',
  653. align: 'center',
  654. columnLabel: '创建时间',
  655. columnHidden: false,
  656. columnImage: false,
  657. columnSortable: false,
  658. sortLv: 0,
  659. status: true,
  660. fixed: '',
  661. columnWidth: 160
  662. },
  663. {
  664. userId: this.$store.state.user.name,
  665. functionId: 103001,
  666. serialNumber: '103001Table1CreateBy',
  667. tableId: '103001Table1',
  668. tableName: '打样信息表',
  669. columnProp: 'createBy',
  670. headerAlign: 'center',
  671. align: 'center',
  672. columnLabel: '创建人',
  673. columnHidden: false,
  674. columnImage: false,
  675. columnSortable: false,
  676. sortLv: 0,
  677. status: true,
  678. fixed: '',
  679. columnWidth: 80
  680. },
  681. {
  682. userId: this.$store.state.user.name,
  683. functionId: 103001,
  684. serialNumber: '103001Table1UpdateDate',
  685. tableId: '103001Table1',
  686. tableName: '打样信息表',
  687. columnProp: 'updateDate',
  688. headerAlign: 'center',
  689. align: 'center',
  690. columnLabel: '更新时间',
  691. columnHidden: false,
  692. columnImage: false,
  693. columnSortable: false,
  694. sortLv: 0,
  695. status: true,
  696. fixed: '',
  697. columnWidth: 160
  698. },
  699. {
  700. userId: this.$store.state.user.name,
  701. functionId: 103001,
  702. serialNumber: '103001Table1UpdateBy',
  703. tableId: '103001Table1',
  704. tableName: '打样信息表',
  705. columnProp: 'updateBy',
  706. headerAlign: 'center',
  707. align: 'center',
  708. columnLabel: '更新人',
  709. columnHidden: false,
  710. columnImage: false,
  711. columnSortable: false,
  712. sortLv: 0,
  713. status: true,
  714. fixed: '',
  715. columnWidth: 80
  716. }
  717. ],
  718. fileColumnList: [
  719. {
  720. userId: this.$store.state.user.name,
  721. functionId: 102001,
  722. serialNumber: '102001Table2FileName',
  723. tableId: '102001Table2',
  724. tableName: '文件信息表',
  725. columnProp: 'fileName',
  726. headerAlign: 'center',
  727. align: 'center',
  728. columnLabel: '文件名称',
  729. columnHidden: false,
  730. columnImage: false,
  731. columnSortable: false,
  732. sortLv: 0,
  733. status: true,
  734. fixed: '',
  735. columnWidth: 140
  736. },
  737. {
  738. userId: this.$store.state.user.name,
  739. functionId: 102001,
  740. serialNumber: '102001Table2FileRemark',
  741. tableId: '102001Table2',
  742. tableName: '文件信息表',
  743. columnProp: 'fileRemark',
  744. headerAlign: 'center',
  745. align: 'center',
  746. columnLabel: '备注',
  747. columnHidden: false,
  748. columnImage: false,
  749. columnSortable: false,
  750. sortLv: 0,
  751. status: true,
  752. fixed: '',
  753. columnWidth: 240
  754. },
  755. // {
  756. // userId: this.$store.state.user.name,
  757. // functionId: 102001,
  758. // serialNumber: '102001Table2OrderRef3',
  759. // tableId: '102001Table2',
  760. // tableName: '文件信息表',
  761. // columnProp: 'orderRef3',
  762. // headerAlign: 'center',
  763. // align: 'center',
  764. // columnLabel: '文件描述',
  765. // columnHidden: false,
  766. // columnImage: false,
  767. // columnSortable: false,
  768. // sortLv: 0,
  769. // status: true,
  770. // fixed: '',
  771. // columnWidth: 120
  772. // },
  773. {
  774. userId: this.$store.state.user.name,
  775. functionId: 102001,
  776. serialNumber: '102001Table2CreateDate',
  777. tableId: '102001Table2',
  778. tableName: '文件信息表',
  779. columnProp: 'createDate',
  780. headerAlign: 'center',
  781. align: 'center',
  782. columnLabel: '上传时间',
  783. columnHidden: false,
  784. columnImage: false,
  785. columnSortable: false,
  786. sortLv: 0,
  787. status: true,
  788. fixed: '',
  789. columnWidth: 140
  790. },
  791. {
  792. userId: this.$store.state.user.name,
  793. functionId: 102001,
  794. serialNumber: '102001Table2CreatedBy',
  795. tableId: '102001Table2',
  796. tableName: '文件信息表',
  797. columnProp: 'createdBy',
  798. headerAlign: 'center',
  799. align: 'center',
  800. columnLabel: '上传人',
  801. columnHidden: false,
  802. columnImage: false,
  803. columnSortable: false,
  804. sortLv: 0,
  805. status: true,
  806. fixed: '',
  807. columnWidth: 140
  808. }
  809. ],
  810. // ======== 必填规则 ========
  811. rules: {
  812. customerDesc: [
  813. {
  814. required: true,
  815. message: ' ',
  816. trigger: 'change'
  817. }
  818. ],
  819. trackerName: [
  820. {
  821. required: true,
  822. message: ' ',
  823. trigger: 'change'
  824. }
  825. ],
  826. projectName: [
  827. {
  828. required: true,
  829. message: ' ',
  830. trigger: 'change'
  831. }
  832. ],
  833. quoterName: [
  834. {
  835. required: true,
  836. message: ' ',
  837. trigger: 'change'
  838. }
  839. ],
  840. partName: [
  841. {
  842. required: true,
  843. message: ' ',
  844. trigger: 'change'
  845. }
  846. ],
  847. priorityLevel: [
  848. {
  849. required: true,
  850. message: ' ',
  851. trigger: 'change'
  852. }
  853. ],
  854. requiredCompletionDate: [
  855. {
  856. required: true,
  857. message: ' ',
  858. trigger: 'change'
  859. }
  860. ]
  861. },
  862. enterResultRules: {
  863. actualityDeliveryDate: [
  864. {
  865. required: true,
  866. message: ' ',
  867. trigger: 'change'
  868. }
  869. ],
  870. proofingResultInformation: [
  871. {
  872. required: true,
  873. message: ' ',
  874. trigger: 'change'
  875. }
  876. ]
  877. },
  878. submitResultRules: {
  879. actualitySubmissionDate: [
  880. {
  881. required: true,
  882. message: ' ',
  883. trigger: 'change'
  884. }
  885. ],
  886. submissionMethod: [
  887. {
  888. required: true,
  889. message: ' ',
  890. trigger: 'change'
  891. }
  892. ]
  893. },
  894. customerResponseRules: {
  895. actualityReplyDate: [
  896. {
  897. required: true,
  898. message: ' ',
  899. trigger: 'change'
  900. }
  901. ],
  902. confirmResults: [
  903. {
  904. required: true,
  905. message: ' ',
  906. trigger: 'change'
  907. }
  908. ],
  909. confirmBy: [
  910. {
  911. required: true,
  912. message: ' ',
  913. trigger: 'change'
  914. }
  915. ]
  916. },
  917. // ======== 复选数据集 ========
  918. proofingSelections: [],
  919. // ======== 选中的当前行数据 ========
  920. proofingCurrentRow: {},
  921. // ======== 模态框开关控制 ========
  922. modalFlag: false,
  923. modalDisableFlag: false,
  924. enterResultModalFlag: false,
  925. submitResultModalFlag: false,
  926. customerResponseModalFlag: false,
  927. }
  928. },
  929. mounted () {
  930. this.$nextTick(() => {
  931. this.height = window.innerHeight - 210
  932. })
  933. },
  934. created () {
  935. this.getDataList()
  936. },
  937. methods: {
  938. // ======== 分页相关方法 ========
  939. /**
  940. * 每页数
  941. * @param val
  942. */
  943. sizeChangeHandle (val) {
  944. this.pageSize = val
  945. this.pageIndex = 1
  946. this.getDataList()
  947. },
  948. /**
  949. * 当前页
  950. * @param val
  951. */
  952. currentChangeHandle (val) {
  953. this.pageIndex = val
  954. this.getDataList()
  955. },
  956. // ======== 复选框操作相关方法 ========
  957. /**
  958. * 未知
  959. * @returns {boolean}
  960. */
  961. selectFlag () {
  962. return true;
  963. },
  964. // ======== 列表数据刷新方法 ========
  965. /**
  966. * 获取数据列表
  967. */
  968. getDataList () {
  969. this.searchData.limit = this.pageSize
  970. this.searchData.page = this.pageIndex
  971. proofingInformationSearch(this.searchData).then(({data}) => {
  972. if (data.code === 0) {
  973. this.dataList = data.page.list
  974. this.pageIndex = data.page.currPage
  975. this.pageSize = data.page.pageSize
  976. this.totalPage = data.page.totalCount
  977. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  978. // 判断是否全部存在数据
  979. if (this.dataList.length > 0) {
  980. // 设置选中行
  981. this.$refs.proofingTable.setCurrentRow(this.dataList[0])
  982. this.proofingClickRow(this.dataList[0])
  983. }
  984. }
  985. this.dataListLoading = false
  986. })
  987. },
  988. // ======== 列表操作方法 ========
  989. /**
  990. * 单机选中打样信息
  991. * @param row
  992. */
  993. proofingClickRow (row) {
  994. this.$refs.proofingTable.toggleRowSelection(row)
  995. this.proofingCurrentRow = JSON.parse(JSON.stringify(row))
  996. },
  997. /**
  998. * 复选打样信息
  999. * @param val
  1000. */
  1001. selectionProofing (val) {
  1002. this.proofingSelections = val
  1003. this.$refs.selectDiv.setLengthselected(this.proofingSelections.length)
  1004. },
  1005. // ======== 报价结果相关方法 ========
  1006. /**
  1007. * 录入打样结果
  1008. */
  1009. proofingResultModal () {
  1010. // 判断是否选中打样单
  1011. if (this.proofingSelections == null || this.proofingSelections.length <= 0) {
  1012. this.$message.warning('请勾选打样单!')
  1013. return
  1014. }
  1015. let tempData = {
  1016. currentStatus: 'C',
  1017. informationList: this.proofingSelections,
  1018. }
  1019. // 检查打样单状态
  1020. checkProofingStatus(tempData).then(({data}) => {
  1021. if (data && data.code === 0) {
  1022. if (data.flag === 1) { // 状态一致
  1023. this.packProofingResultModal()
  1024. } else { // 状态不同
  1025. this.$message.warning('选中的打样单进度不一致或与按钮不符,请确认!')
  1026. }
  1027. } else {
  1028. this.$alert(data.msg, '错误', {
  1029. confirmButtonText: '确定'
  1030. })
  1031. }
  1032. })
  1033. },
  1034. /**
  1035. * 封装录入方法
  1036. */
  1037. packProofingResultModal () {
  1038. // 重置对象
  1039. this.enterResultData = {
  1040. site: this.$store.state.user.site,
  1041. proofingNo: '',
  1042. actualityDeliveryDate: new Date(),
  1043. proofingResultInformation: '',
  1044. proofingResultStatus: 'E',
  1045. fileContentList: [],
  1046. updateBy: this.$store.state.user.name
  1047. }
  1048. // 获得选中的打样号
  1049. this.proofingSelections.forEach(val => {
  1050. this.enterResultData.proofingNo += ';' + val.proofingNo
  1051. })
  1052. this.enterResultData.proofingNo = this.enterResultData.proofingNo.substring(1)
  1053. this.enterResultModalFlag = true
  1054. },
  1055. /**
  1056. * 保存打样结果
  1057. */
  1058. saveProofingResult () {
  1059. if (this.enterResultData.actualityDeliveryDate === '' || this.enterResultData.actualityDeliveryDate == null) {
  1060. this.$message.warning('请选择实际交付日期!')
  1061. return
  1062. }
  1063. if (this.enterResultData.proofingResultInformation === '' || this.enterResultData.proofingResultInformation == null) {
  1064. this.$message.warning('请填写打样结果信息!')
  1065. return
  1066. }
  1067. if (this.proofingSelections.length === 1) {
  1068. saveProofingResult(this.enterResultData).then(({data}) => {
  1069. if (data && data.code === 0) {
  1070. this.getDataList()
  1071. this.enterResultModalFlag = false
  1072. this.$message({
  1073. message: '操作成功',
  1074. type: 'success',
  1075. duration: 1500,
  1076. onClose: () => {}
  1077. })
  1078. } else {
  1079. this.$alert(data.msg, '错误', {
  1080. confirmButtonText: '确定'
  1081. })
  1082. }
  1083. })
  1084. return;
  1085. }
  1086. if (this.proofingSelections.length > 1) {
  1087. this.$confirm(`是否录入多条打样结果?`, '提示', {
  1088. confirmButtonText: '确定',
  1089. cancelButtonText: '取消',
  1090. type: 'warning'
  1091. }).then(() => {
  1092. saveProofingResult(this.enterResultData).then(({data}) => {
  1093. if (data && data.code === 0) {
  1094. this.getDataList()
  1095. this.enterResultModalFlag = false
  1096. this.$message({
  1097. message: '操作成功',
  1098. type: 'success',
  1099. duration: 1500,
  1100. onClose: () => {}
  1101. })
  1102. } else {
  1103. this.$alert(data.msg, '错误', {
  1104. confirmButtonText: '确定'
  1105. })
  1106. }
  1107. })
  1108. }).catch(() => {
  1109. })
  1110. } else {
  1111. saveProofingResult(this.enterResultData).then(({data}) => {
  1112. if (data && data.code === 0) {
  1113. this.getDataList()
  1114. this.enterResultModalFlag = false
  1115. this.$message({
  1116. message: '操作成功',
  1117. type: 'success',
  1118. duration: 1500,
  1119. onClose: () => {}
  1120. })
  1121. } else {
  1122. this.$alert(data.msg, '错误', {
  1123. confirmButtonText: '确定'
  1124. })
  1125. }
  1126. })
  1127. }
  1128. },
  1129. /**
  1130. * 关闭报价结果模态框
  1131. */
  1132. closeProofingResultModal () {
  1133. // 删除已上传的文件
  1134. let tempData = {
  1135. orderRef1: this.enterResultData.site,
  1136. proofingNo: this.enterResultData.proofingNo
  1137. }
  1138. closeModalDeleteFile(tempData).then(({data}) => {
  1139. if (data && data.code === 0) {
  1140. this.enterResultModalFlag = false
  1141. } else {
  1142. this.$alert(data.msg, '错误', {
  1143. confirmButtonText: '确定'
  1144. })
  1145. }
  1146. })
  1147. },
  1148. /**
  1149. * 录入送样信息
  1150. */
  1151. submitProofingModal () {
  1152. // 判断是否选中打样单
  1153. if (this.proofingSelections == null || this.proofingSelections.length <= 0) {
  1154. this.$message.warning('请勾选打样单!')
  1155. return
  1156. }
  1157. let tempData = {
  1158. currentStatus: 'E',
  1159. informationList: this.proofingSelections,
  1160. }
  1161. // 检查打样单状态
  1162. checkProofingStatus(tempData).then(({data}) => {
  1163. if (data && data.code === 0) {
  1164. if (data.flag === 1) { // 状态一致
  1165. this.packSubmitProofingModal()
  1166. } else { // 状态不同
  1167. this.$message.warning('选中的打样单进度不一致或与按钮不符,请确认!')
  1168. }
  1169. } else {
  1170. this.$alert(data.msg, '错误', {
  1171. confirmButtonText: '确定'
  1172. })
  1173. }
  1174. })
  1175. },
  1176. /**
  1177. * 封装送样方法
  1178. */
  1179. packSubmitProofingModal () {
  1180. this.submitResultData = {
  1181. site: this.$store.state.user.site,
  1182. proofingNo: '',
  1183. actualitySendSamplesDate: new Date(),
  1184. sendSamplesMethod: '',
  1185. deliverGoodsInformation: '',
  1186. deliverGoodsRemark: '',
  1187. proofingResultStatus: 'S',
  1188. updateBy: this.$store.state.user.name,
  1189. }
  1190. // 获得选中的打样号
  1191. this.proofingSelections.forEach(val => {
  1192. this.submitResultData.proofingNo += ';' + val.proofingNo
  1193. })
  1194. this.submitResultData.proofingNo = this.submitResultData.proofingNo.substring(1)
  1195. this.submitResultModalFlag = true
  1196. },
  1197. /**
  1198. * 保存送样结果
  1199. */
  1200. saveSubmitResult () {
  1201. if (this.submitResultData.actualitySendSamplesDate === '' || this.submitResultData.actualitySendSamplesDate == null) {
  1202. this.$message.warning('请选择实际送样日期!')
  1203. return
  1204. }
  1205. if (this.submitResultData.sendSamplesMethod === '' || this.submitResultData.sendSamplesMethod == null) {
  1206. this.$message.warning('请选择提交方式!')
  1207. return
  1208. }
  1209. if (this.proofingSelections.length === 1){
  1210. saveSubmitResult(this.submitResultData).then(({data}) => {
  1211. if (data && data.code === 0) {
  1212. this.getDataList()
  1213. this.submitResultModalFlag = false
  1214. this.$message({
  1215. message: '操作成功',
  1216. type: 'success',
  1217. duration: 1500,
  1218. onClose: () => {}
  1219. })
  1220. } else {
  1221. this.$alert(data.msg, '错误', {
  1222. confirmButtonText: '确定'
  1223. })
  1224. }
  1225. })
  1226. return;
  1227. }
  1228. if (this.proofingSelections.length > 1) {
  1229. this.$confirm(`是否录入多条送样信息?`, '提示', {
  1230. confirmButtonText: '确定',
  1231. cancelButtonText: '取消',
  1232. type: 'warning'
  1233. }).then(() => {
  1234. saveSubmitResult(this.submitResultData).then(({data}) => {
  1235. if (data && data.code === 0) {
  1236. this.getDataList()
  1237. this.submitResultModalFlag = false
  1238. this.$message({
  1239. message: '操作成功',
  1240. type: 'success',
  1241. duration: 1500,
  1242. onClose: () => {}
  1243. })
  1244. } else {
  1245. this.$alert(data.msg, '错误', {
  1246. confirmButtonText: '确定'
  1247. })
  1248. }
  1249. })
  1250. }).catch(() => {
  1251. })
  1252. }
  1253. },
  1254. /**
  1255. * 客户回复
  1256. */
  1257. customerResponseModal () {
  1258. // 判断是否选中打样单
  1259. if (this.proofingSelections == null || this.proofingSelections.length <= 0) {
  1260. this.$message.warning('请勾选打样单!')
  1261. return
  1262. }
  1263. let tempData = {
  1264. currentStatus: 'S',
  1265. informationList: this.proofingSelections,
  1266. }
  1267. // 检查打样单状态
  1268. checkProofingStatus(tempData).then(({data}) => {
  1269. if (data && data.code === 0) {
  1270. if (data.flag === 1) { // 状态一致
  1271. this.packCustomerResponseModal()
  1272. } else { // 状态不同
  1273. this.$message.warning('选中的打样单进度不一致或与按钮不符,请确认!')
  1274. }
  1275. } else {
  1276. this.$alert(data.msg, '错误', {
  1277. confirmButtonText: '确定'
  1278. })
  1279. }
  1280. })
  1281. },
  1282. /**
  1283. * 封装回复方法
  1284. */
  1285. packCustomerResponseModal () {
  1286. this.customerResponseData = {
  1287. site: this.$store.state.user.site,
  1288. proofingNo: '',
  1289. actualityReplyDate: new Date(),
  1290. confirmResults: '接受',
  1291. confirmBy: '',
  1292. confirmInformation: '',
  1293. proofingResultStatus: 'R',
  1294. updateBy: this.$store.state.user.name
  1295. }
  1296. // 获得选中的打样号
  1297. this.proofingSelections.forEach(val => {
  1298. this.customerResponseData.proofingNo += ';' + val.proofingNo
  1299. })
  1300. this.customerResponseData.proofingNo = this.customerResponseData.proofingNo.substring(1)
  1301. this.customerResponseModalFlag = true
  1302. },
  1303. /**
  1304. * 保存客户回复
  1305. */
  1306. saveCustomerResponse () {
  1307. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  1308. this.$message.warning('请选择实际回复日期!')
  1309. return
  1310. }
  1311. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  1312. this.$message.warning('请选择客户确认结果!')
  1313. return
  1314. }
  1315. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  1316. this.$message.warning('请填写客户确认人!')
  1317. return
  1318. }
  1319. if (this.proofingSelections.length === 1){
  1320. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  1321. if (data && data.code === 0) {
  1322. this.getDataList()
  1323. this.customerResponseModalFlag = false
  1324. this.$message({
  1325. message: '操作成功',
  1326. type: 'success',
  1327. duration: 1500,
  1328. onClose: () => {}
  1329. })
  1330. } else {
  1331. this.$alert(data.msg, '错误', {
  1332. confirmButtonText: '确定'
  1333. })
  1334. }
  1335. })
  1336. return;
  1337. }
  1338. if (this.proofingSelections.length > 1) {
  1339. this.$confirm(`是否提交多条客户回复?`, '提示', {
  1340. confirmButtonText: '确定',
  1341. cancelButtonText: '取消',
  1342. type: 'warning'
  1343. }).then(() => {
  1344. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  1345. if (data && data.code === 0) {
  1346. this.getDataList()
  1347. this.customerResponseModalFlag = false
  1348. this.$message({
  1349. message: '操作成功',
  1350. type: 'success',
  1351. duration: 1500,
  1352. onClose: () => {}
  1353. })
  1354. } else {
  1355. this.$alert(data.msg, '错误', {
  1356. confirmButtonText: '确定'
  1357. })
  1358. }
  1359. })
  1360. }).catch(() => {
  1361. })
  1362. }
  1363. },
  1364. // ======== 报价单附件的相关方法 ========
  1365. /**
  1366. * 获取报价单附件列表
  1367. */
  1368. getFileContentData () {
  1369. let currentData = {
  1370. orderRef1: this.$store.state.user.site,
  1371. orderRef2: this.enterResultData.proofingNo.split(';')[0]
  1372. }
  1373. getFileContentList(currentData).then(({data}) => {
  1374. if (data && data.code === 0) {
  1375. this.enterResultData.fileContentList = data.rows
  1376. } else {
  1377. this.enterResultData.fileContentList = []
  1378. }
  1379. })
  1380. },
  1381. /**
  1382. * 上传文件
  1383. */
  1384. uploadFile () {
  1385. let currentData = {
  1386. titleCon: '批量打样附件上传',
  1387. site: this.$store.state.user.site,
  1388. createBy: this.$store.state.user.name,
  1389. proofingNo: this.enterResultData.proofingNo,
  1390. fileRemark: '',
  1391. folder: 'proofingFile',
  1392. }
  1393. //打开组件 去做新增业务
  1394. this.$nextTick(() => {
  1395. this.$refs.proofingUploadFile.init(currentData)
  1396. })
  1397. },
  1398. /**
  1399. * 文件删除
  1400. * @param row
  1401. */
  1402. deleteFile (row) {
  1403. this.$confirm('确定要删除此文件?', '提示', {
  1404. confirmButtonText: '确定',
  1405. cancelButtonText: '取消',
  1406. type: 'warning'
  1407. }).then(() => {
  1408. let tempData = {
  1409. id: row.id,
  1410. fileName: row.fileName,
  1411. orderRef1: row.orderRef1,
  1412. orderRef2: row.orderRef2,
  1413. orderRef3: row.orderRef3,
  1414. proofingNo: this.enterResultData.proofingNo
  1415. }
  1416. batchDeleteProofingFile(tempData).then(({data}) => {
  1417. if (data && data.code === 0) {
  1418. this.getFileContentData()
  1419. this.$message({
  1420. message: '操作成功',
  1421. type: 'success',
  1422. duration: 1500,
  1423. onClose: () => {}
  1424. })
  1425. } else {
  1426. this.$alert(data.msg, '错误', {
  1427. confirmButtonText: '确定'
  1428. })
  1429. }
  1430. })
  1431. }).catch(() => {
  1432. })
  1433. },
  1434. // ======== 导出相关方法 ========
  1435. /**
  1436. * 导出excel
  1437. */
  1438. async createExportData () {
  1439. this.searchData.limit = -1
  1440. this.searchData.page = 1
  1441. await proofingInformationSearch(this.searchData).then(({data}) => {
  1442. this.resultList = data.page.list
  1443. })
  1444. return this.resultList
  1445. },
  1446. startDownload () {
  1447. },
  1448. finishDownload () {
  1449. },
  1450. fields () {
  1451. let json = '{'
  1452. this.columnList.forEach((item, index) => {
  1453. if (index == this.columnList.length - 1) {
  1454. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  1455. } else {
  1456. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  1457. }
  1458. })
  1459. json += '}'
  1460. let s = eval('(' + json + ')')
  1461. return s
  1462. }
  1463. }
  1464. }
  1465. </script>
  1466. <style scoped lang="scss">
  1467. /deep/ .customer-tab .el-tabs__content {
  1468. padding: 0px !important;
  1469. height: 459px;
  1470. }
  1471. </style>