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.

1490 lines
49 KiB

  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="'BU'">
  6. <el-select v-model="searchData.bu" placeholder="请选择" clearable style="width: 120px">
  7. <el-option
  8. v-for = "i in userBuList"
  9. :key = "i.buNo"
  10. :label = "i.buDesc"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="询价单号">
  16. <el-input v-model="searchData.rfqNo" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item label="客户编码">
  19. <span style="cursor: pointer" slot="label" @click="getBaseList(509,2)"><a herf="#">客户编码</a></span>
  20. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  21. </el-form-item>
  22. <el-form-item :label="'客户名称'">
  23. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  24. </el-form-item>
  25. <el-form-item :label="'询价日期'">
  26. <el-date-picker
  27. style="width: 120px"
  28. v-model="searchData.requestStartDate"
  29. type="date"
  30. value-format="yyyy-MM-dd"
  31. placeholder="选择日期">
  32. </el-date-picker>
  33. </el-form-item>
  34. <el-form-item label=" ">
  35. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  36. </el-form-item>
  37. <el-form-item :label="' '">
  38. <el-date-picker
  39. style="width: 120px"
  40. v-model="searchData.requestEndDate"
  41. type="date"
  42. value-format="yyyy-MM-dd"
  43. placeholder="选择日期">
  44. </el-date-picker>
  45. </el-form-item>
  46. <el-form-item :label="'优先等级'">
  47. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false"
  48. dict-type="priority_Level"/>
  49. </el-form-item>
  50. </el-form>
  51. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  52. <el-form-item label="产品编码">
  53. <span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">产品编码</a></span>
  54. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  55. </el-form-item>
  56. <el-form-item :label="'产品名称'">
  57. <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
  58. </el-form-item>
  59. <el-form-item :label="'PjM'">
  60. <span style="cursor: pointer" slot="label" @click="getBaseList(2004,1)"><a herf="#">PjM</a></span>
  61. <el-input v-model="searchData.requesterName" clearable style="width: 120px"></el-input>
  62. </el-form-item>
  63. <el-form-item :label="'报价专员'">
  64. <span style="cursor: pointer" slot="label" @click="getBaseList(2002,1)"><a herf="#">报价专员</a></span>
  65. <el-input v-model="searchData.quoterName" clearable style="width: 120px"></el-input>
  66. </el-form-item>
  67. <el-form-item :label="'要求报价日期'">
  68. <el-date-picker
  69. style="width: 120px"
  70. v-model="searchData.requiredCompletionStartDate"
  71. type="date"
  72. value-format="yyyy-MM-dd"
  73. placeholder="选择日期">
  74. </el-date-picker>
  75. </el-form-item>
  76. <el-form-item label=" ">
  77. <div style="text-align: center;"><i class="el-icon-right"></i></div>
  78. </el-form-item>
  79. <el-form-item :label="' '">
  80. <el-date-picker
  81. style="width: 120px"
  82. v-model="searchData.requiredCompletionEndDate"
  83. type="date"
  84. value-format="yyyy-MM-dd"
  85. placeholder="选择日期">
  86. </el-date-picker>
  87. </el-form-item>
  88. <el-form-item :label="'状态'">
  89. <el-select v-model="searchData.status" style="width: 120px">
  90. <el-option label="全部" value=""></el-option>
  91. <el-option label="草稿" value="C"></el-option>
  92. <el-option label="已下达" value="B"></el-option>
  93. <el-option label="已报价" value="A"></el-option>
  94. </el-select>
  95. </el-form-item>
  96. <el-form-item :label="' '">
  97. <el-button @click="getDataList()">查询</el-button>
  98. <!-- <el-button type="primary" icon="el-icon-upload" @click="handleImportQuotation()">导入</el-button>-->
  99. <download-excel
  100. :fields="fields()"
  101. :data="exportData"
  102. type="xls"
  103. :name="exportName"
  104. :header="exportHeader"
  105. :footer="exportFooter"
  106. :fetch="createExportData"
  107. :before-generate="startDownload"
  108. :before-finish="finishDownload"
  109. worksheet="导出信息"
  110. class="el-button el-button--primary el-button--medium">
  111. {{ "导出" }}
  112. </download-excel>
  113. </el-form-item>
  114. </el-form>
  115. <!-- 询价产品列表 -->
  116. <el-table
  117. height="37vh"
  118. :data="dataList"
  119. border
  120. :row-style="rowStyle"
  121. ref="mainTable"
  122. @row-click="inquiryPartClickRow"
  123. @current-change="changeCurrentRow"
  124. style="width: 100%;margin-top: 5px">
  125. <el-table-column
  126. v-for="(item,index) in columnList" :key="index"
  127. :sortable="item.columnSortable"
  128. :prop="item.columnProp"
  129. :header-align="item.headerAlign"
  130. :align="item.align"
  131. :fixed="item.fixed === ''?false:item.fixed"
  132. :min-width="item.columnWidth"
  133. :label="item.columnLabel">
  134. <template slot-scope="scope">
  135. <div v-if="item.columnProp !== 'status' && item.columnProp !== 'priorityLevel'">
  136. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  137. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  138. style="width: 100px; height: 80px"/></span>
  139. </div>
  140. <div v-else-if="item.columnProp === 'status'">
  141. <span v-if="!item.columnHidden">
  142. <span v-if="scope.row.status === 'C'">草稿</span>
  143. <span v-if="scope.row.status === 'B'">已下达</span>
  144. <span v-if="scope.row.status === 'A'">已报价</span>
  145. </span>
  146. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  147. style="width: 100px; height: 80px"/></span>
  148. </div>
  149. <div v-else-if="item.columnProp === 'priorityLevel'">
  150. <span v-if="!item.columnHidden">
  151. <span v-if="scope.row.priorityLevel === 'A'">普通</span>
  152. <span v-if="scope.row.priorityLevel === ' B'">重要</span>
  153. <span v-if="scope.row.priorityLevel === ' C'">紧急</span>
  154. </span>
  155. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  156. style="width: 100px; height: 80px"/></span>
  157. </div>
  158. </template>
  159. </el-table-column>
  160. </el-table>
  161. <!-- 分页插件 -->
  162. <el-pagination style="margin-top: 0px"
  163. @size-change="sizeChangeHandle"
  164. @current-change="currentChangeHandle"
  165. :current-page="pageIndex"
  166. :page-sizes="[20, 50, 100, 200, 500]"
  167. :page-size="pageSize"
  168. :total="totalPage"
  169. layout="total, sizes, prev, pager, next, jumper">
  170. </el-pagination>
  171. <!-- 页签 -->
  172. <el-tabs style="margin-top: 0px; width: 100%; height: 100%;" v-model="activeTable" class="customer-tab" type="border-card" @tab-click="tabClick">
  173. <!-- 询价明细 属性页签 -->
  174. <el-tab-pane label="属性" name="inquiryPartItem">
  175. <el-table
  176. :height="height - 300"
  177. :data="inquiryPartItemDataList"
  178. border
  179. style="width: 100%;">
  180. <el-table-column
  181. v-for="(item,index) in columnItemList" :key="index"
  182. :sortable="item.columnSortable"
  183. :prop="item.columnProp"
  184. :header-align="item.headerAlign"
  185. :show-overflow-tooltip="item.showOverflowTooltip"
  186. :align="item.align"
  187. :fixed="item.fixed==''?false:item.fixed"
  188. :min-width="item.columnWidth"
  189. :label="item.columnLabel">
  190. <template slot-scope="scope">
  191. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  192. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  193. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  194. </div>
  195. <div v-else>
  196. {{ scope.row.textValue ? scope.row.textValue : scope.row.numValue }}
  197. </div>
  198. </template>
  199. </el-table-column>
  200. </el-table>
  201. </el-tab-pane>
  202. <!-- 询价明细 详情页签 -->
  203. <el-tab-pane label="详情" name="inquiryPartDetail">
  204. <div style="margin-left: 10px;height: 225px">
  205. <el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
  206. <el-form-item :label="'BU'">
  207. <el-input v-model="inquiryPartCurrentRow.buDesc" readonly style="width: 70px"></el-input>
  208. </el-form-item>
  209. <el-form-item :label="'客户编码'">
  210. <el-input v-model="inquiryPartCurrentRow.customerNo" readonly style="width: 160px"></el-input>
  211. </el-form-item>
  212. <el-form-item :label="'客户名称'">
  213. <el-input v-model="inquiryPartCurrentRow.customerDesc" readonly style="width: 340px"></el-input>
  214. </el-form-item>
  215. <el-form-item :label="'询价单号'">
  216. <el-input v-model="inquiryPartCurrentRow.rfqNo" readonly style="width: 160px"></el-input>
  217. </el-form-item>
  218. <el-form-item :label="'询价日期'">
  219. <el-input v-model="inquiryPartCurrentRow.requestDate" readonly style="width: 100px"></el-input>
  220. </el-form-item>
  221. <el-form-item :label="'询价数量'">
  222. <el-input-number :controls="false" :step="0" v-model="inquiryPartCurrentRow.inquiryQty" readonly style="width: 70px"></el-input-number>
  223. </el-form-item>
  224. </el-form>
  225. <el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
  226. <el-form-item :label="'状态'">
  227. <el-input v-model="statusDisplay" readonly style="width: 70px"></el-input>
  228. </el-form-item>
  229. <el-form-item :label="'产品编码'">
  230. <el-input v-model="inquiryPartCurrentRow.partNo" readonly style="width: 160px"></el-input>
  231. </el-form-item>
  232. <el-form-item :label="'产品描述'">
  233. <el-input v-model="inquiryPartCurrentRow.partDesc" readonly style="width: 340px"></el-input>
  234. </el-form-item>
  235. <el-form-item :label="'客户询价单号'">
  236. <el-input v-model="inquiryPartCurrentRow.customerInquiryNo" readonly style="width: 160px"></el-input>
  237. </el-form-item>
  238. <el-form-item :label="'要求报价日期'">
  239. <el-input v-model="inquiryPartCurrentRow.requiredCompletionDate" readonly style="width: 100px"></el-input>
  240. </el-form-item>
  241. <el-form-item :label="'计量单位'">
  242. <el-input v-model="inquiryPartCurrentRow.umName" readonly style="width: 70px"></el-input>
  243. </el-form-item>
  244. </el-form>
  245. <el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
  246. <el-form-item :label="'属性模版'">
  247. <el-input v-model="inquiryPartCurrentRow.codeNo" readonly style="width: 244px"></el-input>
  248. </el-form-item>
  249. <el-form-item :label="'PjM'">
  250. <el-input v-model="inquiryPartCurrentRow.requesterName" readonly style="width: 163px"></el-input>
  251. </el-form-item>
  252. <el-form-item :label="'报价专员'">
  253. <el-input v-model="inquiryPartCurrentRow.quoterName" readonly style="width: 163px"></el-input>
  254. </el-form-item>
  255. <el-form-item :label="'优先等级'">
  256. <el-input v-model="priorityLevelDisplay" readonly style="width: 274px"></el-input>
  257. </el-form-item>
  258. </el-form>
  259. <el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
  260. <el-form-item :label="'备注'">
  261. <el-input v-model="inquiryPartCurrentRow.remark" readonly style="width: 885px"></el-input>
  262. </el-form-item>
  263. </el-form>
  264. <el-form :inline="true" label-position="top" :model="inquiryPartCurrentRow">
  265. <el-form-item :label="'创建人'">
  266. <el-input v-model="inquiryPartCurrentRow.createBy" readonly style="width: 146px"></el-input>
  267. </el-form-item>
  268. <el-form-item :label="'创建时间'">
  269. <el-input v-model="inquiryPartCurrentRow.createDate" readonly style="width: 263px"></el-input>
  270. </el-form-item>
  271. <el-form-item :label="'更新人'">
  272. <el-input v-model="inquiryPartCurrentRow.updateBy" readonly style="width: 161px"></el-input>
  273. </el-form-item>
  274. <el-form-item :label="'更新时间'">
  275. <el-input v-model="inquiryPartCurrentRow.updateDate" readonly style="width: 276px"></el-input>
  276. </el-form-item>
  277. </el-form>
  278. </div>
  279. </el-tab-pane>
  280. <!-- 询价明细 报价记录页签 -->
  281. <el-tab-pane label="报价记录" name="inquiryPartQuotation">
  282. <el-table
  283. :height="height - 300"
  284. :data="inquiryQuotationDataList"
  285. border
  286. style="width: 100%;">
  287. <el-table-column
  288. v-for="(item,index) in columnQuotationList" :key="index"
  289. :sortable="item.columnSortable"
  290. :prop="item.columnProp"
  291. :header-align="item.headerAlign"
  292. :show-overflow-tooltip="item.showOverflowTooltip"
  293. :align="item.align"
  294. :fixed="item.fixed==''?false:item.fixed"
  295. :min-width="item.columnWidth"
  296. :label="item.columnLabel">
  297. <template slot-scope="scope">
  298. <div v-if="item.columnProp !== 'textValue' && item.columnProp !== 'numValue'">
  299. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  300. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  301. </div>
  302. <div v-else>
  303. {{ scope.row.textValue ? scope.row.textValue : scope.row.numValue }}
  304. </div>
  305. </template>
  306. </el-table-column>
  307. <el-table-column
  308. fixed="left"
  309. header-align="center"
  310. align="center"
  311. width="80"
  312. label="操作">
  313. <template slot-scope="scope">
  314. <a type="text" size="small" @click="handleQuotationRequest(scope.row)">报价详情</a>
  315. </template>
  316. </el-table-column>
  317. </el-table>
  318. </el-tab-pane>
  319. </el-tabs>
  320. <!-- chooseList模态框 -->
  321. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  322. </div>
  323. </template>
  324. <script>
  325. import Chooselist from '@/views/modules/common/Chooselist_eam'
  326. import {getSiteAndBuByUserName} from "../../../api/qc/qc";
  327. import {searchInquiryApplicationInfo,addInquiryApplicationInfo,updateInquiryApplicationInfo,deleteInquiryApplicationInfo} from "@/api/inquiry/inquiryApplication";
  328. import {searchInquiryDetailInfo,addInquiryDetailInfo,updateInquiryDetailInfo,deleteInquiryDetailInfo} from "@/api/inquiry/inquiryDetail";
  329. import {getItemListByInquiryPartAndCodeNo,updateInquiryPartItemList,searchInquiryDetailHeaderInfo,searchQuotationRecordInfo} from "@/api/inquiry/inquiryDetail";
  330. import DictDataSelect from "../sys/dict-data-select.vue";
  331. import OssComponents from "../oss/ossComponents.vue";
  332. import {queryCustomerList} from "@/api/customer/customer";
  333. import {verifyData} from "@/api/part/partInformation";
  334. import {EventBus} from "../../../main";
  335. import TableColumn from "../../common/table.vue";
  336. export default {
  337. components: {
  338. TableColumn,
  339. DictDataSelect,
  340. Chooselist,
  341. OssComponents
  342. },
  343. computed: {
  344. statusDisplay() {
  345. return this.inquiryPartCurrentRow.status === 'C' ? '草稿' : (this.inquiryPartCurrentRow.status === 'B' ? '已下达' : '已报价')
  346. },
  347. priorityLevelDisplay() {
  348. return this.inquiryPartCurrentRow.priorityLevel === 'A' ? '普通' : (this.inquiryPartCurrentRow.priorityLevel === ' B' ? '重要' : '紧急')
  349. }
  350. },
  351. data() {
  352. return {
  353. // 导出
  354. exportData: [],
  355. exportName: '询价明细' + this.dayjs().format('YYYYMMDDHHmmss'),
  356. exportHeader: ['询价明细'],
  357. exportFooter: [],
  358. resultList: [],
  359. userBuList: [],
  360. // ======== 分页 ========
  361. pageIndex: 1,
  362. pageSize: 50,
  363. totalPage: 0,
  364. height: 200,
  365. // 条件查询
  366. searchData: {
  367. site: this.$store.state.user.site,
  368. customerNo: '',
  369. customerDesc: '',
  370. id: '',
  371. rfqNo: '',
  372. bu: '',
  373. requestStartDate: '',
  374. requestEndDate: '',
  375. requiredCompletionStartDate: '',
  376. requiredCompletionEndDate: '',
  377. status: '',
  378. quoterName: '',
  379. requesterName: '',
  380. priorityLevel: '',
  381. partNo: '',
  382. partDesc: '',
  383. page: 1,
  384. limit: 10,
  385. menuId: this.$route.meta.menuId,
  386. },
  387. // 初始页签
  388. activeTable: 'inquiryPartItem',
  389. // ======== 数据列表 ========
  390. dataList: [],
  391. inquiryPartItemDataList: [],
  392. inquiryQuotationDataList: [],
  393. // ======== 列表表头 ========
  394. columnList: [
  395. {
  396. userId: this.$store.state.user.name,
  397. functionId: 102001,
  398. serialNumber: '102001Table1BuDesc',
  399. tableId: '102001Table1',
  400. tableName: '询价信息表',
  401. columnProp: 'buDesc',
  402. headerAlign: 'center',
  403. align: 'center',
  404. columnLabel: 'BU',
  405. columnHidden: false,
  406. columnImage: false,
  407. columnSortable: false,
  408. sortLv: 0,
  409. status: true,
  410. fixed: '',
  411. columnWidth: 80
  412. },
  413. {
  414. userId: this.$store.state.user.name,
  415. functionId: 102001,
  416. serialNumber: '102001Table1rfqNo',
  417. tableId: '102001Table1',
  418. tableName: '询价信息表',
  419. columnProp: 'rfqNo',
  420. headerAlign: 'center',
  421. align: 'center',
  422. columnLabel: '询价单号',
  423. columnHidden: false,
  424. columnImage: false,
  425. columnSortable: false,
  426. sortLv: 0,
  427. status: true,
  428. fixed: '',
  429. columnWidth: 120
  430. },
  431. {
  432. userId: this.$store.state.user.name,
  433. functionId: 102001,
  434. serialNumber: '102001Table1CustomerNo',
  435. tableId: '102001Table1',
  436. tableName: '询价信息表',
  437. columnProp: 'customerNo',
  438. headerAlign: 'center',
  439. align: 'center',
  440. columnLabel: '客户编码',
  441. columnHidden: false,
  442. columnImage: false,
  443. columnSortable: false,
  444. sortLv: 0,
  445. status: true,
  446. fixed: '',
  447. columnWidth: 100
  448. },
  449. {
  450. userId: this.$store.state.user.name,
  451. functionId: 102001,
  452. serialNumber: '102001Table1CustomerDesc',
  453. tableId: '102001Table1',
  454. tableName: '询价信息表',
  455. columnProp: 'customerDesc',
  456. headerAlign: 'center',
  457. align: 'left',
  458. columnLabel: '客户名称',
  459. columnHidden: false,
  460. columnImage: false,
  461. columnSortable: false,
  462. sortLv: 0,
  463. status: true,
  464. fixed: '',
  465. columnWidth: 120
  466. },
  467. {
  468. userId: this.$store.state.user.name,
  469. functionId: 102001,
  470. serialNumber: '102001Table1RequestDate',
  471. tableId: '102001Table1',
  472. tableName: '询价信息表',
  473. columnProp: 'requestDate',
  474. headerAlign: 'center',
  475. align: 'center',
  476. columnLabel: '询价日期',
  477. columnHidden: false,
  478. columnImage: false,
  479. columnSortable: false,
  480. sortLv: 0,
  481. status: true,
  482. fixed: '',
  483. columnWidth: 120
  484. },
  485. {
  486. userId: this.$store.state.user.name,
  487. functionId: 102001,
  488. serialNumber: '102001Table1RequesterName',
  489. tableId: '102001Table1',
  490. tableName: '询价信息表',
  491. columnProp: 'requesterName',
  492. headerAlign: 'center',
  493. align: 'left',
  494. columnLabel: 'PjM',
  495. columnHidden: false,
  496. columnImage: false,
  497. columnSortable: false,
  498. sortLv: 0,
  499. status: true,
  500. fixed: '',
  501. columnWidth: 80
  502. },
  503. {
  504. userId: this.$store.state.user.name,
  505. functionId: 102001,
  506. serialNumber: '102001Table1QuoterName',
  507. tableId: '102001Table1',
  508. tableName: '询价信息表',
  509. columnProp: 'quoterName',
  510. headerAlign: 'center',
  511. align: 'left',
  512. columnLabel: '报价专员',
  513. columnHidden: false,
  514. columnImage: false,
  515. columnSortable: false,
  516. sortLv: 0,
  517. status: true,
  518. fixed: '',
  519. columnWidth: 80
  520. },
  521. {
  522. userId: this.$store.state.user.name,
  523. functionId: 102001,
  524. serialNumber: '102001Table1RequiredCompletionDate',
  525. tableId: '102001Table1',
  526. tableName: '询价信息表',
  527. columnProp: 'requiredCompletionDate',
  528. headerAlign: 'center',
  529. align: 'center',
  530. columnLabel: '要求报价日期',
  531. columnHidden: false,
  532. columnImage: false,
  533. columnSortable: false,
  534. sortLv: 0,
  535. status: true,
  536. fixed: '',
  537. columnWidth: 120
  538. },
  539. {
  540. userId: this.$store.state.user.name,
  541. functionId: 102001,
  542. serialNumber: '102001Table1CustomerInquiryNo',
  543. tableId: '102001Table1',
  544. tableName: '询价信息表',
  545. columnProp: 'customerInquiryNo',
  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: '',
  555. columnWidth: 120
  556. },
  557. {
  558. userId: this.$store.state.user.name,
  559. functionId: 102001,
  560. serialNumber: '102001Table2PartNo',
  561. tableId: '102001Table2',
  562. tableName: '询价产品表',
  563. columnProp: 'partNo',
  564. headerAlign: 'center',
  565. align: 'left',
  566. columnLabel: '产品编码',
  567. columnHidden: false,
  568. columnImage: false,
  569. columnSortable: false,
  570. sortLv: 0,
  571. status: true,
  572. fixed: '',
  573. columnWidth: 120
  574. },
  575. {
  576. userId: this.$store.state.user.name,
  577. functionId: 102001,
  578. serialNumber: '102001Table2PartDesc',
  579. tableId: '102001Table2',
  580. tableName: '询价产品表',
  581. columnProp: 'partDesc',
  582. headerAlign: 'center',
  583. align: 'left',
  584. columnLabel: '产品描述',
  585. columnHidden: false,
  586. columnImage: false,
  587. columnSortable: false,
  588. sortLv: 0,
  589. status: true,
  590. fixed: '',
  591. columnWidth: 120
  592. },
  593. {
  594. userId: this.$store.state.user.name,
  595. functionId: 102001,
  596. serialNumber: '102001Table1Status',
  597. tableId: '102001Table1',
  598. tableName: '询价信息表',
  599. columnProp: 'status',
  600. headerAlign: 'center',
  601. align: 'center',
  602. columnLabel: '状态',
  603. columnHidden: false,
  604. columnImage: false,
  605. columnSortable: false,
  606. sortLv: 0,
  607. status: true,
  608. fixed: '',
  609. columnWidth: 100
  610. },
  611. {
  612. userId: this.$store.state.user.name,
  613. functionId: 102001,
  614. serialNumber: '102001Table2InquiryQty',
  615. tableId: '102001Table2',
  616. tableName: '询价产品表',
  617. columnProp: 'inquiryQty',
  618. headerAlign: 'center',
  619. align: 'right',
  620. columnLabel: '询价数量',
  621. columnHidden: false,
  622. columnImage: false,
  623. columnSortable: false,
  624. sortLv: 0,
  625. status: true,
  626. fixed: '',
  627. columnWidth: 120
  628. },
  629. {
  630. userId: this.$store.state.user.name,
  631. functionId: 102001,
  632. serialNumber: '102001Table2Unit',
  633. tableId: '102001Table2',
  634. tableName: '询价产品表',
  635. columnProp: 'umName',
  636. headerAlign: 'center',
  637. align: 'center',
  638. columnLabel: '计量单位',
  639. columnHidden: false,
  640. columnImage: false,
  641. columnSortable: false,
  642. sortLv: 0,
  643. status: true,
  644. fixed: '',
  645. columnWidth: 80
  646. },
  647. {
  648. userId: this.$store.state.user.name,
  649. functionId: 102001,
  650. serialNumber: '102001Table2CodeNo',
  651. tableId: '102001Table2',
  652. tableName: '询价产品表',
  653. columnProp: 'codeNo',
  654. headerAlign: 'center',
  655. align: 'left',
  656. columnLabel: '属性模版',
  657. columnHidden: false,
  658. columnImage: false,
  659. columnSortable: false,
  660. sortLv: 0,
  661. status: true,
  662. fixed: '',
  663. columnWidth: 120
  664. },
  665. {
  666. userId: this.$store.state.user.name,
  667. functionId: 102001,
  668. serialNumber: '102001Table1PriorityLevel',
  669. tableId: '102001Table1',
  670. tableName: '询价信息表',
  671. columnProp: 'priorityLevel',
  672. headerAlign: 'center',
  673. align: 'center',
  674. columnLabel: '优先等级',
  675. columnHidden: false,
  676. columnImage: false,
  677. columnSortable: false,
  678. sortLv: 0,
  679. status: true,
  680. fixed: '',
  681. columnWidth: 80
  682. },
  683. {
  684. userId: this.$store.state.user.name,
  685. functionId: 102001,
  686. serialNumber: '102001Table2Remark',
  687. tableId: '102001Table2',
  688. tableName: '询价产品表',
  689. columnProp: 'remark',
  690. headerAlign: 'center',
  691. align: 'left',
  692. columnLabel: '备注',
  693. columnHidden: false,
  694. columnImage: false,
  695. columnSortable: false,
  696. sortLv: 0,
  697. status: true,
  698. fixed: '',
  699. columnWidth: 120
  700. },
  701. {
  702. userId: this.$store.state.user.name,
  703. functionId: 102001,
  704. serialNumber: '102001Table1CreateDate',
  705. tableId: '102001Table1',
  706. tableName: '询价信息表',
  707. columnProp: 'createDate',
  708. headerAlign: 'center',
  709. align: 'center',
  710. columnLabel: '创建时间',
  711. columnHidden: false,
  712. columnImage: false,
  713. columnSortable: false,
  714. sortLv: 0,
  715. status: true,
  716. fixed: '',
  717. columnWidth: 160
  718. },
  719. {
  720. userId: this.$store.state.user.name,
  721. functionId: 102001,
  722. serialNumber: '102001Table1CreateBy',
  723. tableId: '102001Table1',
  724. tableName: '询价信息表',
  725. columnProp: 'createBy',
  726. headerAlign: 'center',
  727. align: 'left',
  728. columnLabel: '创建人',
  729. columnHidden: false,
  730. columnImage: false,
  731. columnSortable: false,
  732. sortLv: 0,
  733. status: true,
  734. fixed: '',
  735. columnWidth: 80
  736. },
  737. {
  738. userId: this.$store.state.user.name,
  739. functionId: 102001,
  740. serialNumber: '102001Table1UpdateDate',
  741. tableId: '102001Table1',
  742. tableName: '询价信息表',
  743. columnProp: 'updateDate',
  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: 160
  754. },
  755. {
  756. userId: this.$store.state.user.name,
  757. functionId: 102001,
  758. serialNumber: '102001Table1UpdateBy',
  759. tableId: '102001Table1',
  760. tableName: '询价信息表',
  761. columnProp: 'updateBy',
  762. headerAlign: 'center',
  763. align: 'left',
  764. columnLabel: '更新人',
  765. columnHidden: false,
  766. columnImage: false,
  767. columnSortable: false,
  768. sortLv: 0,
  769. status: true,
  770. fixed: '',
  771. columnWidth: 80
  772. }
  773. ],
  774. columnItemList: [
  775. {
  776. userId: this.$store.state.user.name,
  777. functionId: 601006,
  778. serialNumber: '601006Table3ItemID',
  779. tableId: "601006Table3",
  780. tableName: "物料属性表",
  781. columnProp: 'itemNo',
  782. headerAlign: "center",
  783. align: "center",
  784. columnLabel: '属性编码',
  785. columnHidden: false,
  786. columnImage: false,
  787. status: true,
  788. fixed: '',
  789. columnWidth: 100,
  790. },
  791. {
  792. userId: this.$store.state.user.name,
  793. functionId: 601006,
  794. serialNumber: '601006Table3PropertiesItemDesc',
  795. tableId: "601006Table3",
  796. tableName: "物料属性表",
  797. columnProp: 'itemDesc',
  798. headerAlign: "center",
  799. align: "left",
  800. columnLabel: '属性名称',
  801. columnHidden: false,
  802. columnImage: false,
  803. status: true,
  804. fixed: '',
  805. columnWidth: 120,
  806. },
  807. {
  808. userId: this.$store.state.user.name,
  809. functionId: 601006,
  810. serialNumber: '601006Table3ValueType',
  811. tableId: "601006Table3",
  812. tableName: "物料属性表",
  813. columnProp: 'valueType',
  814. headerAlign: "center",
  815. align: "center",
  816. columnLabel: '属性类型',
  817. columnHidden: false,
  818. columnImage: false,
  819. status: true,
  820. fixed: '',
  821. columnWidth: 100,
  822. },
  823. {
  824. userId: this.$store.state.user.name,
  825. functionId: 601006,
  826. serialNumber: '601006Table3ValueChooseFlag',
  827. tableId: "601006Table3",
  828. tableName: "物料属性表",
  829. columnProp: 'textValue',
  830. headerAlign: "center",
  831. align: "left",
  832. columnLabel: '属性值',
  833. columnHidden: false,
  834. columnImage: false,
  835. status: true,
  836. fixed: '',
  837. columnWidth: 100,
  838. },
  839. // {
  840. // userId: this.$store.state.user.name,
  841. // functionId: 601006,
  842. // serialNumber: '601006Table3ValueChooseFlag',
  843. // tableId: "601006Table3",
  844. // tableName: "物料属性表",
  845. // columnProp: 'numValue',
  846. // headerAlign: "center",
  847. // align: "center",
  848. // columnLabel: '数字值',
  849. // columnHidden: false,
  850. // columnImage: false,
  851. // status: true,
  852. // fixed: '',
  853. // columnWidth: 70,
  854. // },
  855. ],
  856. columnQuotationList: [
  857. {
  858. userId: this.$store.state.user.name,
  859. functionId: 5011,
  860. serialNumber: '5011Table1BuDesc',
  861. tableId: '5011Table1',
  862. tableName: '报价信息表',
  863. columnProp: 'buDesc',
  864. headerAlign: 'center',
  865. align: 'center',
  866. columnLabel: 'BU',
  867. columnHidden: false,
  868. columnImage: false,
  869. columnSortable: false,
  870. sortLv: 0,
  871. status: true,
  872. fixed: '',
  873. columnWidth: 120
  874. },
  875. {
  876. userId: this.$store.state.user.name,
  877. functionId: 5011,
  878. serialNumber: '5011Table1QuoteVersionNo',
  879. tableId: '5011Table1',
  880. tableName: '报价信息表',
  881. columnProp: 'quoteVersionNo',
  882. headerAlign: 'center',
  883. align: 'center',
  884. columnLabel: '报价单号',
  885. columnHidden: false,
  886. columnImage: false,
  887. columnSortable: false,
  888. sortLv: 0,
  889. status: true,
  890. fixed: '',
  891. columnWidth: 180
  892. },
  893. {
  894. userId: this.$store.state.user.name,
  895. functionId: 5011,
  896. serialNumber: '5011Table1QuoteDate',
  897. tableId: '5011Table1',
  898. tableName: '报价信息表',
  899. columnProp: 'quoteDate',
  900. headerAlign: 'center',
  901. align: 'center',
  902. columnLabel: '报价日期',
  903. columnHidden: false,
  904. columnImage: false,
  905. columnSortable: false,
  906. sortLv: 0,
  907. status: true,
  908. fixed: '',
  909. columnWidth: 100
  910. },
  911. {
  912. userId: this.$store.state.user.name,
  913. functionId: 5011,
  914. serialNumber: '5011Table1CustomerNo',
  915. tableId: '5011Table1',
  916. tableName: '报价信息表',
  917. columnProp: 'customerNo',
  918. headerAlign: 'center',
  919. align: 'center',
  920. columnLabel: '客户编码',
  921. columnHidden: false,
  922. columnImage: false,
  923. columnSortable: false,
  924. sortLv: 0,
  925. status: true,
  926. fixed: '',
  927. columnWidth: 120
  928. },
  929. {
  930. userId: this.$store.state.user.name,
  931. functionId: 5011,
  932. serialNumber: '5011Table1CustomerDesc',
  933. tableId: '5011Table1',
  934. tableName: '报价信息表',
  935. columnProp: 'customerDesc',
  936. headerAlign: 'center',
  937. align: 'left',
  938. columnLabel: '客户名称',
  939. columnHidden: false,
  940. columnImage: false,
  941. columnSortable: false,
  942. sortLv: 0,
  943. status: true,
  944. fixed: '',
  945. columnWidth: 120
  946. },
  947. {
  948. userId: this.$store.state.user.name,
  949. functionId: 5011,
  950. serialNumber: '5011Table1QuoterName',
  951. tableId: '5011Table1',
  952. tableName: '报价信息表',
  953. columnProp: 'quoterName',
  954. headerAlign: 'center',
  955. align: 'left',
  956. columnLabel: '报价专员',
  957. columnHidden: false,
  958. columnImage: false,
  959. columnSortable: false,
  960. sortLv: 0,
  961. status: true,
  962. fixed: '',
  963. columnWidth: 120
  964. },
  965. {
  966. userId: this.$store.state.user.name,
  967. functionId: 5011,
  968. serialNumber: '5011Table1PurchaseName',
  969. tableId: '5011Table1',
  970. tableName: '报价信息表',
  971. columnProp: 'purchaseName',
  972. headerAlign: 'center',
  973. align: 'left',
  974. columnLabel: '采购专员',
  975. columnHidden: false,
  976. columnImage: false,
  977. columnSortable: false,
  978. sortLv: 0,
  979. status: true,
  980. fixed: '',
  981. columnWidth: 120
  982. },
  983. {
  984. userId: this.$store.state.user.name,
  985. functionId: 5011,
  986. serialNumber: '5011Table1Currency',
  987. tableId: '5011Table1',
  988. tableName: '报价信息表',
  989. columnProp: 'currency',
  990. headerAlign: 'center',
  991. align: 'center',
  992. columnLabel: '货币',
  993. columnHidden: false,
  994. columnImage: false,
  995. columnSortable: false,
  996. sortLv: 0,
  997. status: true,
  998. fixed: '',
  999. columnWidth: 120
  1000. },
  1001. {
  1002. userId: this.$store.state.user.name,
  1003. functionId: 5011,
  1004. serialNumber: '5011Table1Status',
  1005. tableId: '5011Table1',
  1006. tableName: '报价信息表',
  1007. columnProp: 'status',
  1008. headerAlign: 'center',
  1009. align: 'center',
  1010. columnLabel: '状态',
  1011. columnHidden: false,
  1012. columnImage: false,
  1013. columnSortable: false,
  1014. sortLv: 0,
  1015. status: true,
  1016. fixed: '',
  1017. columnWidth: 120
  1018. },
  1019. {
  1020. userId: this.$store.state.user.name,
  1021. functionId: 5011,
  1022. serialNumber: '5011Table1CustomerInquiryNo',
  1023. tableId: '5011Table1',
  1024. tableName: '报价信息表',
  1025. columnProp: 'customerInquiryNo',
  1026. headerAlign: 'center',
  1027. align: 'center',
  1028. columnLabel: '客户报价单号',
  1029. columnHidden: false,
  1030. columnImage: false,
  1031. columnSortable: false,
  1032. sortLv: 0,
  1033. status: true,
  1034. fixed: '',
  1035. columnWidth: 120
  1036. },
  1037. {
  1038. userId: this.$store.state.user.name,
  1039. functionId: 5011,
  1040. serialNumber: '5011Table1InsideInquiryNo',
  1041. tableId: '5011Table1',
  1042. tableName: '报价信息表',
  1043. columnProp: 'insideInquiryNo',
  1044. headerAlign: 'center',
  1045. align: 'center',
  1046. columnLabel: '内部询价单号',
  1047. columnHidden: false,
  1048. columnImage: false,
  1049. columnSortable: false,
  1050. sortLv: 0,
  1051. status: true,
  1052. fixed: '',
  1053. columnWidth: 120
  1054. },
  1055. {
  1056. userId: this.$store.state.user.name,
  1057. functionId: 5011,
  1058. serialNumber: '5011Table1CreateBy',
  1059. tableId: '5011Table1',
  1060. tableName: '报价信息表',
  1061. columnProp: 'createBy',
  1062. headerAlign: 'center',
  1063. align: 'center',
  1064. columnLabel: '创建人',
  1065. columnHidden: false,
  1066. columnImage: false,
  1067. columnSortable: false,
  1068. sortLv: 0,
  1069. status: true,
  1070. fixed: '',
  1071. columnWidth: 120
  1072. },
  1073. {
  1074. userId: this.$store.state.user.name,
  1075. functionId: 5011,
  1076. serialNumber: '5011Table1CreateDate',
  1077. tableId: '5011Table1',
  1078. tableName: '报价信息表',
  1079. columnProp: 'createDate',
  1080. headerAlign: 'center',
  1081. align: 'center',
  1082. columnLabel: '创建时间',
  1083. columnHidden: false,
  1084. columnImage: false,
  1085. columnSortable: false,
  1086. sortLv: 0,
  1087. status: true,
  1088. fixed: '',
  1089. columnWidth: 130
  1090. },
  1091. {
  1092. userId: this.$store.state.user.name,
  1093. functionId: 5011,
  1094. serialNumber: '5011Table1UpdateBy',
  1095. tableId: '5011Table1',
  1096. tableName: '报价信息表',
  1097. columnProp: 'updateBy',
  1098. headerAlign: 'center',
  1099. align: 'center',
  1100. columnLabel: '更新人',
  1101. columnHidden: false,
  1102. columnImage: false,
  1103. columnSortable: false,
  1104. sortLv: 0,
  1105. status: true,
  1106. fixed: '',
  1107. columnWidth: 120
  1108. },
  1109. {
  1110. userId: this.$store.state.user.name,
  1111. functionId: 5011,
  1112. serialNumber: '5011Table1UpdateDate',
  1113. tableId: '5011Table1',
  1114. tableName: '报价信息表',
  1115. columnProp: 'updateDate',
  1116. headerAlign: 'center',
  1117. align: 'center',
  1118. columnLabel: '更新时间',
  1119. columnHidden: false,
  1120. columnImage: false,
  1121. columnSortable: false,
  1122. sortLv: 0,
  1123. status: true,
  1124. fixed: '',
  1125. columnWidth: 130
  1126. },
  1127. ],
  1128. // ======== 选中的当前行数据 ========
  1129. inquiryPartCurrentRow: {},
  1130. }
  1131. },
  1132. mounted() {
  1133. this.$nextTick(() => {
  1134. /*第二个表格高度的动态调整*/
  1135. this.height = window.innerHeight - 210;
  1136. })
  1137. EventBus.$on('updateInquiryPartInfo', () => {
  1138. this.getDataList();
  1139. });
  1140. },
  1141. created() {
  1142. this.getSiteAndBuByUserName()
  1143. this.getDataList()
  1144. },
  1145. activated() {
  1146. console.log(this.$route.query.id)
  1147. if (this.$route.query.id) {
  1148. this.getDataList(this.$route.query.id);
  1149. this.activeTable = 'inquiryPartDetail';
  1150. }
  1151. },
  1152. methods: {
  1153. // 获取用户的bu
  1154. getSiteAndBuByUserName() {
  1155. let tempData = {
  1156. username: this.$store.state.user.name,
  1157. }
  1158. getSiteAndBuByUserName(tempData).then(({data}) => {
  1159. if (data.code === 0) {
  1160. this.userBuList = data.rows
  1161. }
  1162. })
  1163. },
  1164. // ======== 分页相关方法 ========
  1165. /**
  1166. * 每页数
  1167. * @param val
  1168. */
  1169. sizeChangeHandle(val) {
  1170. this.pageSize = val
  1171. this.pageIndex = 1
  1172. this.getDataList()
  1173. },
  1174. /**
  1175. * 当前页
  1176. * @param val
  1177. */
  1178. currentChangeHandle(val) {
  1179. this.pageIndex = val
  1180. this.getDataList()
  1181. },
  1182. // ======== 页签切换相关方法 ========
  1183. /**
  1184. * 列表表格选择替换
  1185. * @param tab
  1186. * @param event
  1187. */
  1188. tabClick(tab, event) {
  1189. // 刷新列表数据
  1190. this.refreshCurrentTabTable()
  1191. },
  1192. // ======== 列表操作方法 ========
  1193. /**
  1194. * 单机选中询价信息
  1195. * @param row
  1196. */
  1197. inquiryPartClickRow(row) {
  1198. this.inquiryPartCurrentRow = JSON.parse(JSON.stringify(row))
  1199. },
  1200. /**
  1201. * 当前值发生变化的时候修改
  1202. * @param row
  1203. * @param oldRow
  1204. */
  1205. changeCurrentRow(row, oldRow) {
  1206. // 判断是否是获取焦点的事件
  1207. if (row) {
  1208. this.inquiryPartCurrentRow = JSON.parse(JSON.stringify(row))
  1209. //刷新当前页表
  1210. this.refreshCurrentTabTable()
  1211. }
  1212. },
  1213. /**
  1214. * 刷新页签的table数据
  1215. */
  1216. refreshCurrentTabTable() {
  1217. if (this.activeTable === 'inquiryPartItem') {
  1218. this.getItemListByInquiryPartAndCodeNo()
  1219. }
  1220. if (this.activeTable === 'inquiryPartQuotation') {
  1221. this.getQuotationDataList()
  1222. }
  1223. },
  1224. // ======== chooseList相关方法 ========
  1225. /**
  1226. * 获取基础数据列表S
  1227. * @param val
  1228. * @param type
  1229. */
  1230. getBaseList(val, type) {
  1231. this.tagNo = val
  1232. this.tagNo1 = type
  1233. this.$nextTick(() => {
  1234. let strVal = ''
  1235. let conSql = ''
  1236. if (val === 220) {
  1237. strVal = this.inquiryPartModalData.codeNo ? this.inquiryPartModalData.codeNo : ''
  1238. conSql = " and function_type = 'PRICECHECK'" + " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'" +
  1239. " and bu_no = '" + this.inquiryPartModalData.bu.split('_')[1] + "'"
  1240. }
  1241. if (val === 509) {
  1242. if (type === 1) {
  1243. strVal = this.modalData.customerNo ? this.modalData.customerNo : ''
  1244. }
  1245. if (type === 2) {
  1246. strVal = this.searchData.customerNo ? this.searchData.customerNo : ''
  1247. }
  1248. }
  1249. if (val === 510) {
  1250. strVal = this.inquiryPartModalData.umId ? this.inquiryPartModalData.umId : ''
  1251. conSql = " and site = '" + this.inquiryPartModalData.bu.split('_')[0] + "'"
  1252. }
  1253. if (val === 2002) {
  1254. if (type === 1) {
  1255. strVal = this.searchData.quoterName ? this.searchData.quoterName : ''
  1256. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1257. }
  1258. if (type === 2) {
  1259. strVal = this.modalData.quoterName ? this.modalData.quoterName : ''
  1260. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1261. }
  1262. }
  1263. if (val === 2004) {
  1264. if (type === 1) {
  1265. strVal = this.searchData.requesterName ? this.searchData.requesterName : ''
  1266. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1267. }
  1268. if (type === 2) {
  1269. strVal = this.modalData.requesterName ? this.modalData.requesterName : ''
  1270. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1271. }
  1272. }
  1273. if (val === 2005) {
  1274. strVal = this.searchData.partNo ? this.searchData.partNo : ''
  1275. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  1276. }
  1277. this.$refs.baseList.init(val, strVal, conSql)
  1278. })
  1279. },
  1280. /**
  1281. * 列表方法的回调
  1282. * @param val
  1283. */
  1284. getBaseData(val) {
  1285. console.log(val)
  1286. if (this.tagNo === 220) {
  1287. this.inquiryPartModalData.codeNo = val.code_no
  1288. this.inquiryPartModalData.codeDesc = val.code_desc
  1289. }
  1290. if (this.tagNo === 509) {
  1291. if (this.tagNo1 === 1) {
  1292. if (val.customer_no === this.modalData.customerNo) {
  1293. return
  1294. }
  1295. this.modalData.customerNo = val.customer_no
  1296. this.modalData.customerDesc = val.customer_desc
  1297. }
  1298. if (this.tagNo1 === 2) {
  1299. if (val.customer_no === this.searchData.customerNo) {
  1300. return
  1301. }
  1302. this.searchData.customerNo = val.customer_no
  1303. }
  1304. }
  1305. if (this.tagNo === 510) {
  1306. this.inquiryPartModalData.umId = val.UMID
  1307. this.inquiryPartModalData.umName = val.UMName
  1308. }
  1309. if (this.tagNo === 2002) {
  1310. if (this.tagNo1 === 1) {
  1311. this.searchData.quoter = val.username
  1312. this.searchData.quoterName = val.user_display
  1313. }
  1314. if (this.tagNo1 === 2) {
  1315. this.modalData.quoter = val.username
  1316. this.modalData.quoterName = val.user_display
  1317. }
  1318. }
  1319. if (this.tagNo === 2004) {
  1320. if (this.tagNo1 === 1) {
  1321. this.searchData.requester = val.username
  1322. this.searchData.requesterName = val.user_display
  1323. }
  1324. if (this.tagNo1 === 2) {
  1325. this.modalData.requester = val.username
  1326. this.modalData.requesterName = val.user_display
  1327. }
  1328. }
  1329. if (this.tagNo === 2005) {
  1330. this.searchData.partNo = val.part_no
  1331. }
  1332. },
  1333. // ======== 列表数据刷新方法 ========
  1334. /**
  1335. * 获取数据列表
  1336. */
  1337. getDataList(id) {
  1338. if (id) {
  1339. this.searchData.id = id
  1340. } else {
  1341. this.searchData.id = ''
  1342. }
  1343. this.searchData.limit = this.pageSize
  1344. this.searchData.page = this.pageIndex
  1345. searchInquiryDetailHeaderInfo(this.searchData).then(({data}) => {
  1346. if (data.code === 0) {
  1347. this.dataList = data.page.list
  1348. this.pageIndex = data.page.currPage
  1349. this.pageSize = data.page.pageSize
  1350. this.totalPage = data.page.totalCount
  1351. //判断是否全部存在数据
  1352. if (this.totalPage > 0) {
  1353. //设置选中行
  1354. this.$refs.mainTable.setCurrentRow(this.dataList[0])
  1355. this.inquiryPartClickRow(this.dataList[0])
  1356. this.refreshCurrentTabTable() //加载当前的页签的table
  1357. }
  1358. }
  1359. })
  1360. },
  1361. async getItemListByInquiryPartAndCodeNo() {
  1362. let inData = this.inquiryPartCurrentRow
  1363. inData.inquiryPartId = inData.id
  1364. inData.recordType = 'PRICECHECK'
  1365. return getItemListByInquiryPartAndCodeNo(inData).then(({data}) => {
  1366. if (data && data.code === 0) {
  1367. this.inquiryPartItemDataList = data.rows;
  1368. } else {
  1369. this.$message.warning(data.msg)
  1370. }
  1371. }).catch((error) => {
  1372. this.$message.error(error)
  1373. })
  1374. },
  1375. getQuotationDataList(){
  1376. let inData = {
  1377. site : this.inquiryPartCurrentRow.site,
  1378. rfqNo : this.inquiryPartCurrentRow.rfqNo,
  1379. testPartId : this.inquiryPartCurrentRow.testPartId
  1380. }
  1381. searchQuotationRecordInfo(inData).then(({data}) => {
  1382. if (data && data.code === 0) {
  1383. this.inquiryQuotationDataList = data.rows;
  1384. } else {
  1385. this.$message.warning(data.msg)
  1386. }
  1387. }).catch((error) => {
  1388. this.$message.error(error)
  1389. })
  1390. },
  1391. handleQuotationRequest(row) {
  1392. // 创建一个array
  1393. let ids = [row.id]
  1394. this.$router.push({
  1395. name:'quote-index',
  1396. params:{
  1397. ids:ids
  1398. }
  1399. })
  1400. },
  1401. rowStyle({row}) {
  1402. if (this.inquiryPartCurrentRow.id === row.id) {
  1403. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  1404. }
  1405. },
  1406. // ======== 导出相关方法 ========
  1407. /**
  1408. * 导出excel
  1409. */
  1410. async createExportData() {
  1411. this.searchData.limit = -1
  1412. this.searchData.page = 1
  1413. await searchInquiryDetailHeaderInfo(this.searchData).then(({data}) => {
  1414. this.resultList = data.page.list
  1415. // 遍历dataList 取-后的值
  1416. this.resultList.forEach((item) => {
  1417. if (item.status === 'A') {
  1418. item.status = '已报价'
  1419. } else if (item.status === 'B') {
  1420. item.status = '已下达'
  1421. } else if (item.status === 'C') {
  1422. item.status = '草稿'
  1423. }
  1424. if (item.priorityLevel === 'A') {
  1425. item.priorityLevel = '普通'
  1426. } else if (item.priorityLevel === ' B') {
  1427. item.priorityLevel = '重要'
  1428. } else if (item.priorityLevel === ' C') {
  1429. item.priorityLevel = '紧急'
  1430. }
  1431. })
  1432. })
  1433. return this.resultList
  1434. },
  1435. startDownload() {
  1436. },
  1437. finishDownload() {
  1438. },
  1439. fields() {
  1440. let json = '{'
  1441. this.columnList.forEach((item, index) => {
  1442. if (index == this.columnList.length - 1) {
  1443. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  1444. } else {
  1445. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  1446. }
  1447. })
  1448. json += '}'
  1449. let s = eval('(' + json + ')')
  1450. return s
  1451. },
  1452. }
  1453. }
  1454. </script>
  1455. <style scoped lang="scss">
  1456. /deep/ .customer-tab .el-tabs__content {
  1457. padding: 0px !important;
  1458. }
  1459. .el-table /deep/ .cell{
  1460. height: auto;
  1461. line-height: 1.5;
  1462. }
  1463. .el-input-number /deep/ .el-input__inner {
  1464. text-align: right;
  1465. padding-right: 5px !important;
  1466. }
  1467. </style>