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.

3315 lines
118 KiB

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