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.

2775 lines
102 KiB

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.quotationBatchNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item label="客户编码">
  9. <el-input v-model="searchData.customerNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'客户名称'">
  12. <el-input v-model="searchData.customerDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'跟单员'">
  15. <el-input v-model="searchData.trackerName" clearable style="width: 120px"></el-input>
  16. </el-form-item>
  17. <el-form-item :label="'产品编码'">
  18. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"></el-input>
  19. </el-form-item>
  20. <el-form-item :label="'产品名称'">
  21. <el-input v-model="searchData.partName" clearable style="width: 120px"></el-input>
  22. </el-form-item>
  23. <el-form-item :label="'要求完成日期'">
  24. <el-date-picker
  25. style="width: 120px"
  26. v-model="searchData.startDate"
  27. type="date"
  28. value-format="yyyy-MM-dd"
  29. placeholder="选择日期">
  30. </el-date-picker>
  31. </el-form-item>
  32. <el-form-item style="margin-top: 23px;">
  33. <laber style="margin-left: 0px;font-size: 19px">&#10142</laber>
  34. </el-form-item>
  35. <el-form-item :label="' '">
  36. <el-date-picker
  37. style="width: 120px"
  38. v-model="searchData.endDate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  46. <el-form-item label="批次序号">
  47. <el-input v-model="searchData.quotationItemNo" clearable style="width: 120px"></el-input>
  48. </el-form-item>
  49. <el-form-item :label="'项目编码'">
  50. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  51. </el-form-item>
  52. <el-form-item :label="'项目名称'">
  53. <el-input v-model="searchData.projectName" clearable style="width: 120px"></el-input>
  54. </el-form-item>
  55. <el-form-item :label="'工程师'">
  56. <el-input v-model="searchData.quoterName" clearable style="width: 120px"></el-input>
  57. </el-form-item>
  58. <el-form-item :label="'优先等级'">
  59. <dict-data-select v-model="searchData.priorityLevel" clearable style="width: 120px" :use-default-value="false" dict-type="priority_Level"/>
  60. </el-form-item>
  61. <el-form-item :label="'状态'">
  62. <el-select v-model="searchData.quotationStatus" style="width: 120px">
  63. <el-option label="全部" value=""></el-option>
  64. <el-option label="草稿" value="草稿"></el-option>
  65. <el-option label="下达" value="下达"></el-option>
  66. </el-select>
  67. </el-form-item>
  68. <el-form-item :label="' '">
  69. <el-button @click="getDataList()">查询</el-button>
  70. <el-button type="primary" @click="addModal()">新增</el-button>
  71. <el-button type="primary" @click="delModal()">删除</el-button>
  72. <download-excel
  73. :fields="fields()"
  74. :data="exportData"
  75. type="xls"
  76. :name="exportName"
  77. :header="exportHeader"
  78. :footer="exportFooter"
  79. :fetch="createExportData"
  80. :before-generate="startDownload"
  81. :before-finish="finishDownload"
  82. worksheet="导出信息"
  83. class="el-button el-button--primary el-button--medium">
  84. {{ "导出" }}
  85. </download-excel>
  86. </el-form-item>
  87. </el-form>
  88. <!-- 询价列表 -->
  89. <el-table
  90. :height="height"
  91. :data="dataList"
  92. border
  93. ref="quotationTable"
  94. @row-click="quotationClickRow"
  95. @selection-change="selectionQuotation"
  96. @current-change="changeCurrentRow"
  97. v-loading="dataListLoading"
  98. style="width: 100%;">
  99. <el-table-column
  100. type="selection"
  101. header-align="center"
  102. align="center"
  103. :selectable="selectFlag"
  104. width="50">
  105. </el-table-column>
  106. <el-table-column
  107. v-for="(item,index) in columnList" :key="index"
  108. :sortable="item.columnSortable"
  109. :prop="item.columnProp"
  110. :header-align="item.headerAlign"
  111. :show-overflow-tooltip="item.showOverflowTooltip"
  112. :align="item.align"
  113. :fixed="item.fixed === ''?false:item.fixed"
  114. :min-width="item.columnWidth"
  115. :label="item.columnLabel">
  116. <template slot-scope="scope">
  117. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  118. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column
  122. fixed="right"
  123. header-align="center"
  124. align="center"
  125. width="100"
  126. label="操作">
  127. <template slot-scope="scope">
  128. <a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <selectDiv ref="selectDiv"></selectDiv>
  133. <!-- 分页插件 -->
  134. <el-pagination style="margin-top: 0px"
  135. @size-change="sizeChangeHandle"
  136. @current-change="currentChangeHandle"
  137. :current-page="pageIndex"
  138. :page-sizes="[20, 50, 100, 200, 500]"
  139. :page-size="pageSize"
  140. :total="totalPage"
  141. layout="total, sizes, prev, pager, next, jumper">
  142. </el-pagination>
  143. <!-- 询价模态框 -->
  144. <el-dialog :title="modalData.title" @open="openSaveDataDialog" @close="closeSaveDataDialog" :close-on-click-modal="false" top="10vh" :visible.sync="modalFlag" width="50%">
  145. <el-form label-position="top" ref="saveDataForm" :model="modalData" :rules="rules">
  146. <el-row :gutter="10">
  147. <el-col :span="12">
  148. <el-form-item prop="customerNo" label="客户编码">
  149. <span slot="label" v-if="modalData.flag === '1'" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
  150. <el-row :gutter="10">
  151. <el-col :span="8">
  152. <el-input :disabled="modalData.flag !== '1'" :readonly="true" v-model="modalData.customerNo"></el-input>
  153. </el-col>
  154. <el-col :span="16">
  155. <el-input disabled v-model="modalData.customerDesc"></el-input>
  156. </el-col>
  157. </el-row>
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="4">
  161. <el-form-item label="客户负责人">
  162. <el-input v-model="modalData.customerResponsiblePerson"></el-input>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :span="4">
  166. <el-form-item label="客户负责人联系方式">
  167. <el-input v-model="modalData.customerResponsiblePersonPhone"></el-input>
  168. </el-form-item>
  169. </el-col>
  170. <el-col :span="4">
  171. <el-form-item prop="trackerName">
  172. <span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span>
  173. <el-input v-model="modalData.trackerName"></el-input>
  174. </el-form-item>
  175. </el-col>
  176. </el-row>
  177. <el-row :gutter="10">
  178. <el-col :span="12">
  179. <el-form-item prop="projectId" label="项目编码">
  180. <span slot="label" v-if="modalData.customerNo && modalData.flag === '1'" style="" @click="chooseProjectListFlag = true"><a herf="#">项目编码</a></span>
  181. <el-row :gutter="10">
  182. <el-col :span="8">
  183. <el-input :disabled="!modalData.customerNo || modalData.flag !== '1'" :readonly="true" v-model="modalData.projectId"></el-input>
  184. </el-col>
  185. <el-col :span="16">
  186. <el-input disabled v-model="modalData.projectName"></el-input>
  187. </el-col>
  188. </el-row>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="4">
  192. <el-form-item label="优先等级" prop="priorityLevel">
  193. <dict-data-select v-if="modalFlag" v-model="modalData.priorityLevel" dict-type="priority_Level"></dict-data-select>
  194. </el-form-item>
  195. </el-col>
  196. <el-col :span="4">
  197. <el-form-item label="要求完成日期" prop="requiredCompletionDate">
  198. <el-date-picker v-model="modalData.requiredCompletionDate" style="width: 100%" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="4">
  202. <el-form-item prop="quoterName">
  203. <span slot="label" style="" @click="getBaseList(103,2)"><a herf="#">报价专员</a></span>
  204. <el-input v-model="modalData.quoterName"></el-input>
  205. </el-form-item>
  206. </el-col>
  207. </el-row>
  208. <el-row :gutter="10">
  209. <el-col :span="24">
  210. <el-form-item label="备注" style="display: block;min-height: 90px">
  211. <el-input type="textarea" :autosize="{minRows: 3, maxRows: 3}" resize='none' v-model="modalData.remark"></el-input>
  212. </el-form-item>
  213. </el-col>
  214. </el-row>
  215. <el-row :gutter="10">
  216. <el-col :span="24">
  217. <el-form-item label="技术注意事项" style="display: block;min-height: 90px">
  218. <el-input
  219. type="textarea"
  220. v-model="modalData.technicalConsiderations"
  221. :autosize="{minRows: 3, maxRows: 3}"
  222. resize='none'>
  223. </el-input>
  224. </el-form-item>
  225. </el-col>
  226. </el-row>
  227. <el-form-item style="display: none">
  228. <span slot="label" @click="getProjectPartList()"><a>项目物料</a></span>
  229. <el-input v-model="modalData.partName" style="display: none"></el-input>
  230. </el-form-item>
  231. <div class="rq">
  232. <el-form :inline="true" label-position="top" :model="projectPartData">
  233. <el-form-item label="产品编码">
  234. <el-input v-model="projectPartData.testPartNo" clearable style="width: 120px"></el-input>
  235. </el-form-item>
  236. <el-form-item label="产品名称">
  237. <el-input v-model="projectPartData.partName" clearable style="width: 120px"></el-input>
  238. </el-form-item>
  239. <el-form-item label=" ">
  240. <el-button type="primary" @click="getProjectPartList()">查询</el-button>
  241. </el-form-item>
  242. </el-form>
  243. <el-table
  244. :height="223"
  245. :data="projectPartList"
  246. ref="projectPartTable"
  247. @row-click="projectPartClickRow"
  248. @selection-change="selectionProjectPart"
  249. :row-key="getRowKeys"
  250. border
  251. v-loading="dataListLoading"
  252. style="width: 100%;">
  253. <el-table-column
  254. type="selection"
  255. header-align="center"
  256. align="center"
  257. :selectable="checkSelectable"
  258. width="50" class-name="disabledCheckbox">
  259. </el-table-column>
  260. <el-table-column
  261. v-for="(item,index) in projectPartDetailList" :key="index"
  262. :sortable="item.columnSortable"
  263. :prop="item.columnProp"
  264. :header-align="item.headerAlign"
  265. :show-overflow-tooltip="item.showOverflowTooltip"
  266. :align="item.align"
  267. :fixed="item.fixed===''?false:item.fixed"
  268. :min-width="item.columnWidth"
  269. :label="item.columnLabel">
  270. <template slot-scope="scope">
  271. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  272. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  273. </template>
  274. </el-table-column>
  275. </el-table>
  276. </div>
  277. </el-form>
  278. <el-footer style="height:35px;margin-top: 10px;padding-bottom:5px;text-align:center">
  279. <el-button type="primary" @click="saveData()">保存</el-button>
  280. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  281. </el-footer>
  282. </el-dialog>
  283. <!--选择项目模态框-->
  284. <el-dialog title="选择-项目" @close="closeProjectInfoDialog" @open="searchProjectInfoList" :visible.sync="chooseProjectListFlag" width="35%">
  285. <el-form label-position="top" :model="searchProjectData" ref="closeProjectInfoForm">
  286. <el-row :gutter="10">
  287. <el-col :span="6">
  288. <el-form-item label="项目编码">
  289. <el-input v-model="searchProjectData.projectId"></el-input>
  290. </el-form-item>
  291. </el-col>
  292. <el-col :span="6">
  293. <el-form-item label="项目名称">
  294. <el-input v-model="searchProjectData.projectName"></el-input>
  295. </el-form-item>
  296. </el-col>
  297. <el-col :span="6">
  298. <el-form-item label=" ">
  299. <el-button type="primary" @click="searchProjectInfoList">查询</el-button>
  300. </el-form-item>
  301. </el-col>
  302. </el-row>
  303. <el-table :height="223"
  304. :data="projectList"
  305. border
  306. @row-click="projectClickRow">
  307. <el-table-column label="项目编码" prop="projectId"/>
  308. <el-table-column label="项目名称" prop="projectName"/>
  309. </el-table>
  310. </el-form>
  311. </el-dialog>
  312. <!-- 录入询价结果模态框 -->
  313. <el-dialog title="录入询价结果" :close-on-click-modal="false" v-drag :visible.sync="enterResultModalFlag" width="785px">
  314. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left: 0px;margin-top: 10px;">
  315. <el-form-item label="实际询价日期" prop="actualityQuotationDate" :rules="enterResultRules.actualityQuotationDate">
  316. <el-date-picker v-model="enterResultData.actualityQuotationDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  317. </el-form-item>
  318. </el-form>
  319. <el-form :inline="true" label-position="top" :model="enterResultData" :rules="enterResultRules" style="margin-left:0px;margin-top: 5px;">
  320. <el-form-item label="询价结果信息" prop="quotationResultInformation" :rules="enterResultRules.quotationResultInformation">
  321. <el-input type="textarea" v-model="enterResultData.quotationResultInformation" :rows="3" resize='none' show-word-limit style="width: 500px;height: 30px"></el-input>
  322. </el-form-item>
  323. </el-form>
  324. <el-form :inline="true" label-position="top" :model="enterResultData" style="margin-left: 0px;margin-top: 50px;">
  325. <el-form :inline="true" label-position="top" style="margin-top: 5px">
  326. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  327. </el-form>
  328. <el-table
  329. :height="200"
  330. :data="fileContentList"
  331. border
  332. v-loading="dataListLoading"
  333. style="width: 100%">
  334. <el-table-column
  335. v-for="(item,index) in fileColumnList" :key="index"
  336. :sortable="item.columnSortable"
  337. :prop="item.columnProp"
  338. :header-align="item.headerAlign"
  339. :show-overflow-tooltip="item.showOverflowTooltip"
  340. :align="item.align"
  341. :fixed="item.fixed===''?false:item.fixed"
  342. :min-width="item.columnWidth"
  343. :label="item.columnLabel">
  344. <template slot-scope="scope">
  345. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  346. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  347. </template>
  348. </el-table-column>
  349. <el-table-column
  350. fixed="right"
  351. header-align="center"
  352. align="center"
  353. width="100"
  354. label="操作">
  355. <template slot-scope="scope">
  356. <a @click="deleteFile(scope.row)">删除</a>
  357. </template>
  358. </el-table-column>
  359. </el-table>
  360. </el-form>
  361. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  362. <el-button type="primary" @click="saveQuotationResult()">保存</el-button>
  363. <el-button type="primary" @click="enterResultModalFlag = false">关闭</el-button>
  364. </el-footer>
  365. </el-dialog>
  366. <!-- 提交客户询价模态框 -->
  367. <el-dialog title="提交客户询价" :close-on-click-modal="false" v-drag :visible.sync="submitResultModalFlag" width="620px">
  368. <el-form :inline="true" label-position="top" :model="submitResultData" :rules="submitResultRules" style="margin-left: 0px;margin-top: 10px;">
  369. <el-form-item label="实际提交客户日期" prop="actualitySubmissionDate" :rules="submitResultRules.actualitySubmissionDate">
  370. <el-date-picker v-model="submitResultData.actualitySubmissionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 200px"></el-date-picker>
  371. </el-form-item>
  372. <el-form-item label="提交方式" prop="submissionMethod" :rules="submitResultRules.submissionMethod">
  373. <el-select v-model="submitResultData.submissionMethod" style="width: 221px">
  374. <el-option label="邮件" value="邮件"></el-option>
  375. <el-option label="口头" value="口头"></el-option>
  376. <el-option label="微信" value="微信"></el-option>
  377. <el-option label="其它" value="其它"></el-option>
  378. </el-select>
  379. </el-form-item>
  380. </el-form>
  381. <el-form :inline="true" label-position="top" :model="submitResultData" style="margin-left:0px;margin-top: 5px;">
  382. <el-form-item label="提交备注">
  383. <el-input type="textarea" v-model="submitResultData.submissionRemark" :rows="3" resize='none' show-word-limit style="width: 456px;height: 30px"></el-input>
  384. </el-form-item>
  385. </el-form>
  386. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  387. <el-button type="primary" @click="saveSubmitResult()">保存</el-button>
  388. <el-button type="primary" @click="submitResultModalFlag = false">关闭</el-button>
  389. </el-footer>
  390. </el-dialog>
  391. <!-- 客户回复模态框 -->
  392. <el-dialog title="客户回复" :close-on-click-modal="false" v-drag :visible.sync="customerResponseModalFlag" width="620px">
  393. <el-form :inline="true" label-position="top" :model="customerResponseData" :rules="customerResponseRules" style="margin-left: 0px;margin-top: 10px;">
  394. <el-form-item label="实际回复日期" prop="actualityReplyDate" :rules="customerResponseRules.actualityReplyDate">
  395. <el-date-picker v-model="customerResponseData.actualityReplyDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" style="width: 185px"></el-date-picker>
  396. </el-form-item>
  397. <el-form-item label="客户确认结果" prop="confirmResults" :rules="customerResponseRules.confirmResults">
  398. <el-select v-model="customerResponseData.confirmResults" style="width: 185px">
  399. <el-option label="接受" value="接受"></el-option>
  400. <el-option label="不接受" value="不接受"></el-option>
  401. </el-select>
  402. </el-form-item>
  403. <el-form-item label="客户确认人" prop="confirmBy" :rules="customerResponseRules.confirmBy">
  404. <el-input v-model="customerResponseData.confirmBy" style="width: 185px"></el-input>
  405. </el-form-item>
  406. </el-form>
  407. <el-form :inline="true" label-position="top" :model="customerResponseData" style="margin-left:0px;margin-top: 5px;">
  408. <el-form-item label="客户回复信息">
  409. <el-input type="textarea" v-model="customerResponseData.confirmInformation" :rows="3" resize='none' show-word-limit style="width: 595px;height: 30px"></el-input>
  410. </el-form-item>
  411. </el-form>
  412. <el-footer style="height:35px;margin-top: 50px;text-align:center">
  413. <el-button type="primary" @click="saveCustomerResponse()">保存</el-button>
  414. <el-button type="primary" @click="customerResponseModalFlag = false">关闭</el-button>
  415. </el-footer>
  416. </el-dialog>
  417. <!-- 页签 -->
  418. <el-tabs v-model="activeTable" style="margin-top: 0px; width: 100%; min-height: 500px;box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;" @tab-click="tabClick" class="customer-tab">
  419. <!-- 询价详细信息页签 -->
  420. <el-tab-pane label="询价详细信息" name="quotation_detail_information" style="">
  421. <el-form :inline="true" label-position="top" :model="quotationDetailData" style="margin-left: 10px;margin-top: 10px;">
  422. <el-form-item label="技术注意事项">
  423. <el-input
  424. type="textarea"
  425. v-model="quotationDetailData.technicalConsiderations"
  426. readonly
  427. :rows="3"
  428. resize='none'
  429. show-word-limit
  430. style="width: 600px;height: 30px">
  431. </el-input>
  432. </el-form-item>
  433. </el-form>
  434. <el-form :inline="true" label-position="top" :model="quotationDetailData" style="margin-left: 10px;margin-top: 46px;">
  435. <el-form-item label="客户负责人">
  436. <el-input v-model="quotationDetailData.customerResponsiblePerson" readonly style="width: 295px"></el-input>
  437. </el-form-item>
  438. <el-form-item label="客户负责人联系方式">
  439. <el-input v-model="quotationDetailData.customerResponsiblePersonPhone" readonly style="width: 295px"></el-input>
  440. </el-form-item>
  441. </el-form>
  442. </el-tab-pane>
  443. <!-- 询价结果页签 -->
  444. <el-tab-pane label="询价结果" name="quotation_result">
  445. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 5px;">
  446. <el-button v-if="quotationResultData.quotationResultStatus === 'C'" type="primary" @click="quotationResultModal()">录入询价结果</el-button>
  447. <el-button v-if="quotationResultData.quotationResultStatus === 'E'" type="primary" @click="submitQuotationModal()">提交客户询价</el-button>
  448. <el-button v-if="quotationResultData.quotationResultStatus === 'S'" type="primary" @click="customerResponseModal()">客户回复</el-button>
  449. </el-form>
  450. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 2px;">
  451. <el-form-item label="实际询价日期">
  452. <el-date-picker v-model="quotationResultData.actualityQuotationDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  453. </el-form-item>
  454. </el-form>
  455. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: -1px;">
  456. <el-form-item label="询价结果信息">
  457. <el-input type="textarea" v-model="quotationResultData.quotationResultInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  458. </el-form-item>
  459. </el-form>
  460. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 26px;">
  461. <el-form-item label="附件清单">
  462. <el-table
  463. :height="90"
  464. :data="fileContentList"
  465. border
  466. v-loading="dataListLoading"
  467. style="width: 100%">
  468. <el-table-column
  469. v-for="(item,index) in fileColumnList" :key="index"
  470. :sortable="item.columnSortable"
  471. :prop="item.columnProp"
  472. :header-align="item.headerAlign"
  473. :show-overflow-tooltip="item.showOverflowTooltip"
  474. :align="item.align"
  475. :fixed="item.fixed===''?false:item.fixed"
  476. :min-width="item.columnWidth"
  477. :label="item.columnLabel">
  478. <template slot-scope="scope">
  479. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  480. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  481. </template>
  482. </el-table-column>
  483. <el-table-column
  484. fixed="right"
  485. header-align="center"
  486. align="center"
  487. width="100"
  488. label="操作">
  489. <template slot-scope="scope">
  490. <a @click="downloadFile(scope.row)">下载</a>
  491. </template>
  492. </el-table-column>
  493. </el-table>
  494. </el-form-item>
  495. </el-form>
  496. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 69px;">
  497. <el-form-item label="实际提交看客户日期">
  498. <el-date-picker v-model="quotationResultData.actualitySubmissionDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  499. </el-form-item>
  500. <el-form-item label="提交方式">
  501. <el-input v-model="quotationResultData.submissionMethod" readonly style="width: 240px"></el-input>
  502. </el-form-item>
  503. </el-form>
  504. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: -2px;">
  505. <el-form-item label="提交备注">
  506. <el-input type="textarea" v-model="quotationResultData.submissionRemark" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  507. </el-form-item>
  508. </el-form>
  509. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: 26px;">
  510. <el-form-item label="客户是否回复">
  511. <input type="checkbox" v-if="quotationResultData.quotationResultStatus == 'R'" checked onclick="return false"/>
  512. <input type="checkbox" v-if="quotationResultData.quotationResultStatus != 'R'" onclick="return false"/>
  513. </el-form-item>
  514. <el-form-item label="客户确认结果">
  515. <el-input v-model="quotationResultData.confirmResults" readonly style="width: 205px"></el-input>
  516. </el-form-item>
  517. <el-form-item label="实际回复日期">
  518. <el-date-picker v-model="quotationResultData.actualityReplyDate" readonly type="date" value-format="yyyy-MM-dd" style="width: 240px"></el-date-picker>
  519. </el-form-item>
  520. <el-form-item label="客户确认人">
  521. <el-input v-model="quotationResultData.confirmBy" readonly style="width: 205px"></el-input>
  522. </el-form-item>
  523. </el-form>
  524. <el-form :inline="true" label-position="top" :model="quotationResultData" style="margin-left: 10px;margin-top: -2px;">
  525. <el-form-item label="客户回复信息">
  526. <el-input type="textarea" v-model="quotationResultData.confirmInformation" readonly :rows="2" resize='none' show-word-limit style="width: 760px;height: 20px"></el-input>
  527. </el-form-item>
  528. </el-form>
  529. </el-tab-pane>
  530. <!-- 项目信息页签 -->
  531. <el-tab-pane label="项目信息" name="project_information">
  532. <el-form label-position="top" :model="projectInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  533. <el-row :gutter="20">
  534. <el-col :span="8">
  535. <div class="grid-content bg-purple">
  536. <el-form-item label="项目号">
  537. <el-input v-model="projectInformationData.projectId" readonly></el-input>
  538. </el-form-item>
  539. </div>
  540. </el-col>
  541. <el-col :span="8">
  542. <div class="grid-content bg-purple">
  543. <el-form-item label="项目名称">
  544. <el-input v-model="projectInformationData.projectName" readonly></el-input>
  545. </el-form-item>
  546. </div>
  547. </el-col>
  548. <el-col :span="8">
  549. <div class="grid-content bg-purple">
  550. <el-form-item label="项目类型">
  551. <el-input v-model="projectInformationData.projectType" readonly></el-input>
  552. </el-form-item>
  553. </div>
  554. </el-col>
  555. </el-row>
  556. <el-row :gutter="20">
  557. <el-col :span="8">
  558. <div class="grid-content bg-purple">
  559. <el-form-item label="客户来源">
  560. <el-input v-model="projectInformationData.projectSourceDesc" readonly></el-input>
  561. </el-form-item>
  562. </div>
  563. </el-col>
  564. <el-col :span="8">
  565. <div class="grid-content bg-purple">
  566. <el-form-item label="优先级">
  567. <el-input v-model="projectInformationData.priorityDesc" readonly></el-input>
  568. </el-form-item>
  569. </div>
  570. </el-col>
  571. <el-col :span="8">
  572. <div class="grid-content bg-purple">
  573. <el-form-item label="项目状态">
  574. <el-input v-model="projectInformationData.status" readonly></el-input>
  575. </el-form-item>
  576. </div>
  577. </el-col>
  578. </el-row>
  579. <el-row :gutter="20">
  580. <el-col :span="8">
  581. <div class="grid-content bg-purple">
  582. <el-form-item label="项目经理">
  583. <el-input v-model="projectInformationData.projectManagerName" readonly></el-input>
  584. </el-form-item>
  585. </div>
  586. </el-col>
  587. <el-col :span="8">
  588. <div class="grid-content bg-purple">
  589. <el-form-item label="项目负责人">
  590. <el-input v-model="projectInformationData.projectOwnerName" readonly></el-input>
  591. </el-form-item>
  592. </div>
  593. </el-col>
  594. <el-col :span="8">
  595. <div class="grid-content bg-purple">
  596. <el-form-item label="项目权限">
  597. <el-input v-model="projectInformationData.userRoleName" readonly></el-input>
  598. </el-form-item>
  599. </div>
  600. </el-col>
  601. </el-row>
  602. <el-row :gutter="20">
  603. <el-col :span="6">
  604. <div class="grid-content bg-purple">
  605. <el-form-item label="创建时间">
  606. <el-input v-model="projectInformationData.createDate" readonly></el-input>
  607. </el-form-item>
  608. </div>
  609. </el-col>
  610. <el-col :span="6">
  611. <div class="grid-content bg-purple">
  612. <el-form-item label="创建人">
  613. <el-input v-model="projectInformationData.createBy" readonly></el-input>
  614. </el-form-item>
  615. </div>
  616. </el-col>
  617. <el-col :span="6">
  618. <div class="grid-content bg-purple">
  619. <el-form-item label="更新时间">
  620. <el-input v-model="projectInformationData.updateDate" readonly></el-input>
  621. </el-form-item>
  622. </div>
  623. </el-col>
  624. <el-col :span="6">
  625. <div class="grid-content bg-purple">
  626. <el-form-item label="更新人">
  627. <el-input v-model="projectInformationData.updateBy" readonly></el-input>
  628. </el-form-item>
  629. </div>
  630. </el-col>
  631. </el-row>
  632. <el-row :gutter="20">
  633. <el-col :span="24">
  634. <div class="grid-content bg-purple">
  635. <el-form-item label="项目描述">
  636. <el-input v-model="projectInformationData.projectDesc" readonly></el-input>
  637. </el-form-item>
  638. </div>
  639. </el-col>
  640. </el-row>
  641. <el-row :gutter="20">
  642. <el-col :span="24">
  643. <div class="grid-content bg-purple">
  644. <el-form-item label="其它特殊要求">
  645. <el-input v-model="projectInformationData.remark" readonly></el-input>
  646. </el-form-item>
  647. </div>
  648. </el-col>
  649. </el-row>
  650. </el-form>
  651. </el-tab-pane>
  652. <!-- 客户信息页签 -->
  653. <el-tab-pane label="客户信息" name="customer_information">
  654. <el-form label-position="top" :model="customerInformationData" style="margin-left: 10px;margin-top: 5px;margin-right: 10px">
  655. <el-row :gutter="20">
  656. <el-col :span="8">
  657. <div class="grid-content bg-purple">
  658. <el-form-item label="客户代码">
  659. <el-input v-model="customerInformationData.customerNo" readonly></el-input>
  660. </el-form-item>
  661. </div>
  662. </el-col>
  663. <el-col :span="8">
  664. <div class="grid-content bg-purple">
  665. <el-form-item label="客户名称">
  666. <el-input v-model="customerInformationData.customerDesc" readonly></el-input>
  667. </el-form-item>
  668. </div>
  669. </el-col>
  670. <el-col :span="8">
  671. <div class="grid-content bg-purple">
  672. <el-form-item label="重要程度">
  673. <el-input v-model="customerInformationData.importantCustomer" readonly></el-input>
  674. </el-form-item>
  675. </div>
  676. </el-col>
  677. </el-row>
  678. <el-row :gutter="20">
  679. <el-col :span="8">
  680. <div class="grid-content bg-purple">
  681. <el-form-item label="客户币种">
  682. <el-input v-model="customerInformationData.customerCurrency" readonly></el-input>
  683. </el-form-item>
  684. </div>
  685. </el-col>
  686. <el-col :span="8">
  687. <div class="grid-content bg-purple">
  688. <el-form-item label="年营业额">
  689. <el-input v-model="customerInformationData.turnoverOfYear" readonly></el-input>
  690. </el-form-item>
  691. </div>
  692. </el-col>
  693. <el-col :span="8">
  694. <div class="grid-content bg-purple">
  695. <el-form-item label="年潜在投入">
  696. <el-input v-model="customerInformationData.potentialRevenueOfYear" readonly></el-input>
  697. </el-form-item>
  698. </div>
  699. </el-col>
  700. </el-row>
  701. <el-row :gutter="20">
  702. <el-col :span="8">
  703. <div class="grid-content bg-purple">
  704. <el-form-item label="客户状态">
  705. <el-input v-model="customerInformationData.customerStatus" readonly></el-input>
  706. </el-form-item>
  707. </div>
  708. </el-col>
  709. <el-col :span="8">
  710. <div class="grid-content bg-purple">
  711. <el-form-item label="行业">
  712. <el-input v-model="customerInformationData.customerIndustry" readonly></el-input>
  713. </el-form-item>
  714. </div>
  715. </el-col>
  716. <el-col :span="8">
  717. <div class="grid-content bg-purple">
  718. <el-form-item label="公司名称">
  719. <el-input v-model="customerInformationData.companyName" readonly></el-input>
  720. </el-form-item>
  721. </div>
  722. </el-col>
  723. </el-row>
  724. <el-row :gutter="20">
  725. <el-col :span="8">
  726. <div class="grid-content bg-purple">
  727. <el-form-item label="客户联系人">
  728. <el-input v-model="customerInformationData.contactName" readonly></el-input>
  729. </el-form-item>
  730. </div>
  731. </el-col>
  732. <el-col :span="8">
  733. <div class="grid-content bg-purple">
  734. <el-form-item label="联系人电话">
  735. <el-input v-model="customerInformationData.contactPhoneNumber1" readonly></el-input>
  736. </el-form-item>
  737. </div>
  738. </el-col>
  739. <el-col :span="8">
  740. <div class="grid-content bg-purple">
  741. <el-form-item label="联系人职务">
  742. <el-input v-model="customerInformationData.position" readonly></el-input>
  743. </el-form-item>
  744. </div>
  745. </el-col>
  746. </el-row>
  747. <el-row :gutter="20">
  748. <el-col :span="12">
  749. <div class="grid-content bg-purple">
  750. <el-form-item label="客户描述">
  751. <el-input v-model="customerInformationData.customerDescription" readonly></el-input>
  752. </el-form-item>
  753. </div>
  754. </el-col>
  755. </el-row>
  756. <el-row :gutter="20">
  757. <el-col :span="12">
  758. <div class="grid-content bg-purple">
  759. <el-form-item label="客户联系地址">
  760. <el-input v-model="customerInformationData.addressName" readonly></el-input>
  761. </el-form-item>
  762. </div>
  763. </el-col>
  764. <el-col :span="12">
  765. <div class="grid-content bg-purple">
  766. <el-form-item label="地址类型">
  767. <el-input v-model="customerInformationData.addressType" readonly></el-input>
  768. </el-form-item>
  769. </div>
  770. </el-col>
  771. </el-row>
  772. <el-row :gutter="20">
  773. <el-col :span="6">
  774. <div class="grid-content bg-purple">
  775. <el-form-item label="创建时间">
  776. <el-input v-model="customerInformationData.createDate" readonly></el-input>
  777. </el-form-item>
  778. </div>
  779. </el-col>
  780. <el-col :span="6">
  781. <div class="grid-content bg-purple">
  782. <el-form-item label="创建人">
  783. <el-input v-model="customerInformationData.createBy" readonly></el-input>
  784. </el-form-item>
  785. </div>
  786. </el-col>
  787. <el-col :span="6">
  788. <div class="grid-content bg-purple">
  789. <el-form-item label="更新时间">
  790. <el-input v-model="customerInformationData.updateDate" readonly></el-input>
  791. </el-form-item>
  792. </div>
  793. </el-col>
  794. <el-col :span="6">
  795. <div class="grid-content bg-purple">
  796. <el-form-item label="更新人">
  797. <el-input v-model="customerInformationData.updateBy" readonly></el-input>
  798. </el-form-item>
  799. </div>
  800. </el-col>
  801. </el-row>
  802. </el-form>
  803. </el-tab-pane>
  804. </el-tabs>
  805. <!-- chooseList模态框 -->
  806. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  807. <!-- 上传文件的modal -->
  808. <quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentData()" v-drag></quotationUploadFile>
  809. </div>
  810. </template>
  811. <script>
  812. import {
  813. quotationInformationSearch, // 询价信息列表查询
  814. quotationInformationSave, // 询价信息新增
  815. quotationInformationEdit, // 询价信息编辑
  816. quotationInformationDelete, // 询价信息删除
  817. getFileContentList, // 获取询价单附件列表
  818. quotationResultSearch, // 获取询价结果对象
  819. deleteQuotationFile, // 文件删除
  820. downLoadQuotationFile, // 文件下载
  821. saveQuotationResult, // 保存询价结果
  822. saveSubmitResult, // 保存提交结果
  823. saveCustomerResponse, // 保存客户回复
  824. getProjectPartList, // 获取产品列表
  825. checkQuotationStatus, // 检查询价进度
  826. getProjectInformation, // 获取项目信息
  827. getCustomerInformation, // 获取客户信息
  828. searchProjectInfoList,// 查询项目信息
  829. } from '@/api/quotation/quotationInformation.js'
  830. import Chooselist from '@/views/modules/common/Chooselist'
  831. import quotationUploadFile from "./quotation_upload_file"
  832. import DictDataSelect from "../sys/dict-data-select.vue";
  833. export default {
  834. components: {
  835. DictDataSelect,
  836. Chooselist,
  837. quotationUploadFile
  838. },
  839. watch: {
  840. searchData: {
  841. deep: true,
  842. handler: function (newV, oldV) {
  843. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  844. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  845. }
  846. },
  847. modalData: {
  848. deep: true,
  849. handler: function (newV, oldV) {
  850. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  851. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  852. this.modalData.quotationNo = this.modalData.quotationNo.toUpperCase()
  853. }
  854. }
  855. },
  856. data () {
  857. return {
  858. // 导出
  859. exportData: [],
  860. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  861. exportHeader: ['设备分类'],
  862. exportFooter: [],
  863. resultList: [],
  864. // ======== 行高 ========
  865. height: 200,
  866. secondHeight: 200,
  867. // ======== 分页 ========
  868. pageIndex: 1,
  869. pageSize: 50,
  870. totalPage: 0,
  871. selectedDataNum: 0,
  872. // 条件查询
  873. searchData: {
  874. site: this.$store.state.user.site,
  875. customerNo: '',
  876. customerDesc: '',
  877. quotationBatchNo:'',
  878. quotationItemNo:'',
  879. trackerName: '',
  880. testPartNo: '',
  881. partName: '',
  882. quotationStatus: '',
  883. startDate: '',
  884. endDate: '',
  885. projectId: '',
  886. projectName: '',
  887. quoterName: '',
  888. priorityLevel: '',
  889. page: 1,
  890. limit: 10
  891. },
  892. // 其它
  893. dataListLoading: false,
  894. // 选择项目弹框开关
  895. chooseProjectListFlag: false,
  896. //项目搜索条件
  897. searchProjectData:{
  898. site:this.$store.state.user.site,
  899. projectId:undefined,
  900. projectName:undefined,
  901. customerId:undefined,
  902. },
  903. // 项目集合
  904. projectList:[],
  905. // 初始页签
  906. activeTable: 'quotation_detail_information',
  907. // ======== 数据对象 ========
  908. modalData: {
  909. flag: '',
  910. title: '',
  911. site: this.$store.state.user.site,
  912. quotationNo: '',
  913. customerNo: '',
  914. customerDesc: '',
  915. projectId: '',
  916. projectName: '',
  917. tracker: '',
  918. trackerName: '',
  919. quoter: '',
  920. quoterName: '',
  921. quotationStatus: '',
  922. testPartNo: '',
  923. partName: '',
  924. priorityLevel: '一般',
  925. requiredCompletionDate: '',
  926. remark: '',
  927. technicalConsiderations: '',
  928. customerResponsiblePerson: '',
  929. customerResponsiblePersonPhone: '',
  930. nextToDo: '',
  931. actualityQuotationDate: '',
  932. quotationResultInformation: '',
  933. actualitySubmissionDate: '',
  934. submissionMethod: '',
  935. submissionRemark: '',
  936. actualityReplyDate: '',
  937. confirmResults: '',
  938. confirmBy: '',
  939. confirmInformation: '',
  940. quotationResultStatus: '',
  941. createDate: '',
  942. createBy: '',
  943. updateDate: '',
  944. updateBy: ''
  945. },
  946. quotationDetailData: {
  947. technicalConsiderations: '',
  948. customerResponsiblePerson: '',
  949. customerResponsiblePersonPhone: ''
  950. },
  951. quotationResultData: {
  952. actualityQuotationDate: '',
  953. quotationResultInformation: '',
  954. actualitySubmissionDate: '',
  955. submissionMethod: '',
  956. submissionRemark: '',
  957. confirmResults: '',
  958. actualityReplyDate: '',
  959. confirmBy: '',
  960. confirmInformation: '',
  961. quotationResultStatus: '',
  962. },
  963. enterResultData: {
  964. site: this.$store.state.user.site,
  965. quotationNo: '',
  966. actualityQuotationDate: '',
  967. quotationResultInformation: '',
  968. updateBy: this.$store.state.user.name,
  969. quotationResultStatus: '',
  970. fileContentList: []
  971. },
  972. submitResultData: {
  973. site: this.$store.state.user.site,
  974. quotationNo: '',
  975. actualitySubmissionDate: '',
  976. submissionMethod: '',
  977. submissionRemark: '',
  978. updateBy: this.$store.state.user.name,
  979. quotationResultStatus: ''
  980. },
  981. customerResponseData: {
  982. site: this.$store.state.user.site,
  983. quotationNo: '',
  984. actualityReplyDate: '',
  985. confirmResults: '',
  986. confirmBy: '',
  987. confirmInformation: '',
  988. updateBy: this.$store.state.user.name,
  989. quotationResultStatus: ''
  990. },
  991. projectPartData: {
  992. site: this.$store.state.user.site,
  993. testPartNo: '',
  994. partName: '',
  995. projectId:'',
  996. },
  997. projectInformationData: {
  998. projectId: '',
  999. projectName: '',
  1000. projectType: '',
  1001. projectSourceDesc: '',
  1002. priorityDesc: '',
  1003. status: '',
  1004. projectDesc: '',
  1005. projectManagerName: '',
  1006. projectOwnerName: '',
  1007. userRoleName: '',
  1008. remark: ''
  1009. },
  1010. customerInformationData: {
  1011. customerNo: '',
  1012. customerDesc: '',
  1013. importantCustomer: '',
  1014. customerCurrency: '',
  1015. turnoverOfYear: '',
  1016. potentialRevenueOfYear: '',
  1017. customerStatus: '',
  1018. customerIndustry: '',
  1019. companyName: '',
  1020. jobDescription: '',
  1021. customerDescription: '',
  1022. contactName: '',
  1023. contactPhoneNumber1: '',
  1024. position: '',
  1025. addressName: '',
  1026. addressType: '',
  1027. createDate: '',
  1028. createBy: '',
  1029. updateDate: '',
  1030. updateBy: ''
  1031. },
  1032. // ======== 数据列表 ========
  1033. dataList: [],
  1034. fileContentList: [],
  1035. projectPartList: [],
  1036. // ======== 列表表头 ========
  1037. columnList: [
  1038. {
  1039. userId: this.$store.state.user.name,
  1040. functionId: 102001,
  1041. serialNumber: '102001Table1QuotationNo',
  1042. tableId: '102001Table1',
  1043. tableName: '询价信息表',
  1044. columnProp: 'quotationNo',
  1045. headerAlign: 'center',
  1046. align: 'center',
  1047. columnLabel: '申请单号',
  1048. columnHidden: false,
  1049. columnImage: false,
  1050. columnSortable: false,
  1051. sortLv: 0,
  1052. status: true,
  1053. fixed: '',
  1054. columnWidth: 120
  1055. },{
  1056. userId: this.$store.state.user.name,
  1057. functionId: 102001,
  1058. serialNumber: '102001Table1QuotationBatchNo',
  1059. tableId: '102001Table1',
  1060. tableName: '询价信息表',
  1061. columnProp: 'quotationBatchNo',
  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. userId: this.$store.state.user.name,
  1074. functionId: 102001,
  1075. serialNumber: '102001Table1QuotationItemNo',
  1076. tableId: '102001Table1',
  1077. tableName: '询价信息表',
  1078. columnProp: 'quotationItemNo',
  1079. headerAlign: 'center',
  1080. align: 'right',
  1081. columnLabel: '序号',
  1082. columnHidden: false,
  1083. columnImage: false,
  1084. columnSortable: false,
  1085. sortLv: 0,
  1086. status: true,
  1087. fixed: '',
  1088. columnWidth: 60
  1089. },
  1090. {
  1091. userId: this.$store.state.user.name,
  1092. functionId: 102001,
  1093. serialNumber: '102001Table1CustomerNo',
  1094. tableId: '102001Table1',
  1095. tableName: '询价信息表',
  1096. columnProp: 'customerNo',
  1097. headerAlign: 'center',
  1098. align: 'center',
  1099. columnLabel: '客户编码',
  1100. columnHidden: false,
  1101. columnImage: false,
  1102. columnSortable: false,
  1103. sortLv: 0,
  1104. status: true,
  1105. fixed: '',
  1106. columnWidth: 100
  1107. },
  1108. {
  1109. userId: this.$store.state.user.name,
  1110. functionId: 102001,
  1111. serialNumber: '102001Table1CustomerDesc',
  1112. tableId: '102001Table1',
  1113. tableName: '询价信息表',
  1114. columnProp: 'customerDesc',
  1115. headerAlign: 'center',
  1116. align: 'left',
  1117. columnLabel: '客户名称',
  1118. columnHidden: false,
  1119. columnImage: false,
  1120. columnSortable: false,
  1121. sortLv: 0,
  1122. status: true,
  1123. fixed: '',
  1124. columnWidth: 120
  1125. },
  1126. {
  1127. userId: this.$store.state.user.name,
  1128. functionId: 102001,
  1129. serialNumber: '102001Table1ProjectId',
  1130. tableId: '102001Table1',
  1131. tableName: '询价信息表',
  1132. columnProp: 'projectId',
  1133. headerAlign: 'center',
  1134. align: 'center',
  1135. columnLabel: '项目编码',
  1136. columnHidden: false,
  1137. columnImage: false,
  1138. columnSortable: false,
  1139. sortLv: 0,
  1140. status: true,
  1141. fixed: '',
  1142. columnWidth: 120
  1143. },
  1144. {
  1145. userId: this.$store.state.user.name,
  1146. functionId: 102001,
  1147. serialNumber: '102001Table1ProjectName',
  1148. tableId: '102001Table1',
  1149. tableName: '询价信息表',
  1150. columnProp: 'projectName',
  1151. headerAlign: 'center',
  1152. align: 'left',
  1153. columnLabel: '项目名称',
  1154. columnHidden: false,
  1155. columnImage: false,
  1156. columnSortable: false,
  1157. sortLv: 0,
  1158. status: true,
  1159. fixed: '',
  1160. columnWidth: 120
  1161. },
  1162. {
  1163. userId: this.$store.state.user.name,
  1164. functionId: 102001,
  1165. serialNumber: '102001Table1TrackerName',
  1166. tableId: '102001Table1',
  1167. tableName: '询价信息表',
  1168. columnProp: 'trackerName',
  1169. headerAlign: 'center',
  1170. align: 'left',
  1171. columnLabel: '跟单员',
  1172. columnHidden: false,
  1173. columnImage: false,
  1174. columnSortable: false,
  1175. sortLv: 0,
  1176. status: true,
  1177. fixed: '',
  1178. columnWidth: 80
  1179. },
  1180. {
  1181. userId: this.$store.state.user.name,
  1182. functionId: 102001,
  1183. serialNumber: '102001Table1QuoterName',
  1184. tableId: '102001Table1',
  1185. tableName: '询价信息表',
  1186. columnProp: 'quoterName',
  1187. headerAlign: 'center',
  1188. align: 'left',
  1189. columnLabel: '报价专员',
  1190. columnHidden: false,
  1191. columnImage: false,
  1192. columnSortable: false,
  1193. sortLv: 0,
  1194. status: true,
  1195. fixed: '',
  1196. columnWidth: 80
  1197. },
  1198. {
  1199. userId: this.$store.state.user.name,
  1200. functionId: 102001,
  1201. serialNumber: '102001Table1TestPartNo',
  1202. tableId: '102001Table1',
  1203. tableName: '询价信息表',
  1204. columnProp: 'testPartNo',
  1205. headerAlign: 'center',
  1206. align: 'center',
  1207. columnLabel: '项目料号',
  1208. columnHidden: false,
  1209. columnImage: false,
  1210. columnSortable: false,
  1211. sortLv: 0,
  1212. status: true,
  1213. fixed: '',
  1214. columnWidth: 160
  1215. },
  1216. {
  1217. userId: this.$store.state.user.name,
  1218. functionId: 102001,
  1219. serialNumber: '102001Table1PartName',
  1220. tableId: '102001Table1',
  1221. tableName: '询价信息表',
  1222. columnProp: 'partName',
  1223. headerAlign: 'center',
  1224. align: 'left',
  1225. columnLabel: '物料描述',
  1226. columnHidden: false,
  1227. columnImage: false,
  1228. columnSortable: false,
  1229. sortLv: 0,
  1230. status: true,
  1231. fixed: '',
  1232. columnWidth: 100
  1233. },
  1234. {
  1235. userId: this.$store.state.user.name,
  1236. functionId: 102001,
  1237. serialNumber: '102001Table1PriorityLevel',
  1238. tableId: '102001Table1',
  1239. tableName: '询价信息表',
  1240. columnProp: 'priorityLevel',
  1241. headerAlign: 'center',
  1242. align: 'left',
  1243. columnLabel: '优先等级',
  1244. columnHidden: false,
  1245. columnImage: false,
  1246. columnSortable: false,
  1247. sortLv: 0,
  1248. status: true,
  1249. fixed: '',
  1250. columnWidth: 80
  1251. },
  1252. {
  1253. userId: this.$store.state.user.name,
  1254. functionId: 102001,
  1255. serialNumber: '102001Table1RequiredCompletionDate',
  1256. tableId: '102001Table1',
  1257. tableName: '询价信息表',
  1258. columnProp: 'requiredCompletionDate',
  1259. headerAlign: 'center',
  1260. align: 'center',
  1261. columnLabel: '要求完成日期',
  1262. columnHidden: false,
  1263. columnImage: false,
  1264. columnSortable: false,
  1265. sortLv: 0,
  1266. status: true,
  1267. fixed: '',
  1268. columnWidth: 160
  1269. },
  1270. {
  1271. userId: this.$store.state.user.name,
  1272. functionId: 102001,
  1273. serialNumber: '102001Table1quotationStatus',
  1274. tableId: '102001Table1',
  1275. tableName: '询价信息表',
  1276. columnProp: 'quotationStatus',
  1277. headerAlign: 'center',
  1278. align: 'center',
  1279. columnLabel: '状态',
  1280. columnHidden: false,
  1281. columnImage: false,
  1282. columnSortable: false,
  1283. sortLv: 0,
  1284. status: true,
  1285. fixed: '',
  1286. columnWidth: 80
  1287. },
  1288. {
  1289. userId: this.$store.state.user.name,
  1290. functionId: 102001,
  1291. serialNumber: '102001Table1CreateDate',
  1292. tableId: '102001Table1',
  1293. tableName: '询价信息表',
  1294. columnProp: 'createDate',
  1295. headerAlign: 'center',
  1296. align: 'center',
  1297. columnLabel: '创建时间',
  1298. columnHidden: false,
  1299. columnImage: false,
  1300. columnSortable: false,
  1301. sortLv: 0,
  1302. status: true,
  1303. fixed: '',
  1304. columnWidth: 160
  1305. },
  1306. {
  1307. userId: this.$store.state.user.name,
  1308. functionId: 102001,
  1309. serialNumber: '102001Table1CreateBy',
  1310. tableId: '102001Table1',
  1311. tableName: '询价信息表',
  1312. columnProp: 'createBy',
  1313. headerAlign: 'center',
  1314. align: 'left',
  1315. columnLabel: '创建人',
  1316. columnHidden: false,
  1317. columnImage: false,
  1318. columnSortable: false,
  1319. sortLv: 0,
  1320. status: true,
  1321. fixed: '',
  1322. columnWidth: 80
  1323. },
  1324. {
  1325. userId: this.$store.state.user.name,
  1326. functionId: 102001,
  1327. serialNumber: '102001Table1UpdateDate',
  1328. tableId: '102001Table1',
  1329. tableName: '询价信息表',
  1330. columnProp: 'updateDate',
  1331. headerAlign: 'center',
  1332. align: 'center',
  1333. columnLabel: '更新时间',
  1334. columnHidden: false,
  1335. columnImage: false,
  1336. columnSortable: false,
  1337. sortLv: 0,
  1338. status: true,
  1339. fixed: '',
  1340. columnWidth: 160
  1341. },
  1342. {
  1343. userId: this.$store.state.user.name,
  1344. functionId: 102001,
  1345. serialNumber: '102001Table1UpdateBy',
  1346. tableId: '102001Table1',
  1347. tableName: '询价信息表',
  1348. columnProp: 'updateBy',
  1349. headerAlign: 'center',
  1350. align: 'left',
  1351. columnLabel: '更新人',
  1352. columnHidden: false,
  1353. columnImage: false,
  1354. columnSortable: false,
  1355. sortLv: 0,
  1356. status: true,
  1357. fixed: '',
  1358. columnWidth: 80
  1359. }
  1360. ],
  1361. fileColumnList: [
  1362. {
  1363. userId: this.$store.state.user.name,
  1364. functionId: 102001,
  1365. serialNumber: '102001Table2FileName',
  1366. tableId: '102001Table2',
  1367. tableName: '文件信息表',
  1368. columnProp: 'fileName',
  1369. headerAlign: 'center',
  1370. align: 'center',
  1371. columnLabel: '文件名称',
  1372. columnHidden: false,
  1373. columnImage: false,
  1374. columnSortable: false,
  1375. sortLv: 0,
  1376. status: true,
  1377. fixed: '',
  1378. columnWidth: 140
  1379. },
  1380. {
  1381. userId: this.$store.state.user.name,
  1382. functionId: 102001,
  1383. serialNumber: '102001Table2FileRemark',
  1384. tableId: '102001Table2',
  1385. tableName: '文件信息表',
  1386. columnProp: 'fileRemark',
  1387. headerAlign: 'center',
  1388. align: 'center',
  1389. columnLabel: '备注',
  1390. columnHidden: false,
  1391. columnImage: false,
  1392. columnSortable: false,
  1393. sortLv: 0,
  1394. status: true,
  1395. fixed: '',
  1396. columnWidth: 240
  1397. },
  1398. // {
  1399. // userId: this.$store.state.user.name,
  1400. // functionId: 102001,
  1401. // serialNumber: '102001Table2OrderRef3',
  1402. // tableId: '102001Table2',
  1403. // tableName: '文件信息表',
  1404. // columnProp: 'orderRef3',
  1405. // headerAlign: 'center',
  1406. // align: 'center',
  1407. // columnLabel: '文件描述',
  1408. // columnHidden: false,
  1409. // columnImage: false,
  1410. // columnSortable: false,
  1411. // sortLv: 0,
  1412. // status: true,
  1413. // fixed: '',
  1414. // columnWidth: 120
  1415. // },
  1416. {
  1417. userId: this.$store.state.user.name,
  1418. functionId: 102001,
  1419. serialNumber: '102001Table2CreateDate',
  1420. tableId: '102001Table2',
  1421. tableName: '文件信息表',
  1422. columnProp: 'createDate',
  1423. headerAlign: 'center',
  1424. align: 'center',
  1425. columnLabel: '上传时间',
  1426. columnHidden: false,
  1427. columnImage: false,
  1428. columnSortable: false,
  1429. sortLv: 0,
  1430. status: true,
  1431. fixed: '',
  1432. columnWidth: 140
  1433. },
  1434. {
  1435. userId: this.$store.state.user.name,
  1436. functionId: 102001,
  1437. serialNumber: '102001Table2CreatedBy',
  1438. tableId: '102001Table2',
  1439. tableName: '文件信息表',
  1440. columnProp: 'createdBy',
  1441. headerAlign: 'center',
  1442. align: 'center',
  1443. columnLabel: '上传人',
  1444. columnHidden: false,
  1445. columnImage: false,
  1446. columnSortable: false,
  1447. sortLv: 0,
  1448. status: true,
  1449. fixed: '',
  1450. columnWidth: 140
  1451. }
  1452. ],
  1453. projectPartDetailList: [
  1454. {
  1455. userId: this.$store.state.user.name,
  1456. functionId: 102001,
  1457. serialNumber: '102001Table3CustomerNo',
  1458. tableId: '102001Table3',
  1459. tableName: '项目物料表',
  1460. columnProp: 'customerNo',
  1461. headerAlign: 'center',
  1462. align: 'center',
  1463. columnLabel: '客户编码',
  1464. columnHidden: false,
  1465. columnImage: false,
  1466. columnSortable: false,
  1467. sortLv: 0,
  1468. status: true,
  1469. fixed: '',
  1470. columnWidth: 100
  1471. },
  1472. {
  1473. userId: this.$store.state.user.name,
  1474. functionId: 102001,
  1475. serialNumber: '102001Table3CustomerDesc',
  1476. tableId: '102001Table3',
  1477. tableName: '项目物料表',
  1478. columnProp: 'customerDesc',
  1479. headerAlign: 'center',
  1480. align: 'center',
  1481. columnLabel: '客户名称',
  1482. columnHidden: false,
  1483. columnImage: false,
  1484. columnSortable: false,
  1485. sortLv: 0,
  1486. status: true,
  1487. fixed: '',
  1488. columnWidth: 120
  1489. },
  1490. {
  1491. userId: this.$store.state.user.name,
  1492. functionId: 102001,
  1493. serialNumber: '102001Table3ProjectName',
  1494. tableId: '102001Table3',
  1495. tableName: '项目物料表',
  1496. columnProp: 'projectId',
  1497. headerAlign: 'center',
  1498. align: 'center',
  1499. columnLabel: '项目编码',
  1500. columnHidden: false,
  1501. columnImage: false,
  1502. columnSortable: false,
  1503. sortLv: 0,
  1504. status: true,
  1505. fixed: '',
  1506. columnWidth: 100
  1507. },
  1508. {
  1509. userId: this.$store.state.user.name,
  1510. functionId: 102001,
  1511. serialNumber: '102001Table3TestPartNo',
  1512. tableId: '102001Table3',
  1513. tableName: '项目物料表',
  1514. columnProp: 'testPartNo',
  1515. headerAlign: 'center',
  1516. align: 'center',
  1517. columnLabel: '产品编码',
  1518. columnHidden: false,
  1519. columnImage: false,
  1520. columnSortable: false,
  1521. sortLv: 0,
  1522. status: true,
  1523. fixed: '',
  1524. columnWidth: 150
  1525. },
  1526. {
  1527. userId: this.$store.state.user.name,
  1528. functionId: 102001,
  1529. serialNumber: '102001Table3PartDesc',
  1530. tableId: '102001Table3',
  1531. tableName: '项目物料表',
  1532. columnProp: 'partDesc',
  1533. headerAlign: 'center',
  1534. align: 'center',
  1535. columnLabel: '产品名称',
  1536. columnHidden: false,
  1537. columnImage: false,
  1538. columnSortable: false,
  1539. sortLv: 0,
  1540. status: true,
  1541. fixed: '',
  1542. columnWidth: 120
  1543. },{
  1544. userId: this.$store.state.user.name,
  1545. functionId: 102001,
  1546. serialNumber: '102001Table3PartType',
  1547. tableId: '102001Table3',
  1548. tableName: '项目物料表',
  1549. columnProp: 'partType',
  1550. headerAlign: 'center',
  1551. align: 'center',
  1552. columnLabel: '产品类型',
  1553. columnHidden: false,
  1554. columnImage: false,
  1555. columnSortable: false,
  1556. sortLv: 0,
  1557. status: true,
  1558. fixed: '',
  1559. columnWidth: 120
  1560. }
  1561. ],
  1562. // ======== 必填规则 ========
  1563. rules: {
  1564. customerNo: [
  1565. {required: true,message: ' ',trigger: 'change'},
  1566. {required: true,message: ' ',trigger: 'blur'},
  1567. ],
  1568. customerDesc: [
  1569. {required: true,message: ' ',trigger: 'change'},
  1570. {required: true,message: ' ',trigger: 'blur'},
  1571. ],
  1572. trackerName: [
  1573. {required: true,message: ' ',trigger: 'change'},
  1574. {required: true,message: ' ',trigger: 'blur'},
  1575. ],
  1576. projectId: [
  1577. {required: true,message: ' ',trigger: 'change'},
  1578. {required: true,message: ' ',trigger: 'blur'},
  1579. ],
  1580. projectName: [
  1581. {required: true,message: ' ',trigger: 'change'},
  1582. {required: true,message: ' ',trigger: 'blur'},
  1583. ],
  1584. quoterName: [
  1585. {required: true,message: ' ',trigger: 'change'},
  1586. {required: true,message: ' ',trigger: 'blur'},
  1587. ],
  1588. partName: [
  1589. {required: true,message: ' ',trigger: 'change'},
  1590. {required: true,message: ' ',trigger: 'blur'},
  1591. ],
  1592. priorityLevel: [
  1593. {required: true,message: ' ',trigger: 'change'},
  1594. ],
  1595. requiredCompletionDate: [
  1596. {required: true,message: ' ',trigger: 'change'},
  1597. {required: true,message: ' ',trigger: 'blur'},
  1598. ]
  1599. },
  1600. enterResultRules: {
  1601. actualityQuotationDate: [
  1602. {
  1603. required: true,
  1604. message: ' ',
  1605. trigger: 'change'
  1606. }
  1607. ],
  1608. quotationResultInformation: [
  1609. {
  1610. required: true,
  1611. message: ' ',
  1612. trigger: 'change'
  1613. }
  1614. ]
  1615. },
  1616. submitResultRules: {
  1617. actualitySubmissionDate: [
  1618. {
  1619. required: true,
  1620. message: ' ',
  1621. trigger: 'change'
  1622. }
  1623. ],
  1624. submissionMethod: [
  1625. {
  1626. required: true,
  1627. message: ' ',
  1628. trigger: 'change'
  1629. }
  1630. ]
  1631. },
  1632. customerResponseRules: {
  1633. actualityReplyDate: [
  1634. {
  1635. required: true,
  1636. message: ' ',
  1637. trigger: 'change'
  1638. }
  1639. ],
  1640. confirmResults: [
  1641. {
  1642. required: true,
  1643. message: ' ',
  1644. trigger: 'change'
  1645. }
  1646. ],
  1647. confirmBy: [
  1648. {
  1649. required: true,
  1650. message: ' ',
  1651. trigger: 'change'
  1652. }
  1653. ]
  1654. },
  1655. // ======== 复选数据集 ========
  1656. quotationSelections: [],
  1657. projectPartListSelections: [],
  1658. // ======== 选中的当前行数据 ========
  1659. quotationCurrentRow: {},
  1660. // ======== 模态框开关控制 ========
  1661. modalFlag: false,
  1662. modalDisableFlag: false,
  1663. enterResultModalFlag: false,
  1664. submitResultModalFlag: false,
  1665. customerResponseModalFlag: false,
  1666. projectPartModelFlag: false
  1667. }
  1668. },
  1669. mounted () {
  1670. this.$nextTick(() => {
  1671. this.height = window.innerHeight / 2 - 240;
  1672. /*第二个表格高度的动态调整*/
  1673. this.secondHeight = window.innerHeight / 2 - 206;
  1674. })
  1675. },
  1676. created () {
  1677. this.getDataList()
  1678. },
  1679. methods: {
  1680. // ======== 分页相关方法 ========
  1681. /**
  1682. * 每页数
  1683. * @param val
  1684. */
  1685. sizeChangeHandle (val) {
  1686. this.pageSize = val
  1687. this.pageIndex = 1
  1688. this.getDataList()
  1689. },
  1690. /**
  1691. * 当前页
  1692. * @param val
  1693. */
  1694. currentChangeHandle (val) {
  1695. this.pageIndex = val
  1696. this.getDataList()
  1697. },
  1698. // ======== 复选框操作相关方法 ========
  1699. /**
  1700. * 选中一行
  1701. * @param row
  1702. */
  1703. projectPartClickRow (row) {
  1704. if (this.modalData.flag === '1'){
  1705. this.$refs.projectPartTable.toggleRowSelection(row);
  1706. this.confirmProjectPart();
  1707. }
  1708. },
  1709. /**
  1710. * 多选
  1711. * @param val
  1712. */
  1713. selectionProjectPart (val) {
  1714. this.projectPartListSelections = val
  1715. },
  1716. /**
  1717. * 获取唯一值一般都为 id
  1718. * @param row
  1719. * @returns {*}
  1720. */
  1721. getRowKeys (row) {
  1722. return row.testPartNo;
  1723. },
  1724. /**
  1725. * 未知
  1726. * @returns {boolean}
  1727. */
  1728. selectFlag () {
  1729. return true;
  1730. },
  1731. // ======== 页签切换相关方法 ========
  1732. /**
  1733. * 列表表格选择替换
  1734. * @param tab
  1735. * @param event
  1736. */
  1737. tabClick (tab, event) {
  1738. // 刷新列表数据
  1739. this.refreshCurrentTabTable()
  1740. },
  1741. /**
  1742. * 当前值发生变化的时候修改
  1743. * @param row
  1744. * @param oldRow
  1745. */
  1746. changeCurrentRow (row, oldRow) {
  1747. // 判断是否是获取焦点的事件
  1748. if (row) {
  1749. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  1750. //刷新当前页表
  1751. this.refreshCurrentTabTable()
  1752. }
  1753. },
  1754. /**
  1755. * 刷新页签的table数据
  1756. */
  1757. refreshCurrentTabTable () {
  1758. if (this.activeTable === 'quotation_result') {
  1759. this.getQuotationResult()
  1760. } else if (this.activeTable === 'project_information') {
  1761. this.getProjectInformation()
  1762. } else if (this.activeTable === 'customer_information') {
  1763. this.getCustomerInformation()
  1764. }
  1765. },
  1766. // ======== 列表数据刷新方法 ========
  1767. /**
  1768. * 获取数据列表
  1769. */
  1770. getDataList () {
  1771. this.searchData.limit = this.pageSize
  1772. this.searchData.page = this.pageIndex
  1773. quotationInformationSearch(this.searchData).then(({data}) => {
  1774. if (data.code === 0) {
  1775. this.dataList = data.page.list
  1776. this.pageIndex = data.page.currPage
  1777. this.pageSize = data.page.pageSize
  1778. this.totalPage = data.page.totalCount
  1779. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  1780. //判断是否全部存在数据
  1781. if(this.totalPage > 0){
  1782. //设置选中行
  1783. this.$refs.quotationTable.setCurrentRow(this.dataList[0])
  1784. this.refreshCurrentTabTable() //加载当前的页签的table
  1785. this.quotationClickRow(this.dataList[0])
  1786. }
  1787. }
  1788. this.dataListLoading = false
  1789. })
  1790. },
  1791. /**
  1792. * 获取询价结果列表
  1793. */
  1794. getQuotationResult () {
  1795. let tempData = {
  1796. site: this.$store.state.user.site,
  1797. quotationNo: this.quotationCurrentRow.quotationNo
  1798. }
  1799. // 询价结果对象
  1800. quotationResultSearch(tempData).then(({data}) => {
  1801. if (data && data.code === 0) {
  1802. this.quotationResultData = data.rows[0]
  1803. } else {
  1804. this.quotationResultData = {}
  1805. }
  1806. })
  1807. // 附件列表
  1808. this.getFileContentData()
  1809. },
  1810. /**
  1811. * 获取项目信息
  1812. */
  1813. getProjectInformation () {
  1814. let tempData = {
  1815. site: this.$store.state.user.site,
  1816. projectId: this.quotationCurrentRow.projectId
  1817. }
  1818. // 询价结果对象
  1819. getProjectInformation(tempData).then(({data}) => {
  1820. if (data && data.code === 0) {
  1821. this.projectInformationData = data.rows[0]
  1822. } else {
  1823. this.projectInformationData = {}
  1824. }
  1825. })
  1826. },
  1827. /**
  1828. * 获取客户信息
  1829. */
  1830. getCustomerInformation () {
  1831. let tempData = {
  1832. site: this.$store.state.user.site,
  1833. customerNo: this.quotationCurrentRow.customerNo
  1834. }
  1835. // 询价结果对象
  1836. getCustomerInformation(tempData).then(({data}) => {
  1837. if (data && data.code === 0) {
  1838. this.customerInformationData = data.rows[0]
  1839. } else {
  1840. this.customerInformationData = {}
  1841. }
  1842. })
  1843. },
  1844. // ======== 新增/编辑模态框 ========
  1845. /**
  1846. * 询价信息新增模态框
  1847. */
  1848. addModal () {
  1849. this.modalData = {
  1850. flag: '1',
  1851. title: '询价新增',
  1852. site: this.$store.state.user.site,
  1853. quotationNo: '',
  1854. customerNo: '',
  1855. customerDesc: '',
  1856. projectId: '',
  1857. projectName: '',
  1858. tracker: '',
  1859. trackerName: '',
  1860. quoter: '',
  1861. quoterName: '',
  1862. quotationStatus: '草稿',
  1863. testPartNo: '',
  1864. partName: '',
  1865. priorityLevel: '一般',
  1866. requiredCompletionDate: '',
  1867. remark: '',
  1868. technicalConsiderations: '',
  1869. customerResponsiblePerson: '',
  1870. customerResponsiblePersonPhone: '',
  1871. nextToDo: '',
  1872. actualityQuotationDate: '',
  1873. quotationResultInformation: '',
  1874. actualitySubmissionDate: '',
  1875. submissionMethod: '',
  1876. submissionRemark: '',
  1877. actualityReplyDate: '',
  1878. confirmResults: '',
  1879. confirmBy: '',
  1880. confirmInformation: '',
  1881. quotationResultStatus: 'C',
  1882. createBy: this.$store.state.user.name
  1883. }
  1884. this.modalDisableFlag = false
  1885. this.modalFlag = true
  1886. },
  1887. /**
  1888. * 询价信息编辑模态框
  1889. * @param row
  1890. */
  1891. updateModal (row) {
  1892. this.modalData = {
  1893. flag: '2',
  1894. title: '询价编辑',
  1895. site: row.site,
  1896. quotationNo: row.quotationNo,
  1897. customerNo: row.customerNo,
  1898. customerDesc: row.customerDesc,
  1899. projectId: row.projectId,
  1900. projectName: row.projectName,
  1901. tracker: row.tracker,
  1902. trackerName: row.trackerName,
  1903. quoter: row.quoter,
  1904. quoterName: row.quoterName,
  1905. quotationStatus: row.quotationStatus,
  1906. testPartNo: row.testPartNo,
  1907. partName: row.partName,
  1908. priorityLevel: row.priorityLevel,
  1909. requiredCompletionDate: row.requiredCompletionDate,
  1910. remark: row.remark,
  1911. technicalConsiderations: row.technicalConsiderations,
  1912. customerResponsiblePerson: row.customerResponsiblePerson,
  1913. customerResponsiblePersonPhone: row.customerResponsiblePersonPhone,
  1914. nextToDo: row.nextToDo,
  1915. actualityQuotationDate: row.actualityQuotationDate,
  1916. quotationResultInformation: row.quotationResultInformation,
  1917. actualitySubmissionDate: row.actualitySubmissionDate,
  1918. submissionMethod: row.submissionMethod,
  1919. submissionRemark: row.submissionRemark,
  1920. actualityReplyDate: row.actualityReplyDate,
  1921. confirmResults: row.confirmResults,
  1922. confirmBy: row.confirmBy,
  1923. confirmInformation: row.confirmInformation,
  1924. quotationResultStatus: row.quotationResultStatus,
  1925. updateBy: this.$store.state.user.name
  1926. }
  1927. this.modalDisableFlag = true
  1928. this.modalFlag = true
  1929. },
  1930. // ======== 新增/编辑/删除方法 ========
  1931. /**
  1932. * 获取产品列表
  1933. */
  1934. getProjectPartList () {
  1935. if (!this.modalData.projectId){
  1936. this.$message.warning("请选择项目编码!")
  1937. return
  1938. }
  1939. // 先清空缓存选中
  1940. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  1941. // 拿到选中的产品编号
  1942. let projectPartList = this.modalData.testPartNo.split(';')
  1943. // 获得查询
  1944. this.projectPartData.projectId = this.modalData.projectId;
  1945. // 查询所有产品
  1946. getProjectPartList(this.projectPartData).then(({data}) => {
  1947. if (data && data.code === 0) {
  1948. this.projectPartList = data.rows
  1949. this.projectPartList.forEach (val => {
  1950. // 回显选中的产品
  1951. if (projectPartList.includes(val.testPartNo)) {
  1952. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  1953. }
  1954. })
  1955. }else {
  1956. this.$alert(data.msg, '错误', {
  1957. confirmButtonText: '确定'
  1958. })
  1959. }
  1960. })
  1961. },
  1962. /**
  1963. * 确认多选产品
  1964. */
  1965. confirmProjectPart () {
  1966. if(this.projectPartListSelections.length === 0){
  1967. // 先清空缓存选中
  1968. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  1969. // 拿到选中的产品编号
  1970. this.modalData.testPartNo = ''
  1971. this.modalData.partName = ''
  1972. return
  1973. }
  1974. this.modalData.testPartNo = ''
  1975. this.modalData.partName = ''
  1976. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  1977. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  1978. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  1979. }
  1980. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  1981. this.modalData.partName = this.modalData.partName.substring(1)
  1982. },
  1983. /**
  1984. * 客户信息新增/编辑
  1985. */
  1986. saveData () {
  1987. this.$refs.saveDataForm.validate((valid)=>{
  1988. if (!valid){
  1989. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  1990. this.$message.warning('请选择客户编码!')
  1991. return
  1992. }
  1993. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  1994. this.$message.warning('请选择客户名称!')
  1995. return
  1996. }
  1997. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  1998. this.$message.warning('请选择跟单员编码!')
  1999. return
  2000. }
  2001. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  2002. this.$message.warning('请选择跟单员名称!')
  2003. return
  2004. }
  2005. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2006. this.$message.warning('请选择项目编码!')
  2007. return
  2008. }
  2009. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2010. this.$message.warning('请选择项目名称!')
  2011. return
  2012. }
  2013. if (this.modalData.quoter === '' || this.modalData.quoter == null) {
  2014. this.$message.warning('请选择询价专员编码!')
  2015. return
  2016. }
  2017. if (this.modalData.quoterName === '' || this.modalData.quoterName == null) {
  2018. this.$message.warning('请选择询价专员名称!')
  2019. return
  2020. }
  2021. if (this.projectPartListSelections.length === 0){
  2022. this.$message.warning('请选择询价专员名称!')
  2023. return
  2024. }
  2025. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  2026. this.$message.warning('请选择产品编码!')
  2027. return
  2028. }
  2029. if (this.modalData.partName === '' || this.modalData.partName == null) {
  2030. this.$message.warning('请选择产品名称!')
  2031. return
  2032. }
  2033. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2034. this.$message.warning('请选择优先等级!')
  2035. return
  2036. }
  2037. if (this.modalData.requiredCompletionDate === '' || this.modalData.requiredCompletionDate == null) {
  2038. this.$message.warning('请输入要求完成日期!')
  2039. return
  2040. }
  2041. }else {
  2042. this.confirmProjectPart();
  2043. if (this.modalData.flag === '1') {
  2044. quotationInformationSave(this.modalData).then(({data}) => {
  2045. if (data && data.code === 0) {
  2046. this.getDataList()
  2047. this.modalFlag = false
  2048. this.$message({
  2049. message: '操作成功',
  2050. type: 'success',
  2051. duration: 1500,
  2052. onClose: () => {}
  2053. })
  2054. } else {
  2055. this.$alert(data.msg, '错误', {
  2056. confirmButtonText: '确定'
  2057. })
  2058. }
  2059. })
  2060. } else {
  2061. quotationInformationEdit(this.modalData).then(({data}) => {
  2062. if (data && data.code === 0) {
  2063. this.getDataList()
  2064. this.modalFlag = false
  2065. this.$message({
  2066. message: '操作成功',
  2067. type: 'success',
  2068. duration: 1500,
  2069. onClose: () => {}
  2070. })
  2071. } else {
  2072. this.$alert(data.msg, '错误', {
  2073. confirmButtonText: '确定'
  2074. })
  2075. }
  2076. })
  2077. }
  2078. }
  2079. })
  2080. },
  2081. /**
  2082. * 询价信息删除
  2083. */
  2084. delModal () {
  2085. if(this.quotationSelections.length === 0){
  2086. this.$message.warning('请勾选要删除的询价信息!')
  2087. return
  2088. }
  2089. this.$confirm(`是否删除这 `+ this.quotationSelections.length +` 条询价信息?`, '提示', {
  2090. confirmButtonText: '确定',
  2091. cancelButtonText: '取消',
  2092. type: 'warning'
  2093. }).then(() => {
  2094. let tempData = {
  2095. informationList: this.quotationSelections
  2096. }
  2097. quotationInformationDelete(tempData).then(({data}) => {
  2098. if (data && data.code === 0) {
  2099. this.getDataList()
  2100. this.quotationSelections = []
  2101. this.$message({
  2102. message: '操作成功',
  2103. type: 'success',
  2104. duration: 1500,
  2105. onClose: () => {
  2106. }
  2107. })
  2108. } else {
  2109. this.$alert(data.msg, '错误', {
  2110. confirmButtonText: '确定'
  2111. })
  2112. }
  2113. })
  2114. }).catch(() => {
  2115. })
  2116. },
  2117. // ======== 列表操作方法 ========
  2118. /**
  2119. * 单机选中询价信息
  2120. * @param row
  2121. */
  2122. quotationClickRow (row) {
  2123. this.$refs.quotationTable.toggleRowSelection(row)
  2124. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  2125. this.quotationDetailData = row
  2126. },
  2127. /**
  2128. * 复选询价信息
  2129. * @param val
  2130. */
  2131. selectionQuotation (val) {
  2132. this.quotationSelections = val
  2133. this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
  2134. },
  2135. // ======== 询价结果相关方法 ========
  2136. /**
  2137. * 封装录入方法
  2138. */
  2139. packQuotationResultModal () {
  2140. // 重置对象
  2141. this.enterResultData = {
  2142. site: this.$store.state.user.site,
  2143. quotationNo: '',
  2144. actualityQuotationDate: '',
  2145. quotationResultInformation: '',
  2146. quotationResultStatus: 'E',
  2147. fileContentList: [],
  2148. updateBy: this.$store.state.user.name
  2149. }
  2150. // 获得选中的询价号
  2151. // if (this.quotationSelections.length > 0) {
  2152. // this.quotationSelections.forEach(val => {
  2153. // this.enterResultData.quotationNo += ';' + val.quotationNo
  2154. // })
  2155. // this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
  2156. // } else {
  2157. // this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2158. // }
  2159. this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2160. // // 获得这些询价号的全部附件
  2161. // this.getFileContentList()
  2162. this.enterResultModalFlag = true
  2163. },
  2164. /**
  2165. * 录入询价结果
  2166. */
  2167. quotationResultModal () {
  2168. // // 如果有选中询价单
  2169. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2170. // let tempData = {
  2171. // currentStatus: 'C',
  2172. // informationList: this.quotationSelections,
  2173. // }
  2174. // // 检查询价单状态
  2175. // checkQuotationStatus(tempData).then(({data}) => {
  2176. // if (data && data.code === 0) {
  2177. // if (data.flag === 1) { // 状态一致
  2178. // this.packQuotationResultModal()
  2179. // } else { // 状态不同
  2180. // this.$message.warning('选中的询价单进度有误,请确认!')
  2181. // }
  2182. // } else {
  2183. // this.$alert(data.msg, '错误', {
  2184. // confirmButtonText: '确定'
  2185. // })
  2186. // }
  2187. // })
  2188. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  2189. // this.packQuotationResultModal()
  2190. // }
  2191. this.packQuotationResultModal()
  2192. },
  2193. /**
  2194. * 保存询价结果
  2195. */
  2196. saveQuotationResult () {
  2197. if (this.enterResultData.actualityQuotationDate === '' || this.enterResultData.actualityQuotationDate == null) {
  2198. this.$message.warning('请选择实际询价日期!')
  2199. return
  2200. }
  2201. if (this.enterResultData.quotationResultInformation === '' || this.enterResultData.quotationResultInformation == null) {
  2202. this.$message.warning('请填写询价结果信息!')
  2203. return
  2204. }
  2205. // if (this.quotationSelections.length > 1) {
  2206. // this.$confirm(`是否录入多条询价结果?`, '提示', {
  2207. // confirmButtonText: '确定',
  2208. // cancelButtonText: '取消',
  2209. // type: 'warning'
  2210. // }).then(() => {
  2211. // saveQuotationResult(this.enterResultData).then(({data}) => {
  2212. // if (data && data.code === 0) {
  2213. // this.getDataList()
  2214. // this.enterResultModalFlag = false
  2215. // this.$message({
  2216. // message: '操作成功',
  2217. // type: 'success',
  2218. // duration: 1500,
  2219. // onClose: () => {
  2220. // }
  2221. // })
  2222. // } else {
  2223. // this.$alert(data.msg, '错误', {
  2224. // confirmButtonText: '确定'
  2225. // })
  2226. // }
  2227. // })
  2228. // }).catch(() => {
  2229. // })
  2230. // } else {
  2231. saveQuotationResult(this.enterResultData).then(({data}) => {
  2232. if (data && data.code === 0) {
  2233. this.getDataList()
  2234. this.enterResultModalFlag = false
  2235. this.$message({
  2236. message: '操作成功',
  2237. type: 'success',
  2238. duration: 1500,
  2239. onClose: () => {}
  2240. })
  2241. } else {
  2242. this.$alert(data.msg, '错误', {
  2243. confirmButtonText: '确定'
  2244. })
  2245. }
  2246. })
  2247. // }
  2248. },
  2249. /**
  2250. * 封装提交方法
  2251. */
  2252. packSubmitQuotationModal () {
  2253. this.submitResultData = {
  2254. site: this.$store.state.user.site,
  2255. quotationNo: '',
  2256. actualitySubmissionDate: '',
  2257. submissionMethod: '',
  2258. submissionRemark: '',
  2259. quotationResultStatus: 'S',
  2260. updateBy: this.$store.state.user.name
  2261. }
  2262. // 获得选中的询价号
  2263. // if (this.quotationSelections.length > 0) {
  2264. // this.quotationSelections.forEach(val => {
  2265. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2266. // })
  2267. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2268. // } else {
  2269. // this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2270. // }
  2271. this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2272. this.submitResultModalFlag = true
  2273. },
  2274. /**
  2275. * 提交客户询价
  2276. */
  2277. submitQuotationModal () {
  2278. // // 如果有选中询价单
  2279. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2280. // let tempData = {
  2281. // currentStatus: 'E',
  2282. // informationList: this.quotationSelections,
  2283. // }
  2284. // // 检查询价单状态
  2285. // checkQuotationStatus(tempData).then(({data}) => {
  2286. // if (data && data.code === 0) {
  2287. // if (data.flag === 1) { // 状态一致
  2288. // this.packSubmitQuotationModal()
  2289. // } else { // 状态不同
  2290. // this.$message.warning('选中的询价单进度有误,请确认!')
  2291. // }
  2292. // } else {
  2293. // this.$alert(data.msg, '错误', {
  2294. // confirmButtonText: '确定'
  2295. // })
  2296. // }
  2297. // })
  2298. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  2299. // this.packSubmitQuotationModal()
  2300. // }
  2301. this.packSubmitQuotationModal()
  2302. },
  2303. /**
  2304. * 保存提交结果
  2305. */
  2306. saveSubmitResult () {
  2307. if (this.submitResultData.actualitySubmissionDate === '' || this.submitResultData.actualitySubmissionDate == null) {
  2308. this.$message.warning('请选择实际提交客户日期!')
  2309. return
  2310. }
  2311. if (this.submitResultData.submissionMethod === '' || this.submitResultData.submissionMethod == null) {
  2312. this.$message.warning('请选择提交方式!')
  2313. return
  2314. }
  2315. // if (this.quotationSelections.length > 1) {
  2316. // this.$confirm(`是否提交多条客户询价?`, '提示', {
  2317. // confirmButtonText: '确定',
  2318. // cancelButtonText: '取消',
  2319. // type: 'warning'
  2320. // }).then(() => {
  2321. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2322. // if (data && data.code === 0) {
  2323. // this.getDataList()
  2324. // this.submitResultModalFlag = false
  2325. // this.$message({
  2326. // message: '操作成功',
  2327. // type: 'success',
  2328. // duration: 1500,
  2329. // onClose: () => {
  2330. // }
  2331. // })
  2332. // } else {
  2333. // this.$alert(data.msg, '错误', {
  2334. // confirmButtonText: '确定'
  2335. // })
  2336. // }
  2337. // })
  2338. // }).catch(() => {
  2339. // })
  2340. // } else {
  2341. saveSubmitResult(this.submitResultData).then(({data}) => {
  2342. if (data && data.code === 0) {
  2343. this.getDataList()
  2344. this.submitResultModalFlag = false
  2345. this.$message({
  2346. message: '操作成功',
  2347. type: 'success',
  2348. duration: 1500,
  2349. onClose: () => {}
  2350. })
  2351. } else {
  2352. this.$alert(data.msg, '错误', {
  2353. confirmButtonText: '确定'
  2354. })
  2355. }
  2356. })
  2357. // }
  2358. },
  2359. /**
  2360. * 封装回复方法
  2361. */
  2362. packCustomerResponseModal () {
  2363. this.customerResponseData = {
  2364. site: this.$store.state.user.site,
  2365. quotationNo: '',
  2366. actualityReplyDate: '',
  2367. confirmResults: '',
  2368. confirmBy: '',
  2369. confirmInformation: '',
  2370. quotationResultStatus: 'R',
  2371. updateBy: this.$store.state.user.name
  2372. }
  2373. // 获得选中的询价号
  2374. // if (this.quotationSelections.length > 0) {
  2375. // this.quotationSelections.forEach(val => {
  2376. // this.customerResponseData.quotationNo += ';' + val.quotationNo
  2377. // })
  2378. // this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
  2379. // } else {
  2380. // this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
  2381. // }
  2382. this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
  2383. this.customerResponseModalFlag = true
  2384. },
  2385. /**
  2386. * 客户回复
  2387. */
  2388. customerResponseModal () {
  2389. // // 如果有选中询价单
  2390. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2391. // let tempData = {
  2392. // currentStatus: 'S',
  2393. // informationList: this.quotationSelections,
  2394. // }
  2395. // // 检查询价单状态
  2396. // checkQuotationStatus(tempData).then(({data}) => {
  2397. // if (data && data.code === 0) {
  2398. // if (data.flag === 1) { // 状态一致
  2399. // this.packCustomerResponseModal()
  2400. // } else { // 状态不同
  2401. // this.$message.warning('选中的询价单进度有误,请确认!')
  2402. // }
  2403. // } else {
  2404. // this.$alert(data.msg, '错误', {
  2405. // confirmButtonText: '确定'
  2406. // })
  2407. // }
  2408. // })
  2409. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  2410. // this.packCustomerResponseModal()
  2411. // }
  2412. this.packCustomerResponseModal()
  2413. },
  2414. /**
  2415. * 保存客户回复
  2416. */
  2417. saveCustomerResponse () {
  2418. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2419. this.$message.warning('请选择实际回复日期!')
  2420. return
  2421. }
  2422. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  2423. this.$message.warning('请选择客户确认结果!')
  2424. return
  2425. }
  2426. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  2427. this.$message.warning('请填写客户确认人!')
  2428. return
  2429. }
  2430. // if (this.quotationSelections.length > 1) {
  2431. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  2432. // confirmButtonText: '确定',
  2433. // cancelButtonText: '取消',
  2434. // type: 'warning'
  2435. // }).then(() => {
  2436. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2437. // if (data && data.code === 0) {
  2438. // this.getDataList()
  2439. // this.customerResponseModalFlag = false
  2440. // this.$message({
  2441. // message: '操作成功',
  2442. // type: 'success',
  2443. // duration: 1500,
  2444. // onClose: () => {
  2445. // }
  2446. // })
  2447. // } else {
  2448. // this.$alert(data.msg, '错误', {
  2449. // confirmButtonText: '确定'
  2450. // })
  2451. // }
  2452. // })
  2453. // }).catch(() => {
  2454. // })
  2455. // } else {
  2456. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2457. if (data && data.code === 0) {
  2458. this.getDataList()
  2459. this.customerResponseModalFlag = false
  2460. this.$message({
  2461. message: '操作成功',
  2462. type: 'success',
  2463. duration: 1500,
  2464. onClose: () => {}
  2465. })
  2466. } else {
  2467. this.$alert(data.msg, '错误', {
  2468. confirmButtonText: '确定'
  2469. })
  2470. }
  2471. })
  2472. // }
  2473. },
  2474. // ======== 询价单附件的相关方法 ========
  2475. /**
  2476. * 获取询价单附件列表
  2477. */
  2478. getFileContentData () {
  2479. let currentData = {
  2480. orderRef1: this.$store.state.user.site,
  2481. orderRef2: this.quotationCurrentRow.quotationNo
  2482. }
  2483. getFileContentList(currentData).then(({data}) => {
  2484. if (data && data.code === 0) {
  2485. this.fileContentList = data.rows
  2486. } else {
  2487. this.fileContentList = []
  2488. }
  2489. })
  2490. },
  2491. // /**
  2492. // * 获得这些询价号的全部附件
  2493. // */
  2494. // getFileContentList () {
  2495. // let currentData = {
  2496. // orderRef1: this.$store.state.user.site,
  2497. // orderRef2: this.enterResultData.quotationNo
  2498. // }
  2499. // getFileContentList(currentData).then(({data}) => {
  2500. // if (data && data.code === 0) {
  2501. // this.enterResultData.fileContentList = data.rows
  2502. // } else {
  2503. // this.enterResultData.fileContentList = []
  2504. // }
  2505. // })
  2506. // },
  2507. /**
  2508. * 上传文件
  2509. */
  2510. uploadFile () {
  2511. let currentData = {
  2512. titleCon: '询价附件上传',
  2513. site: this.$store.state.user.site,
  2514. createBy: this.$store.state.user.name,
  2515. quotationNo: this.enterResultData.quotationNo,
  2516. fileRemark: '',
  2517. folder: 'quotationFile',
  2518. // options: []
  2519. }
  2520. // let num = 0
  2521. // let arr = this.enterResultData.quotationNo.split(';')
  2522. // arr.forEach(val => {
  2523. // currentData.options.push({key: num++, value: val})
  2524. // })
  2525. //打开组件 去做新增业务
  2526. this.$nextTick(() => {
  2527. this.$refs.quotationUploadFile.init(currentData);
  2528. })
  2529. },
  2530. /**
  2531. * 文件删除
  2532. * @param row
  2533. */
  2534. deleteFile (row) {
  2535. this.$confirm('确定要删除此文件?', '提示', {
  2536. confirmButtonText: '确定',
  2537. cancelButtonText: '取消',
  2538. type: 'warning'
  2539. }).then(() => {
  2540. deleteQuotationFile(row).then(({data}) => {
  2541. if (data && data.code === 0) {
  2542. this.getFileContentList();
  2543. this.$message({
  2544. message: '操作成功',
  2545. type: 'success',
  2546. duration: 1500,
  2547. onClose: () => {}
  2548. })
  2549. } else {
  2550. this.$alert(data.msg, '错误', {
  2551. confirmButtonText: '确定'
  2552. })
  2553. }
  2554. })
  2555. }).catch(() => {
  2556. })
  2557. },
  2558. /**
  2559. * 文件下载
  2560. * @param row
  2561. */
  2562. downloadFile (row) {
  2563. downLoadQuotationFile(row).then(({data}) => {
  2564. // 不限制文件下载类型
  2565. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  2566. // 下载文件名称
  2567. const fileName = row.fileName
  2568. // a标签下载
  2569. const linkNode = document.createElement('a')
  2570. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  2571. linkNode.style.display = 'none'
  2572. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  2573. document.body.appendChild(linkNode)
  2574. linkNode.click() // 模拟在按钮上的一次鼠标单击
  2575. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  2576. document.body.removeChild(linkNode)
  2577. })
  2578. },
  2579. // ======== chooseList相关方法 ========
  2580. /**
  2581. * 获取基础数据列表S
  2582. * @param val
  2583. * @param type
  2584. */
  2585. getBaseList (val, type) {
  2586. this.tagNo = val
  2587. this.tagNo1 = type
  2588. this.$nextTick(() => {
  2589. let strVal = ''
  2590. if (val === 102) {
  2591. if(type === 1) {
  2592. strVal = this.modalData.customerNo
  2593. }
  2594. }
  2595. if (val === 103) {
  2596. if(type === 1) {
  2597. strVal = this.modalData.tracker
  2598. }
  2599. if(type === 2) {
  2600. strVal = this.modalData.quoter
  2601. }
  2602. }
  2603. if (val === 104) {
  2604. if(type === 1) {
  2605. strVal = this.modalData.projectId
  2606. }
  2607. }
  2608. this.$refs.baseList.init(val, strVal)
  2609. })
  2610. },
  2611. /**
  2612. * 列表方法的回调
  2613. * @param val
  2614. */
  2615. getBaseData (val) {
  2616. if (this.tagNo === 102) {
  2617. if(this.tagNo1 === 1) {
  2618. if (val.Customer_no === this.modalData.customerNo) {
  2619. return
  2620. }
  2621. this.modalData.customerNo = val.Customer_no
  2622. this.modalData.customerDesc = val.Customer_desc
  2623. this.modalData.projectId = ''
  2624. this.modalData.projectName = ''
  2625. this.projectPartList = [];
  2626. }
  2627. }
  2628. if (this.tagNo === 103) {
  2629. if(this.tagNo1 === 1) {
  2630. this.modalData.tracker = val.username
  2631. this.modalData.trackerName = val.user_display
  2632. }
  2633. if(this.tagNo1 === 2) {
  2634. this.modalData.quoter = val.username
  2635. this.modalData.quoterName = val.user_display
  2636. }
  2637. }
  2638. if (this.tagNo === 104) {
  2639. if(this.tagNo1 === 1) {
  2640. this.modalData.projectId = val.project_id
  2641. this.modalData.projectName = val.project_name
  2642. }
  2643. }
  2644. },
  2645. // ======== 导出相关方法 ========
  2646. /**
  2647. * 导出excel
  2648. */
  2649. async createExportData () {
  2650. this.searchData.limit = -1
  2651. this.searchData.page = 1
  2652. await quotationInformationSearch(this.searchData).then(({data}) => {
  2653. this.resultList = data.page.list
  2654. })
  2655. return this.resultList
  2656. },
  2657. startDownload () {
  2658. },
  2659. finishDownload () {
  2660. },
  2661. fields () {
  2662. let json = '{'
  2663. this.columnList.forEach((item, index) => {
  2664. if (index == this.columnList.length - 1) {
  2665. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2666. } else {
  2667. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2668. }
  2669. })
  2670. json += '}'
  2671. let s = eval('(' + json + ')')
  2672. return s
  2673. },
  2674. // 保存弹框关闭事件
  2675. closeSaveDataDialog(){
  2676. this.$refs.saveDataForm.resetFields(); // 先清空缓存选中
  2677. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2678. // 拿到选中的产品编号
  2679. this.modalData.testPartNo = ''
  2680. this.modalData.partName = ''
  2681. this.projectPartData= {
  2682. site: this.$store.state.user.site,
  2683. testPartNo: '',
  2684. partName: '',
  2685. projectId:'',
  2686. }
  2687. },
  2688. // 保存弹框打开事件
  2689. openSaveDataDialog(){
  2690. if (!this.modalData.projectId){
  2691. this.projectPartList = [];
  2692. return
  2693. }
  2694. this.getProjectPartList()
  2695. },
  2696. // 查询searchProjectInfoList
  2697. searchProjectInfoList(){
  2698. this.projectList = [];
  2699. this.searchProjectData.customerId = this.modalData.customerNo
  2700. searchProjectInfoList(this.searchProjectData).then(({data})=>{
  2701. if (data && data.code === 0) {
  2702. this.projectList = data.rows
  2703. } else {
  2704. this.projectList = []
  2705. }
  2706. }).catch((error)=>{
  2707. this.$message.error('查询项目信息失败')
  2708. })
  2709. },
  2710. closeProjectInfoDialog(){
  2711. this.$refs.closeProjectInfoForm.resetFields();
  2712. this.searchProjectData={
  2713. site:this.$store.state.user.site,
  2714. projectId:undefined,
  2715. projectName:undefined,
  2716. customerId:undefined,
  2717. }
  2718. },
  2719. projectClickRow(row){
  2720. this.modalData.projectId = row.projectId
  2721. this.modalData.projectName = row.projectName
  2722. this.getProjectPartList()
  2723. this.chooseProjectListFlag = false
  2724. },
  2725. checkSelectable(row,index){
  2726. if (this.modalData.flag === '1'){
  2727. return true
  2728. }else {
  2729. return false
  2730. }
  2731. },
  2732. }
  2733. }
  2734. </script>
  2735. <style scoped>
  2736. /deep/ .customer-tab .el-tabs__content {
  2737. padding: 0px !important;
  2738. height: 459px;
  2739. }
  2740. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{
  2741. background-color: #17B3A3;
  2742. border-color: #17B3A3;
  2743. }
  2744. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after{
  2745. border-color: #FFF
  2746. }
  2747. </style>