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.

1283 lines
40 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  4. <el-row :gutter="10">
  5. <el-col :span="3">
  6. <el-form-item :label="'BU'">
  7. <el-select v-model="searchData.bu" placeholder="请选择" clearable>
  8. <el-option
  9. v-for = "i in userBuList"
  10. :key = "i.buNo"
  11. :label = "i.buDesc"
  12. :value = "i.buNo">
  13. </el-option>
  14. </el-select>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="3">
  18. <el-form-item label="客户编码">
  19. <el-input v-model="searchData.customerNo"></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :span="3">
  23. <el-form-item label="客户名称">
  24. <el-input v-model="searchData.customerDesc"></el-input>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :span="3">
  28. <el-form-item label="采购专员">
  29. <el-input v-model="searchData.purchase"></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="3">
  33. <el-form-item label="报价单号">
  34. <el-input v-model="searchData.quoteVersionNo"></el-input>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="3">
  38. <el-form-item label="客户询价单号">
  39. <el-input v-model="searchData.customerInquiryNo"></el-input>
  40. </el-form-item>
  41. </el-col>
  42. </el-row>
  43. <el-row :gutter="10">
  44. <el-col :span="3">
  45. <el-form-item label="内部询价单号">
  46. <el-input v-model="searchData.insideInquiryNo"></el-input>
  47. </el-form-item>
  48. </el-col>
  49. <el-col :span="3">
  50. <el-form-item label="报价专员">
  51. <el-input v-model="searchData.quoter"></el-input>
  52. </el-form-item>
  53. </el-col>
  54. <el-col :span="3">
  55. <el-form-item label="状态">
  56. <el-select v-model="searchData.status" style="width: 100%">
  57. <el-option label="全部" value=""></el-option>
  58. <el-option label="草稿" value="草稿"></el-option>
  59. <el-option label="下达" value="下达"></el-option>
  60. </el-select>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :span="6">
  64. <el-form-item label="报价日期">
  65. <div style="display: flex">
  66. <el-date-picker style="width: 47%" v-model="searchData.startDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
  67. <div style="width: 6%;text-align: center">-</div>
  68. <el-date-picker style="width: 47%" v-model="searchData.endDate" type="date" value-format='yyyy-MM-dd' format='yyyy-MM-dd'></el-date-picker>
  69. </div>
  70. </el-form-item>
  71. </el-col>
  72. <el-col :span="3">
  73. <el-form-item label=" ">
  74. <el-button @click="getDataListAll"> </el-button>
  75. </el-form-item>
  76. </el-col>
  77. </el-row>
  78. </el-form>
  79. <!-- 询价列表 -->
  80. <el-table
  81. @header-dragend="handleColumnResize"
  82. :height="this.height + 350"
  83. :data="dataList"
  84. border
  85. ref="mainTable"
  86. highlight-current-row
  87. @row-click="quoteClickRow"
  88. @current-change="changeCurrentRow"
  89. v-loading="dataListLoading"
  90. style="width: 100%;margin-top: 5px">
  91. <el-table-column
  92. v-for="(item,index) in columnList" :key="index"
  93. :sortable="item.columnSortable"
  94. :prop="item.columnProp"
  95. :header-align="item.headerAlign"
  96. :align="item.align"
  97. :fixed="item.fixed === ''?false:item.fixed"
  98. :min-width="item.columnWidth"
  99. :label="item.columnLabel">
  100. <template slot-scope="scope">
  101. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  102. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column
  106. fixed="right"
  107. header-align="center"
  108. align="center"
  109. width="180"
  110. label="操作">
  111. <template slot-scope="scope">
  112. <el-link style="cursor: pointer" @click="quoteRuleDetailModalFlag = true">详情</el-link>
  113. <el-link style="cursor: pointer" @click="updateModal(scope.row)">审批</el-link>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. <!-- 分页插件 -->
  118. <el-pagination style="margin-top: 0px"
  119. @size-change="sizeChangeHandle"
  120. @current-change="currentChangeHandle"
  121. :current-page="pageIndex"
  122. :page-sizes="[20, 50, 100, 200, 500]"
  123. :page-size="pageSize"
  124. :total="totalPage"
  125. layout="total, sizes, prev, pager, next, jumper">
  126. </el-pagination>
  127. <el-dialog title="报价信息" v-drag @close="closeQuoteRuleDetailDataDialog"
  128. :close-on-click-modal="false" style="margin-top: -20px" :visible.sync="quoteRuleDetailModalFlag"
  129. width="90vw">
  130. <el-form :inline="true" label-width="120px" label-position="top">
  131. <el-form-item label="Application">
  132. <el-input v-model="quoteCurrentRow.application" style="width: 14.7vw" readonly></el-input>
  133. </el-form-item>
  134. <el-form-item label="Customer">
  135. <el-input v-model="quoteCurrentRow.customerDesc" readonly></el-input>
  136. </el-form-item>
  137. <el-form-item label="年需求量">
  138. <el-input v-model="quoteCurrentRow.annualDemand" class="right-aligned-input" readonly></el-input>
  139. </el-form-item>
  140. <el-form-item label="Cost Model">
  141. <el-input v-model="quoteCurrentRow.costModel" style="width: 14.7vw" readonly></el-input>
  142. </el-form-item>
  143. <el-form-item label="Markup">
  144. <el-input v-model="quoteCurrentRow.markup" class="right-aligned-input" readonly></el-input>
  145. </el-form-item>
  146. </el-form>
  147. <el-form :inline="true" label-width="120px" label-position="top">
  148. <el-form-item label="报价备注">
  149. <el-input type="textarea" :rows="2" v-model="quoteCurrentRow.remark" style="width: 71.6vw" readonly></el-input>
  150. </el-form-item>
  151. </el-form>
  152. <quote-detail :quote="quoteCurrentRow" :auth-flag="true" :height="'60vh'"></quote-detail>
  153. <footer style="height:30px;margin-top: 5px;margin-left:-35px;text-align:center">
  154. <el-button @click="closeQuoteRuleDetailDataDialog">{{'关闭'}}</el-button>
  155. </footer>
  156. </el-dialog>
  157. <!-- <el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeName" class="customer-tab" type="border-card" @tab-click="tabClick">-->
  158. <!-- <el-tab-pane label="报价信息" name="quotationInformation">-->
  159. <!-- <el-form :inline="true" label-width="120px" label-position="top">-->
  160. <!-- <el-form-item label="Application">-->
  161. <!-- <el-input v-model="quoteCurrentRow.application" style="width: 210px" readonly></el-input>-->
  162. <!-- </el-form-item>-->
  163. <!-- <el-form-item label="Customer">-->
  164. <!-- <el-input v-model="quoteCurrentRow.customerDesc" readonly></el-input>-->
  165. <!-- </el-form-item>-->
  166. <!-- <el-form-item label="年需求量">-->
  167. <!-- <el-input v-model="quoteCurrentRow.annualDemand" class="right-aligned-input" readonly></el-input>-->
  168. <!-- </el-form-item>-->
  169. <!-- <el-form-item label="Cost Model">-->
  170. <!-- <el-input v-model="quoteCurrentRow.costModel" style="width: 210px" readonly></el-input>-->
  171. <!-- </el-form-item>-->
  172. <!-- <el-form-item label="Markup">-->
  173. <!-- <el-input v-model="quoteCurrentRow.markup" class="right-aligned-input" readonly></el-input>-->
  174. <!-- </el-form-item>-->
  175. <!-- </el-form>-->
  176. <!-- <el-form :inline="true" label-width="120px" label-position="top">-->
  177. <!-- <el-form-item label="报价备注">-->
  178. <!-- <el-input type="textarea" :rows="2" v-model="quoteCurrentRow.remark" style="width: 1019px" readonly></el-input>-->
  179. <!-- </el-form-item>-->
  180. <!-- </el-form>-->
  181. <!-- <quote-detail :quote="quoteCurrentRow" :auth-flag="true" :height="'33vh'"></quote-detail>-->
  182. <!-- </el-tab-pane>-->
  183. <!-- </el-tabs>-->
  184. <el-dialog title="申请单审核" :visible.sync="reviewFlag" width="520px" :close-on-click-modal="false"
  185. v-drag>
  186. <el-row>
  187. <el-col :span="24" style="margin-top: 30px">
  188. <div style="margin-left: 45px;margin-top: -30px">
  189. <el-form :inline="true" label-width="120px" label-position="top">
  190. <el-form-item label="申请单号">
  191. <el-input style="width: 200px;" readonly placeholder="" :value="modalData.quoteVersionNo"></el-input>
  192. </el-form-item>
  193. <el-form-item label="审批步骤号">
  194. <el-input style="width: 200px;" readonly placeholder="" :value="modalData.stepId"></el-input>
  195. </el-form-item>
  196. </el-form>
  197. <el-form :inline="true" label-width="120px" label-position="top">
  198. <el-form-item label="审批人">
  199. <el-input style="width: 200px;" readonly placeholder="" :value="modalData.userName"></el-input>
  200. </el-form-item>
  201. <el-form-item label="审批时间">
  202. <el-input style="width: 200px;" readonly placeholder=""
  203. :value="modalData.strActAuthorizeDate"></el-input>
  204. </el-form-item>
  205. <el-form-item label="备注">
  206. <el-input type="textarea" :readonly="(modalData.canAuthFlag!=='Y') "
  207. :rows="3"
  208. style="text-align: left;width: 415px;" v-model="modalData.authHistRemark"></el-input>
  209. </el-form-item>
  210. </el-form>
  211. <el-footer style="height:30px;margin-top: 5px;margin-left:-35px;text-align:center">
  212. <el-button type="primary" v-if="( modalData.canAuthFlag === 'Y') "
  213. @click="saveReview(modalData,'Y')">{{'同意'}}
  214. </el-button>
  215. <el-button type="primary" v-if="( modalData.canAuthFlag === 'Y') "
  216. @click="saveReview(modalData ,'N')">{{'不同意'}}
  217. </el-button>
  218. </el-footer>
  219. </div>
  220. </el-col>
  221. </el-row>
  222. </el-dialog>
  223. <!-- chooseList模态框 -->
  224. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  225. </div>
  226. </template>
  227. <script>
  228. import Chooselist from '@/views/modules/common/Chooselist_eam'
  229. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  230. import DictDataSelect from "../sys/dict-data-select.vue";
  231. import {queryCustomerList} from "@/api/customer/customer";
  232. import {verifyData} from "@/api/part/partInformation";
  233. import {EventBus} from "../../../main";
  234. import {partInformationSearch} from "../../../api/part/partInformation";
  235. import {
  236. searchUserAuthQuoteApplicationInfo
  237. } from "../../../api/quote/quote";
  238. import quotationUpload from "../quote/quotation_upload.vue";
  239. import {updateAuthHist} from "../../../api/auth/auth";
  240. import TpCost from "../quote/detail/tpCost.vue";
  241. import QuoteDetail from "../quote/detail/quoteDetail.vue";
  242. import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table";
  243. export default {
  244. beforeRouteEnter(to, from, next) {
  245. next((vm) => {
  246. // 跳转后清除 redirectPath
  247. localStorage.removeItem('redirectPath');
  248. console.log('redirectPath 已清除');
  249. });
  250. },
  251. computed: {
  252. // quotationInformationFlag () {
  253. // return (value) => {
  254. // if (!this.plmQuotationInformationArr){
  255. // return 'N'
  256. // }
  257. // let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value)
  258. // if (arr.length > 0) {
  259. // return arr[0].updateFlag
  260. // }
  261. // return 'N'
  262. // }
  263. // },
  264. },
  265. components: {
  266. QuoteDetail,
  267. TpCost,
  268. quotationUpload,
  269. DictDataSelect,
  270. Chooselist
  271. },
  272. data() {
  273. return {
  274. height: 200,
  275. userBuList: [],
  276. copyPriceCheckDetail:{},
  277. loading:false,
  278. attributeDialog:true,
  279. quoteRuleDetailModalFlag: false,
  280. activeName: 'quotationInformation',
  281. priceCheckRule: {
  282. associatedPartNo:[{required: true, message: ' ', trigger: 'change'},],
  283. materialRequired:[{required: true, message: ' ', trigger: 'change'},],
  284. yearlyOrMonthlyRequirement:[{required: true, message: ' ', trigger: 'change'},],
  285. runningWidth:[{required: true, message: ' ', trigger: 'change'},],
  286. },
  287. savePriceDetail:{
  288. site:'',
  289. quotationNo:'',
  290. associatedPartNo:'',
  291. materialRequired:'',
  292. yearlyOrMonthlyRequirement:'',
  293. runningWidth:'',
  294. },
  295. priceCheckPropertiesList: [],
  296. // 导出
  297. exportData: [],
  298. exportName: '询价申请' + this.dayjs().format('YYYYMMDDHHmmss'),
  299. exportHeader: ['询价申请'],
  300. exportFooter: [],
  301. resultList: [],
  302. uploadUrl: '/plm/quotationInformation/uploadExcel',
  303. // ======== 行高 ========
  304. secondHeight: 200,
  305. // ======== 分页 ========
  306. pageIndex: 1,
  307. pageSize: 50,
  308. totalPage: 0,
  309. selectedDataNum: 0,
  310. // 条件查询
  311. searchData: {
  312. userId: this.$store.state.user.id,
  313. site: this.$store.state.user.site,
  314. id: '',
  315. customerNo: '',
  316. customerDesc: '',
  317. quoteVersionNo: '',
  318. bu: '',
  319. requestStartDate: '',
  320. requestEndDate: '',
  321. requiredCompletionStartDate: '',
  322. requiredCompletionEndDate: '',
  323. status: '',
  324. quoterName: '',
  325. requesterName: '',
  326. priorityLevel: '',
  327. orderRef1: 'BJ',
  328. page: 1,
  329. limit: 10,
  330. menuId: this.$route.meta.menuId,
  331. },
  332. searchData1: {
  333. userId: this.$store.state.user.id,
  334. site: this.$store.state.user.site,
  335. id: '',
  336. customerNo: '',
  337. customerDesc: '',
  338. quoteVersionNo: '',
  339. bu: '',
  340. requestStartDate: '',
  341. requestEndDate: '',
  342. requiredCompletionStartDate: '',
  343. requiredCompletionEndDate: '',
  344. status: '',
  345. quoterName: '',
  346. requesterName: '',
  347. priorityLevel: '',
  348. orderRef1: 'BJ',
  349. page: 1,
  350. limit: 10,
  351. menuId: this.$route.meta.menuId,
  352. },
  353. // 其它
  354. dataListLoading: false,
  355. // 选择项目弹框开关
  356. chooseProjectListFlag: false,
  357. reviewFlag: false,
  358. // 初始页签
  359. activeTable: 'inquiryAuth',
  360. // ======== 数据对象 ========
  361. modalData: {
  362. flag: '',
  363. title: '',
  364. site: this.$store.state.user.site,
  365. userName: this.$store.state.user.name,
  366. id: '',
  367. quoteVersionNo: '',
  368. customerNo: '',
  369. customerDesc: '',
  370. requestDate: '',
  371. requester: '',
  372. requesterName: '',
  373. customerInquiryNo: '',
  374. priorityLevel: '',
  375. requiredCompletionDate: '',
  376. quoter: '',
  377. quoterName: '',
  378. status: '',
  379. remark: '',
  380. createDate: '',
  381. createBy: '',
  382. updateDate: '',
  383. updateBy: '',
  384. authHistId: '',
  385. approveResult: '',
  386. authHistRemark: '',
  387. canAuthFlag: '',
  388. actAuthorizator: '',
  389. strActAuthorizeDate: this.dayjs().format("YYYY-MM-DD HH:mm:ss"),
  390. actAuthorizeDate: ''
  391. },
  392. inquiryPartItemModalData: {
  393. bu: '',
  394. buDesc: '',
  395. quoteVersionNo: '',
  396. partNo: '',
  397. partDesc: '',
  398. umId: '',
  399. umName: '',
  400. codeNo: '',
  401. codeDesc: '',
  402. textValue: '',
  403. numValue: '',
  404. valueType: '',
  405. valueTypeDb: '',
  406. valueChooseFlag: '',
  407. availableValueList: [],
  408. },
  409. // ======== 数据列表 ========
  410. dataList: [],
  411. inquiryAuthDataList: [],
  412. // ======== 列表表头 ========
  413. columnList: [
  414. {
  415. userId: this.$store.state.user.name,
  416. functionId: 190006,
  417. serialNumber: '190006Table1BuDesc',
  418. tableId: '190006Table1',
  419. tableName: '报价审批表',
  420. columnProp: 'buDesc',
  421. headerAlign: 'center',
  422. align: 'center',
  423. columnLabel: 'BU',
  424. columnHidden: false,
  425. columnImage: false,
  426. columnSortable: false,
  427. sortLv: 0,
  428. status: true,
  429. fixed: '',
  430. columnWidth: 120
  431. },
  432. {
  433. userId: this.$store.state.user.name,
  434. functionId: 190006,
  435. serialNumber: '190006Table1QuoteVersionNo',
  436. tableId: '190006Table1',
  437. tableName: '报价审批表',
  438. columnProp: 'quoteVersionNo',
  439. headerAlign: 'center',
  440. align: 'center',
  441. columnLabel: '报价单号',
  442. columnHidden: false,
  443. columnImage: false,
  444. columnSortable: false,
  445. sortLv: 0,
  446. status: true,
  447. fixed: '',
  448. columnWidth: 180
  449. },
  450. {
  451. userId: this.$store.state.user.name,
  452. functionId: 190006,
  453. serialNumber: '190006Table1QuoteDate',
  454. tableId: '190006Table1',
  455. tableName: '报价审批表',
  456. columnProp: 'quoteDate',
  457. headerAlign: 'center',
  458. align: 'center',
  459. columnLabel: '报价日期',
  460. columnHidden: false,
  461. columnImage: false,
  462. columnSortable: false,
  463. sortLv: 0,
  464. status: true,
  465. fixed: '',
  466. columnWidth: 100
  467. },
  468. {
  469. userId: this.$store.state.user.name,
  470. functionId: 190006,
  471. serialNumber: '190006Table1CustomerNo',
  472. tableId: '190006Table1',
  473. tableName: '报价审批表',
  474. columnProp: 'customerNo',
  475. headerAlign: 'center',
  476. align: 'center',
  477. columnLabel: '客户编码',
  478. columnHidden: false,
  479. columnImage: false,
  480. columnSortable: false,
  481. sortLv: 0,
  482. status: true,
  483. fixed: '',
  484. columnWidth: 120
  485. },
  486. {
  487. userId: this.$store.state.user.name,
  488. functionId: 190006,
  489. serialNumber: '190006Table1CustomerDesc',
  490. tableId: '190006Table1',
  491. tableName: '报价审批表',
  492. columnProp: 'customerDesc',
  493. headerAlign: 'center',
  494. align: 'center',
  495. columnLabel: '客户名称',
  496. columnHidden: false,
  497. columnImage: false,
  498. columnSortable: false,
  499. sortLv: 0,
  500. status: true,
  501. fixed: '',
  502. columnWidth: 120
  503. },
  504. {
  505. userId: this.$store.state.user.name,
  506. functionId: 190006,
  507. serialNumber: '190006Table1QuoterName',
  508. tableId: '190006Table1',
  509. tableName: '报价审批表',
  510. columnProp: 'quoterName',
  511. headerAlign: 'center',
  512. align: 'center',
  513. columnLabel: '报价专员',
  514. columnHidden: false,
  515. columnImage: false,
  516. columnSortable: false,
  517. sortLv: 0,
  518. status: true,
  519. fixed: '',
  520. columnWidth: 120
  521. },
  522. {
  523. userId: this.$store.state.user.name,
  524. functionId: 190006,
  525. serialNumber: '190006Table1PurchaseName',
  526. tableId: '190006Table1',
  527. tableName: '报价审批表',
  528. columnProp: 'purchaseName',
  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: '',
  538. columnWidth: 120
  539. },
  540. {
  541. userId: this.$store.state.user.name,
  542. functionId: 190006,
  543. serialNumber: '190006Table1Currency',
  544. tableId: '190006Table1',
  545. tableName: '报价审批表',
  546. columnProp: 'currency',
  547. headerAlign: 'center',
  548. align: 'center',
  549. columnLabel: '货币',
  550. columnHidden: false,
  551. columnImage: false,
  552. columnSortable: false,
  553. sortLv: 0,
  554. status: true,
  555. fixed: '',
  556. columnWidth: 120
  557. },
  558. {
  559. userId: this.$store.state.user.name,
  560. functionId: 190006,
  561. serialNumber: '190006Table1Status',
  562. tableId: '190006Table1',
  563. tableName: '报价审批表',
  564. columnProp: 'status',
  565. headerAlign: 'center',
  566. align: 'center',
  567. columnLabel: '状态',
  568. columnHidden: false,
  569. columnImage: false,
  570. columnSortable: false,
  571. sortLv: 0,
  572. status: true,
  573. fixed: '',
  574. columnWidth: 120
  575. },
  576. {
  577. userId: this.$store.state.user.name,
  578. functionId: 190006,
  579. serialNumber: '190006Table1CustomerInquiryNo',
  580. tableId: '190006Table1',
  581. tableName: '报价审批表',
  582. columnProp: 'customerInquiryNo',
  583. headerAlign: 'center',
  584. align: 'center',
  585. columnLabel: '客户报价单号',
  586. columnHidden: false,
  587. columnImage: false,
  588. columnSortable: false,
  589. sortLv: 0,
  590. status: true,
  591. fixed: '',
  592. columnWidth: 120
  593. },
  594. {
  595. userId: this.$store.state.user.name,
  596. functionId: 190006,
  597. serialNumber: '190006Table1InsideInquiryNo',
  598. tableId: '190006Table1',
  599. tableName: '报价审批表',
  600. columnProp: 'insideInquiryNo',
  601. headerAlign: 'center',
  602. align: 'center',
  603. columnLabel: '内部询价单号',
  604. columnHidden: false,
  605. columnImage: false,
  606. columnSortable: false,
  607. sortLv: 0,
  608. status: true,
  609. fixed: '',
  610. columnWidth: 120
  611. },
  612. {
  613. userId: this.$store.state.user.name,
  614. functionId: 190006,
  615. serialNumber: '190006Table1Auth',
  616. tableId: '190006Table1',
  617. tableName: '报价审批表',
  618. columnProp: 'auth',
  619. headerAlign: 'center',
  620. align: 'center',
  621. columnLabel: '审批组/人',
  622. columnHidden: false,
  623. columnImage: false,
  624. columnSortable: false,
  625. sortLv: 0,
  626. status: true,
  627. fixed: '',
  628. columnWidth: 120
  629. },
  630. {
  631. userId: this.$store.state.user.name,
  632. functionId: 190006,
  633. serialNumber: '190006Table2StepId',
  634. tableId: '190006Table2',
  635. tableName: '报价审批表',
  636. columnProp: 'stepId',
  637. headerAlign: 'center',
  638. align: 'right',
  639. columnLabel: '审批步骤号',
  640. columnHidden: false,
  641. columnImage: false,
  642. columnSortable: false,
  643. sortLv: 0,
  644. status: true,
  645. fixed: '',
  646. columnWidth: 120
  647. },
  648. {
  649. userId: this.$store.state.user.name,
  650. functionId: 190006,
  651. serialNumber: '190006Table1AuthHistRemark',
  652. tableId: '190006Table1',
  653. tableName: '报价审批表',
  654. columnProp: 'authHistRemark',
  655. headerAlign: 'center',
  656. align: 'center',
  657. columnLabel: '审批备注',
  658. columnHidden: false,
  659. columnImage: false,
  660. columnSortable: false,
  661. sortLv: 0,
  662. status: true,
  663. fixed: '',
  664. columnWidth: 120
  665. },
  666. ],
  667. // ======== 必填规则 ========
  668. rules: {
  669. bu: [
  670. {required: true, message: ' ', trigger: 'change'},
  671. {required: true, message: ' ', trigger: 'blur'},
  672. ],
  673. quoteVersionNo: [
  674. {required: true, message: ' ', trigger: 'change'},
  675. {required: true, message: ' ', trigger: 'blur'},
  676. ],
  677. customerNo: [
  678. {required: true, message: ' ', trigger: 'change'},
  679. {required: true, message: ' ', trigger: 'blur'},
  680. ],
  681. customerDesc: [
  682. {required: true, message: ' ', trigger: 'change'},
  683. {required: true, message: ' ', trigger: 'blur'},
  684. ],
  685. requester: [
  686. {required: true, message: ' ', trigger: 'change'},
  687. {required: true, message: ' ', trigger: 'blur'},
  688. ],
  689. requesterName: [
  690. {required: true, message: ' ', trigger: 'change'},
  691. {required: true, message: ' ', trigger: 'blur'},
  692. ],
  693. quoter: [
  694. {required: true, message: ' ', trigger: 'change'},
  695. {required: true, message: ' ', trigger: 'blur'},
  696. ],
  697. quoterName: [
  698. {required: true, message: ' ', trigger: 'change'},
  699. {required: true, message: ' ', trigger: 'blur'},
  700. ],
  701. priorityLevel: [
  702. {required: true, message: ' ', trigger: 'change'},
  703. ],
  704. requiredCompletionDate: [
  705. {required: true, message: ' ', trigger: 'change'},
  706. {required: true, message: ' ', trigger: 'blur'},
  707. ],
  708. requestDate: [
  709. {required: true, message: ' ', trigger: 'change'},
  710. {required: true, message: ' ', trigger: 'blur'},
  711. ],
  712. },
  713. inquiryPartRules: {
  714. bu: [
  715. {required: true, message: ' ', trigger: 'change'},
  716. {required: true, message: ' ', trigger: 'blur'},
  717. ],
  718. partNo: [
  719. {required: true, message: ' ', trigger: 'change'},
  720. {required: true, message: ' ', trigger: 'blur'},
  721. ],
  722. partDesc: [
  723. {required: true, message: ' ', trigger: 'change'},
  724. {required: true, message: ' ', trigger: 'blur'},
  725. ],
  726. inquiryQty: [
  727. {required: true, message: ' ', trigger: 'change'},
  728. {required: true, message: ' ', trigger: 'blur'},
  729. ],
  730. umId: [
  731. {required: true, message: ' ', trigger: 'change'},
  732. {required: true, message: ' ', trigger: 'blur'},
  733. ],
  734. codeNo: [
  735. {required: true, message: ' ', trigger: 'change'},
  736. {required: true, message: ' ', trigger: 'blur'},
  737. ],
  738. },
  739. // ======== 选中的当前行数据 ========
  740. quoteCurrentRow: {},
  741. // ======== 模态框开关控制 ========
  742. modalFlag: false,
  743. modalDisableFlag: false,
  744. inquiryPartModalFlag: false,
  745. inquiryPartModalDisableFlag: false,
  746. inquiryPartItemModalFlag: false,
  747. }
  748. },
  749. mounted () {
  750. this.$nextTick(() => {
  751. this.height = window.innerHeight - 558
  752. })
  753. },
  754. created() {
  755. this.getSiteAndBuByUserName()
  756. // 获取 URL 查询参数
  757. const {quoteVersionNo} = this.$route.query;
  758. // 将查询参数赋值给 searchData
  759. if (quoteVersionNo){
  760. this.searchData1.quoteVersionNo = this.$route.query.quoteVersionNo;
  761. }
  762. // 动态列
  763. this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  764. this.getDataList()
  765. },
  766. methods: {
  767. handleColumnResize(newWidth, oldWidth, column, event){
  768. let inData= this.columnList.filter(item => item.columnProp === column.property)[0]
  769. inData.columnWidth=newWidth
  770. updateColumnSize(inData).then(({data}) => {
  771. if (data.code === 0) {
  772. console.log("栏位宽度保存成功!")
  773. }
  774. })
  775. },
  776. // 获取用户的bu
  777. getSiteAndBuByUserName () {
  778. let tempData = {
  779. username: this.$store.state.user.name,
  780. }
  781. getSiteAndBuByUserName(tempData).then(({data}) => {
  782. if (data.code === 0) {
  783. this.userBuList = data.rows
  784. }
  785. })
  786. },
  787. // ======== 分页相关方法 ========
  788. /**
  789. * 每页数
  790. * @param val
  791. */
  792. sizeChangeHandle(val) {
  793. this.pageSize = val
  794. this.pageIndex = 1
  795. this.getDataList()
  796. },
  797. /**
  798. * 当前页
  799. * @param val
  800. */
  801. currentChangeHandle(val) {
  802. this.pageIndex = val
  803. this.getDataList()
  804. },
  805. // ======== 页签切换相关方法 ========
  806. /**
  807. * 列表表格选择替换
  808. * @param tab
  809. * @param event
  810. */
  811. tabClick(tab, event) {
  812. // 刷新列表数据
  813. // this.refreshCurrentTabTable()
  814. },
  815. // ======== 列表操作方法 ========
  816. /**
  817. * 单机选中询价信息
  818. * @param row
  819. */
  820. quoteClickRow(row) {
  821. this.quoteCurrentRow = JSON.parse(JSON.stringify(row))
  822. },
  823. /**
  824. * 当前值发生变化的时候修改
  825. * @param row
  826. * @param oldRow
  827. */
  828. changeCurrentRow(row, oldRow) {
  829. // 判断是否是获取焦点的事件
  830. if (row) {
  831. this.quoteCurrentRow = JSON.parse(JSON.stringify(row))
  832. //刷新当前页表
  833. // this.refreshCurrentTabTable()
  834. }
  835. },
  836. /**
  837. * 刷新页签的table数据
  838. */
  839. // refreshCurrentTabTable() {
  840. // },
  841. // ======== 列表数据刷新方法 ========
  842. /**
  843. * 获取数据列表
  844. */
  845. getDataListAll(){
  846. this.searchData1 = null
  847. this.getDataList()
  848. },
  849. getDataList() {
  850. console.log(this.searchData1)
  851. this.searchData.limit = this.pageSize
  852. this.searchData.page = this.pageIndex
  853. let inData = this.searchData
  854. if (this.searchData1 !== null){
  855. this.searchData1.limit = this.pageSize
  856. this.searchData1.page = this.pageIndex
  857. inData = this.searchData1
  858. }
  859. searchUserAuthQuoteApplicationInfo(inData).then(({data}) => {
  860. if (data.code === 0) {
  861. this.dataList = data.page.list
  862. this.pageIndex = data.page.currPage
  863. this.pageSize = data.page.pageSize
  864. this.totalPage = data.page.totalCount
  865. this.dataList.forEach(item => {
  866. if (item.groupDesc === '' || item.groupDesc === null) {
  867. item.auth = item.userDisplay
  868. } else {
  869. item.auth = item.groupDesc
  870. }
  871. })
  872. //判断是否全部存在数据
  873. if (this.totalPage > 0) {
  874. //设置选中行
  875. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  876. this.refreshCurrentTabTable() //加载当前的页签的table
  877. this.quoteClickRow(this.dataList[0])
  878. }
  879. }
  880. this.dataListLoading = false
  881. })
  882. },
  883. // /**
  884. // * 获得这些询价号的全部附件
  885. // */
  886. // getFileContentList () {
  887. // let currentData = {
  888. // orderRef1: this.$store.state.user.site,
  889. // orderRef2: this.enterResultData.quotationNo
  890. // }
  891. // getFileContentList(currentData).then(({data}) => {
  892. // if (data && data.code === 0) {
  893. // this.enterResultData.fileContentList = data.rows
  894. // } else {
  895. // this.enterResultData.fileContentList = []
  896. // }
  897. // })
  898. // },
  899. // ======== chooseList相关方法 ========
  900. /**
  901. * 获取基础数据列表S
  902. * @param val
  903. * @param type
  904. */
  905. getBaseList(val, type) {
  906. this.tagNo = val
  907. this.tagNo1 = type
  908. this.$nextTick(() => {
  909. let strVal = ''
  910. let conSql = ''
  911. if (val === 509) {
  912. if (type === 1) {
  913. strVal = this.modalData.customerNo ? this.modalData.customerNo : ''
  914. }
  915. if (type === 2) {
  916. strVal = this.searchData.customerNo ? this.searchData.customerNo : ''
  917. }
  918. }
  919. if (val === 2002) {
  920. if (type === 1) {
  921. strVal = this.searchData.quoterName ? this.searchData.quoterName : ''
  922. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  923. }
  924. if (type === 2) {
  925. strVal = this.modalData.quoterName ? this.modalData.quoterName : ''
  926. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  927. }
  928. }
  929. if (val === 2008) {
  930. if (type === 1) {
  931. strVal = this.searchData.requesterName ? this.searchData.requesterName : ''
  932. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  933. }
  934. if (type === 2) {
  935. strVal = this.modalData.requesterName ? this.modalData.requesterName : ''
  936. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  937. }
  938. }
  939. this.$refs.baseList.init(val, strVal, conSql)
  940. })
  941. },
  942. /**
  943. * 列表方法的回调
  944. * @param val
  945. */
  946. getBaseData(val) {
  947. if (this.tagNo === 509) {
  948. if (this.tagNo1 === 1) {
  949. if (val.customer_no === this.modalData.customerNo) {
  950. return
  951. }
  952. this.modalData.customerNo = val.customer_no
  953. this.modalData.customerDesc = val.customer_desc
  954. }
  955. if (this.tagNo1 === 2) {
  956. if (val.customer_no === this.searchData.customerNo) {
  957. return
  958. }
  959. this.searchData.customerNo = val.customer_no
  960. }
  961. }
  962. if (this.tagNo === 2002) {
  963. if (this.tagNo1 === 1) {
  964. this.searchData.quoter = val.username
  965. this.searchData.quoterName = val.user_display
  966. }
  967. if (this.tagNo1 === 2) {
  968. this.modalData.quoter = val.username
  969. this.modalData.quoterName = val.user_display
  970. }
  971. }
  972. if (this.tagNo === 2008) {
  973. if (this.tagNo1 === 1) {
  974. this.searchData.requester = val.username
  975. this.searchData.requesterName = val.user_display
  976. }
  977. if (this.tagNo1 === 2) {
  978. this.modalData.requester = val.username
  979. this.modalData.requesterName = val.user_display
  980. }
  981. }
  982. },
  983. updateModal(row) {
  984. this.modalData = JSON.parse(JSON.stringify(row))
  985. this.modalData.strActAuthorizeDate = this.dayjs().format("YYYY-MM-DD HH:mm:ss")
  986. this.modalData.userName = this.$store.state.user.name
  987. this.reviewFlag = true
  988. },
  989. saveReview(row, val) {
  990. if (row.authHistRemark == '') {
  991. this.$alert(data.msg, '操作提示', {
  992. confirmButtonText: '确定',
  993. callback: action => {
  994. this.saveButton = false
  995. }
  996. });
  997. }
  998. this.modalData.id = row.authHistId
  999. this.modalData.actAuthorizator = row.userName
  1000. this.modalData.remark = row.authHistRemark
  1001. this.modalData.actAuthorizeDate = row.strActAuthorizeDate
  1002. this.modalData.orderRef1 = row.quoteVersionNo
  1003. if (val === "Y") {
  1004. if (row.lastStepFlag === 'Y') {
  1005. this.modalData.approveResult = "全部审批"
  1006. } else {
  1007. this.modalData.approveResult = "部分审批"
  1008. }
  1009. } else if (val === "N") {
  1010. this.modalData.approveResult = "未通过"
  1011. }
  1012. updateAuthHist(this.modalData).then(({data}) => {
  1013. if (data && data.code === 0) {
  1014. this.getDataList()
  1015. this.reviewFlag = false
  1016. this.$message({
  1017. message: '操作成功',
  1018. type: 'success',
  1019. duration: 1500,
  1020. onClose: () => {}
  1021. })
  1022. } else {
  1023. this.$alert(data.msg, '错误', {
  1024. confirmButtonText: '确定'
  1025. })
  1026. }
  1027. })
  1028. },
  1029. // ======== 导出相关方法 ========
  1030. /**
  1031. * 导出excel
  1032. */
  1033. async createExportData() {
  1034. this.searchData.limit = -1
  1035. this.searchData.page = 1
  1036. await searchUserAuthQuoteApplicationInfo(this.searchData).then(({data}) => {
  1037. this.resultList = data.page.list
  1038. })
  1039. return this.resultList
  1040. },
  1041. startDownload() {
  1042. },
  1043. finishDownload() {
  1044. },
  1045. fields() {
  1046. let json = '{'
  1047. this.columnList.forEach((item, index) => {
  1048. if (index == this.columnList.length - 1) {
  1049. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  1050. } else {
  1051. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  1052. }
  1053. })
  1054. json += '}'
  1055. let s = eval('(' + json + ')')
  1056. return s
  1057. },
  1058. // ======== 导入相关方法 ========
  1059. handleImportQuotation() {
  1060. let currentData = {
  1061. createBy: this.$store.state.user.name,
  1062. site: this.$store.state.user.site,
  1063. }
  1064. //打开组件 去做新增业务
  1065. this.$nextTick(() => {
  1066. this.$refs.quotationUpload.init(currentData)
  1067. })
  1068. },
  1069. // openSaveDataDialog(){
  1070. // if (this.modalData.title === '询价新增') {
  1071. // let rfqNos = [];
  1072. // this.dataList.forEach((item) => {
  1073. // // 如果item.rfqNo为XJ开头
  1074. // if (item.quoteVersionNo.startsWith('XJ')) {
  1075. // // 解析数字部分
  1076. // const numPart = parseInt(item.quoteVersionNo.replace('XJ', ''), 10);
  1077. // if (!isNaN(numPart)) {
  1078. // rfqNos.push(numPart);
  1079. // }
  1080. // }
  1081. // });
  1082. // if (rfqNos.length === 0) {
  1083. // // 如果没有XJ开头的rfqNo
  1084. // this.modalData.quoteVersionNo = 'XJ00000001';
  1085. // } else {
  1086. // // 取到最大的XJ开头的rfqNo
  1087. // let maxRfqNo = Math.max(...rfqNos);
  1088. //
  1089. // // 生成新的rfqNo,确保有9位数,前面补零
  1090. // maxRfqNo += 1; // 增加最大值
  1091. // this.modalData.quoteVersionNo = 'XJ' + String(maxRfqNo).padStart(8, '0');
  1092. // }
  1093. // }
  1094. // },
  1095. // 保存弹框关闭事件
  1096. closeSaveDataDialog() {
  1097. this.modalData = {
  1098. flag: '',
  1099. title: '',
  1100. site: '',
  1101. bu: '',
  1102. buNo: '',
  1103. buDesc: '',
  1104. id: '',
  1105. quoteVersionNo: '',
  1106. customerNo: '',
  1107. customerDesc: '',
  1108. requester:'',
  1109. requesterName: '',
  1110. quoter: '',
  1111. quoterName: '',
  1112. customerInquiryNo: '',
  1113. status: '',
  1114. priorityLevel: '',
  1115. requestDate: '',
  1116. requiredCompletionDate: '',
  1117. remark: '',
  1118. }
  1119. this.modalFlag = false
  1120. },
  1121. closeQuoteRuleDetailDataDialog() {
  1122. this.quoteRuleDetailModalFlag = false
  1123. },
  1124. rowStyle({row}) {
  1125. if (this.quoteCurrentRow.id === row.id) {
  1126. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  1127. }
  1128. },
  1129. // 动态列开始 获取 用户保存的 格式列
  1130. async getTableUserColumn(tableId, columnId) {
  1131. let queryTableUser = {
  1132. userId: this.$store.state.user.name,
  1133. functionId: this.$route.meta.menuId,
  1134. tableId: tableId,
  1135. status: true,
  1136. languageCode: this.$i18n.locale
  1137. }
  1138. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1139. if (data.rows.length > 0) {
  1140. switch (columnId) {
  1141. case 1:
  1142. this.columnList = data.rows
  1143. break;
  1144. }
  1145. } else {
  1146. this.getColumnList(tableId, columnId)
  1147. }
  1148. })
  1149. },
  1150. // 获取 tableDefault 列
  1151. async getColumnList (tableId, columnId) {
  1152. let queryTable= {
  1153. functionId: this.$route.meta.menuId,
  1154. tableId: tableId,
  1155. languageCode: this.$i18n.locale
  1156. }
  1157. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1158. if (!data.rows.length === 0) {
  1159. switch (columnId) {
  1160. case 1:
  1161. this.columnList = data.rows
  1162. break;
  1163. }
  1164. }
  1165. })
  1166. },
  1167. },
  1168. }
  1169. </script>
  1170. <style scoped>
  1171. /deep/ .customer-tab .el-tabs__content {
  1172. padding: 0px !important;
  1173. height: 100%;
  1174. }
  1175. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  1176. background-color: #17B3A3;
  1177. border-color: #17B3A3;
  1178. }
  1179. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
  1180. border-color: #FFF
  1181. }
  1182. /deep/ .el-form-item--medium .el-form-item__content{
  1183. height: auto;
  1184. }
  1185. /deep/ .el-input .el-input--medium{
  1186. line-height: 20px;
  1187. }
  1188. /deep/ .el-input-number .el-input--medium{
  1189. line-height: 20px;
  1190. }
  1191. /*table中input 修改样式*/
  1192. /deep/ div.table-el-date {
  1193. padding: 0px 0px;
  1194. height: 25px !important;
  1195. }
  1196. /*table中input*/
  1197. div.table-el-date /deep/ input.el-input__inner{
  1198. padding: 0px 0px;
  1199. height: 23px !important;
  1200. text-align: right;
  1201. }
  1202. /* 特殊的样式*/
  1203. /deep/ .el-table div.cell:has(.table-el-date) {
  1204. /* 直接作用于 <td> 元素 */
  1205. padding: 0px;
  1206. height: 25px;
  1207. }
  1208. .el-transfer-panel {
  1209. border: 2px solid #17b3a3;
  1210. border-radius: 4px;
  1211. overflow: hidden;
  1212. background: #fff;
  1213. display: inline-block;
  1214. vertical-align: middle;
  1215. width: 200px;
  1216. max-height: 100%;
  1217. -webkit-box-sizing: border-box;
  1218. box-sizing: border-box;
  1219. position: relative;
  1220. }
  1221. .el-transfer-panel .el-transfer-panel__header {
  1222. height: 40px;
  1223. line-height: 40px;
  1224. background: #17b3a3;
  1225. margin: 0;
  1226. padding-left: 15px;
  1227. border-bottom: 1px solid #17b3a3;
  1228. -webkit-box-sizing: border-box;
  1229. box-sizing: border-box;
  1230. color: #000;
  1231. }
  1232. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  1233. font-size: 14px;
  1234. color: #303133;
  1235. font-weight: 400;
  1236. }
  1237. .right-aligned-input /deep/ .el-input__inner{
  1238. text-align: right;
  1239. width: 12.5vw; /* 如果需要,可以在这里设置宽度 */
  1240. padding-right: 5px !important;
  1241. }
  1242. </style>
  1243. <style lang="scss" scoped>
  1244. .el-table /deep/ .cell{
  1245. height: auto;
  1246. line-height: 1.5;
  1247. }
  1248. </style>