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.

2605 lines
96 KiB

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