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.

2412 lines
87 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="enterResultData.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;" type="border-card" @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" style="">
  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. <el-checkbox type="checkbox" v-if="quotationResultData.quotationResultStatus === 'R'" checked onclick="return false"/>
  465. <el-checkbox 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. </el-tabs>
  606. <!-- chooseList模态框 -->
  607. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  608. <!-- 上传文件的modal -->
  609. <quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentList()" v-drag></quotationUploadFile>
  610. </div>
  611. </template>
  612. <script>
  613. import {
  614. quotationInformationSearch, // 报价信息列表查询
  615. quotationInformationSave, // 报价信息新增
  616. quotationInformationEdit, // 报价信息编辑
  617. quotationInformationDelete, // 报价信息删除
  618. getFileContentList, // 获取报价单附件列表
  619. quotationResultSearch, // 获取报价结果对象
  620. deleteQuotationFile, // 文件删除
  621. downLoadQuotationFile, // 文件下载
  622. saveQuotationResult, // 保存报价结果
  623. saveSubmitResult, // 保存提交结果
  624. saveCustomerResponse, // 保存客户回复
  625. getProjectPartList, // 获取产品列表
  626. checkQuotationStatus, // 检查报价进度
  627. getProjectInformation // 获取项目信息
  628. } from '@/api/quotation/quotationInformation.js'
  629. import Chooselist from '@/views/modules/common/Chooselist'
  630. import quotationUploadFile from "./quotation_upload_file"
  631. export default {
  632. components: {
  633. Chooselist,
  634. quotationUploadFile
  635. },
  636. watch: {
  637. searchData: {
  638. deep: true,
  639. handler: function (newV, oldV) {
  640. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  641. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  642. }
  643. },
  644. modalData: {
  645. deep: true,
  646. handler: function (newV, oldV) {
  647. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  648. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  649. this.modalData.quotationNo = this.modalData.quotationNo.toUpperCase()
  650. }
  651. }
  652. },
  653. data () {
  654. return {
  655. // 导出
  656. exportData: [],
  657. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  658. exportHeader: ['设备分类'],
  659. exportFooter: [],
  660. resultList: [],
  661. // ======== 行高 ========
  662. height: 200,
  663. secondHeight: 200,
  664. // ======== 分页 ========
  665. pageIndex: 1,
  666. pageSize: 50,
  667. totalPage: 0,
  668. selectedDataNum: 0,
  669. // 条件查询
  670. searchData: {
  671. site: this.$store.state.user.site,
  672. customerNo: '',
  673. customerDesc: '',
  674. trackerName: '',
  675. testPartNo: '',
  676. partName: '',
  677. quotationStatus: '',
  678. startDate: '',
  679. endDate: '',
  680. projectId: '',
  681. projectName: '',
  682. quoterName: '',
  683. priorityLevel: '',
  684. page: 1,
  685. limit: 10
  686. },
  687. // 其它
  688. dataListLoading: false,
  689. // 初始页签
  690. activeTable: 'quotation_detail_information',
  691. // ======== 数据对象 ========
  692. modalData: {
  693. flag: '',
  694. title: '',
  695. site: this.$store.state.user.site,
  696. quotationNo: '',
  697. customerNo: '',
  698. customerDesc: '',
  699. projectId: '',
  700. projectName: '',
  701. tracker: '',
  702. trackerName: '',
  703. quoter: '',
  704. quoterName: '',
  705. quotationStatus: '',
  706. testPartNo: '',
  707. partName: '',
  708. priorityLevel: '',
  709. requiredCompletionDate: '',
  710. remark: '',
  711. technicalConsiderations: '',
  712. customerResponsiblePerson: '',
  713. customerResponsiblePersonPhone: '',
  714. nextToDo: '',
  715. actualityQuotationDate: '',
  716. quotationResultInformation: '',
  717. actualitySubmissionDate: '',
  718. submissionMethod: '',
  719. submissionRemark: '',
  720. actualityReplyDate: '',
  721. confirmResults: '',
  722. confirmBy: '',
  723. confirmInformation: '',
  724. quotationResultStatus: '',
  725. createDate: '',
  726. createBy: '',
  727. updateDate: '',
  728. updateBy: ''
  729. },
  730. quotationDetailData: {
  731. technicalConsiderations: '',
  732. customerResponsiblePerson: '',
  733. customerResponsiblePersonPhone: ''
  734. },
  735. quotationResultData: {
  736. actualityQuotationDate: '',
  737. quotationResultInformation: '',
  738. actualitySubmissionDate: '',
  739. submissionMethod: '',
  740. submissionRemark: '',
  741. confirmResults: '',
  742. actualityReplyDate: '',
  743. confirmBy: '',
  744. confirmInformation: '',
  745. quotationResultStatus: '',
  746. },
  747. enterResultData: {
  748. site: this.$store.state.user.site,
  749. quotationNo: '',
  750. actualityQuotationDate: '',
  751. quotationResultInformation: '',
  752. updateBy: this.$store.state.user.name,
  753. quotationResultStatus: '',
  754. fileContentList: []
  755. },
  756. submitResultData: {
  757. site: this.$store.state.user.site,
  758. quotationNo: '',
  759. actualitySubmissionDate: '',
  760. submissionMethod: '',
  761. submissionRemark: '',
  762. updateBy: this.$store.state.user.name,
  763. quotationResultStatus: ''
  764. },
  765. customerResponseData: {
  766. site: this.$store.state.user.site,
  767. quotationNo: '',
  768. actualityReplyDate: '',
  769. confirmResults: '',
  770. confirmBy: '',
  771. confirmInformation: '',
  772. updateBy: this.$store.state.user.name,
  773. quotationResultStatus: ''
  774. },
  775. projectPartData: {
  776. site: this.$store.state.user.site,
  777. testPartNo: '',
  778. partName: ''
  779. },
  780. projectInformationData: {
  781. projectId: '',
  782. projectName: '',
  783. projectType: '',
  784. projectSourceDesc: '',
  785. priorityDesc: '',
  786. status: '',
  787. projectDesc: '',
  788. projectManagerName: '',
  789. projectOwnerName: '',
  790. userRoleName: '',
  791. remark: ''
  792. },
  793. // ======== 数据列表 ========
  794. dataList: [],
  795. fileContentList: [],
  796. projectPartList: [],
  797. // ======== 列表表头 ========
  798. columnList: [
  799. {
  800. userId: this.$store.state.user.name,
  801. functionId: 102001,
  802. serialNumber: '102001Table1QuotationNo',
  803. tableId: '102001Table1',
  804. tableName: '报价信息表',
  805. columnProp: 'quotationNo',
  806. headerAlign: 'center',
  807. align: 'center',
  808. columnLabel: '申请单号',
  809. columnHidden: false,
  810. columnImage: false,
  811. columnSortable: false,
  812. sortLv: 0,
  813. status: true,
  814. fixed: '',
  815. columnWidth: 120
  816. },
  817. {
  818. userId: this.$store.state.user.name,
  819. functionId: 102001,
  820. serialNumber: '102001Table1CustomerNo',
  821. tableId: '102001Table1',
  822. tableName: '报价信息表',
  823. columnProp: 'customerNo',
  824. headerAlign: 'center',
  825. align: 'center',
  826. columnLabel: '客户编码',
  827. columnHidden: false,
  828. columnImage: false,
  829. columnSortable: false,
  830. sortLv: 0,
  831. status: true,
  832. fixed: '',
  833. columnWidth: 100
  834. },
  835. {
  836. userId: this.$store.state.user.name,
  837. functionId: 102001,
  838. serialNumber: '102001Table1CustomerDesc',
  839. tableId: '102001Table1',
  840. tableName: '报价信息表',
  841. columnProp: 'customerDesc',
  842. headerAlign: 'center',
  843. align: 'center',
  844. columnLabel: '客户名称',
  845. columnHidden: false,
  846. columnImage: false,
  847. columnSortable: false,
  848. sortLv: 0,
  849. status: true,
  850. fixed: '',
  851. columnWidth: 120
  852. },
  853. {
  854. userId: this.$store.state.user.name,
  855. functionId: 102001,
  856. serialNumber: '102001Table1ProjectId',
  857. tableId: '102001Table1',
  858. tableName: '报价信息表',
  859. columnProp: 'projectId',
  860. headerAlign: 'center',
  861. align: 'center',
  862. columnLabel: '项目编码',
  863. columnHidden: false,
  864. columnImage: false,
  865. columnSortable: false,
  866. sortLv: 0,
  867. status: true,
  868. fixed: '',
  869. columnWidth: 100
  870. },
  871. {
  872. userId: this.$store.state.user.name,
  873. functionId: 102001,
  874. serialNumber: '102001Table1ProjectName',
  875. tableId: '102001Table1',
  876. tableName: '报价信息表',
  877. columnProp: 'projectName',
  878. headerAlign: 'center',
  879. align: 'center',
  880. columnLabel: '项目名称',
  881. columnHidden: false,
  882. columnImage: false,
  883. columnSortable: false,
  884. sortLv: 0,
  885. status: true,
  886. fixed: '',
  887. columnWidth: 120
  888. },
  889. {
  890. userId: this.$store.state.user.name,
  891. functionId: 102001,
  892. serialNumber: '102001Table1TrackerName',
  893. tableId: '102001Table1',
  894. tableName: '报价信息表',
  895. columnProp: 'trackerName',
  896. headerAlign: 'center',
  897. align: 'center',
  898. columnLabel: '跟单员',
  899. columnHidden: false,
  900. columnImage: false,
  901. columnSortable: false,
  902. sortLv: 0,
  903. status: true,
  904. fixed: '',
  905. columnWidth: 80
  906. },
  907. {
  908. userId: this.$store.state.user.name,
  909. functionId: 102001,
  910. serialNumber: '102001Table1QuoterName',
  911. tableId: '102001Table1',
  912. tableName: '报价信息表',
  913. columnProp: 'quoterName',
  914. headerAlign: 'center',
  915. align: 'center',
  916. columnLabel: '报价专员',
  917. columnHidden: false,
  918. columnImage: false,
  919. columnSortable: false,
  920. sortLv: 0,
  921. status: true,
  922. fixed: '',
  923. columnWidth: 80
  924. },
  925. {
  926. userId: this.$store.state.user.name,
  927. functionId: 102001,
  928. serialNumber: '102001Table1TestPartNo',
  929. tableId: '102001Table1',
  930. tableName: '报价信息表',
  931. columnProp: 'testPartNo',
  932. headerAlign: 'center',
  933. align: 'center',
  934. columnLabel: '产品编码',
  935. columnHidden: false,
  936. columnImage: false,
  937. columnSortable: false,
  938. sortLv: 0,
  939. status: true,
  940. fixed: '',
  941. columnWidth: 100
  942. },
  943. {
  944. userId: this.$store.state.user.name,
  945. functionId: 102001,
  946. serialNumber: '102001Table1PriorityLevel',
  947. tableId: '102001Table1',
  948. tableName: '报价信息表',
  949. columnProp: 'priorityLevel',
  950. headerAlign: 'center',
  951. align: 'center',
  952. columnLabel: '优先等级',
  953. columnHidden: false,
  954. columnImage: false,
  955. columnSortable: false,
  956. sortLv: 0,
  957. status: true,
  958. fixed: '',
  959. columnWidth: 80
  960. },
  961. {
  962. userId: this.$store.state.user.name,
  963. functionId: 102001,
  964. serialNumber: '102001Table1RequiredCompletionDate',
  965. tableId: '102001Table1',
  966. tableName: '报价信息表',
  967. columnProp: 'requiredCompletionDate',
  968. headerAlign: 'center',
  969. align: 'center',
  970. columnLabel: '要求完成日期',
  971. columnHidden: false,
  972. columnImage: false,
  973. columnSortable: false,
  974. sortLv: 0,
  975. status: true,
  976. fixed: '',
  977. columnWidth: 160
  978. },
  979. {
  980. userId: this.$store.state.user.name,
  981. functionId: 102001,
  982. serialNumber: '102001Table1quotationStatus',
  983. tableId: '102001Table1',
  984. tableName: '报价信息表',
  985. columnProp: 'quotationStatus',
  986. headerAlign: 'center',
  987. align: 'center',
  988. columnLabel: '状态',
  989. columnHidden: false,
  990. columnImage: false,
  991. columnSortable: false,
  992. sortLv: 0,
  993. status: true,
  994. fixed: '',
  995. columnWidth: 80
  996. },
  997. {
  998. userId: this.$store.state.user.name,
  999. functionId: 102001,
  1000. serialNumber: '102001Table1CreateDate',
  1001. tableId: '102001Table1',
  1002. tableName: '报价信息表',
  1003. columnProp: 'createDate',
  1004. headerAlign: 'center',
  1005. align: 'center',
  1006. columnLabel: '创建时间',
  1007. columnHidden: false,
  1008. columnImage: false,
  1009. columnSortable: false,
  1010. sortLv: 0,
  1011. status: true,
  1012. fixed: '',
  1013. columnWidth: 160
  1014. },
  1015. {
  1016. userId: this.$store.state.user.name,
  1017. functionId: 102001,
  1018. serialNumber: '102001Table1CreateBy',
  1019. tableId: '102001Table1',
  1020. tableName: '报价信息表',
  1021. columnProp: 'createBy',
  1022. headerAlign: 'center',
  1023. align: 'center',
  1024. columnLabel: '创建人',
  1025. columnHidden: false,
  1026. columnImage: false,
  1027. columnSortable: false,
  1028. sortLv: 0,
  1029. status: true,
  1030. fixed: '',
  1031. columnWidth: 80
  1032. },
  1033. {
  1034. userId: this.$store.state.user.name,
  1035. functionId: 102001,
  1036. serialNumber: '102001Table1UpdateDate',
  1037. tableId: '102001Table1',
  1038. tableName: '报价信息表',
  1039. columnProp: 'updateDate',
  1040. headerAlign: 'center',
  1041. align: 'center',
  1042. columnLabel: '更新时间',
  1043. columnHidden: false,
  1044. columnImage: false,
  1045. columnSortable: false,
  1046. sortLv: 0,
  1047. status: true,
  1048. fixed: '',
  1049. columnWidth: 160
  1050. },
  1051. {
  1052. userId: this.$store.state.user.name,
  1053. functionId: 102001,
  1054. serialNumber: '102001Table1UpdateBy',
  1055. tableId: '102001Table1',
  1056. tableName: '报价信息表',
  1057. columnProp: 'updateBy',
  1058. headerAlign: 'center',
  1059. align: 'center',
  1060. columnLabel: '更新人',
  1061. columnHidden: false,
  1062. columnImage: false,
  1063. columnSortable: false,
  1064. sortLv: 0,
  1065. status: true,
  1066. fixed: '',
  1067. columnWidth: 80
  1068. }
  1069. ],
  1070. fileColumnList: [
  1071. {
  1072. userId: this.$store.state.user.name,
  1073. functionId: 102001,
  1074. serialNumber: '102001Table2FileName',
  1075. tableId: '102001Table2',
  1076. tableName: '文件信息表',
  1077. columnProp: 'fileName',
  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: 140
  1088. },
  1089. {
  1090. userId: this.$store.state.user.name,
  1091. functionId: 102001,
  1092. serialNumber: '102001Table2FileRemark',
  1093. tableId: '102001Table2',
  1094. tableName: '文件信息表',
  1095. columnProp: 'fileRemark',
  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: 240
  1106. },
  1107. // {
  1108. // userId: this.$store.state.user.name,
  1109. // functionId: 102001,
  1110. // serialNumber: '102001Table2OrderRef3',
  1111. // tableId: '102001Table2',
  1112. // tableName: '文件信息表',
  1113. // columnProp: 'orderRef3',
  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: 120
  1124. // },
  1125. {
  1126. userId: this.$store.state.user.name,
  1127. functionId: 102001,
  1128. serialNumber: '102001Table2CreateDate',
  1129. tableId: '102001Table2',
  1130. tableName: '文件信息表',
  1131. columnProp: 'createDate',
  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: 140
  1142. },
  1143. {
  1144. userId: this.$store.state.user.name,
  1145. functionId: 102001,
  1146. serialNumber: '102001Table2CreatedBy',
  1147. tableId: '102001Table2',
  1148. tableName: '文件信息表',
  1149. columnProp: 'createdBy',
  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: 140
  1160. }
  1161. ],
  1162. projectPartDetailList: [
  1163. {
  1164. userId: this.$store.state.user.name,
  1165. functionId: 102001,
  1166. serialNumber: '102001Table3CustomerNo',
  1167. tableId: '102001Table3',
  1168. tableName: '项目物料表',
  1169. columnProp: 'customerNo',
  1170. headerAlign: 'center',
  1171. align: 'center',
  1172. columnLabel: '客户编码',
  1173. columnHidden: false,
  1174. columnImage: false,
  1175. columnSortable: false,
  1176. sortLv: 0,
  1177. status: true,
  1178. fixed: '',
  1179. columnWidth: 100
  1180. },
  1181. {
  1182. userId: this.$store.state.user.name,
  1183. functionId: 102001,
  1184. serialNumber: '102001Table3CustomerDesc',
  1185. tableId: '102001Table3',
  1186. tableName: '项目物料表',
  1187. columnProp: 'customerDesc',
  1188. headerAlign: 'center',
  1189. align: 'center',
  1190. columnLabel: '客户名称',
  1191. columnHidden: false,
  1192. columnImage: false,
  1193. columnSortable: false,
  1194. sortLv: 0,
  1195. status: true,
  1196. fixed: '',
  1197. columnWidth: 120
  1198. },
  1199. {
  1200. userId: this.$store.state.user.name,
  1201. functionId: 102001,
  1202. serialNumber: '102001Table3ProjectName',
  1203. tableId: '102001Table3',
  1204. tableName: '项目物料表',
  1205. columnProp: 'projectId',
  1206. headerAlign: 'center',
  1207. align: 'center',
  1208. columnLabel: '项目编码',
  1209. columnHidden: false,
  1210. columnImage: false,
  1211. columnSortable: false,
  1212. sortLv: 0,
  1213. status: true,
  1214. fixed: '',
  1215. columnWidth: 100
  1216. },
  1217. {
  1218. userId: this.$store.state.user.name,
  1219. functionId: 102001,
  1220. serialNumber: '102001Table3ProjectId',
  1221. tableId: '102001Table3',
  1222. tableName: '项目物料表',
  1223. columnProp: 'projectName',
  1224. headerAlign: 'center',
  1225. align: 'center',
  1226. columnLabel: '项目名称',
  1227. columnHidden: false,
  1228. columnImage: false,
  1229. columnSortable: false,
  1230. sortLv: 0,
  1231. status: true,
  1232. fixed: '',
  1233. columnWidth: 120
  1234. },
  1235. {
  1236. userId: this.$store.state.user.name,
  1237. functionId: 102001,
  1238. serialNumber: '102001Table3TestPartNo',
  1239. tableId: '102001Table3',
  1240. tableName: '项目物料表',
  1241. columnProp: 'testPartNo',
  1242. headerAlign: 'center',
  1243. align: 'center',
  1244. columnLabel: '产品编码',
  1245. columnHidden: false,
  1246. columnImage: false,
  1247. columnSortable: false,
  1248. sortLv: 0,
  1249. status: true,
  1250. fixed: '',
  1251. columnWidth: 150
  1252. },
  1253. {
  1254. userId: this.$store.state.user.name,
  1255. functionId: 102001,
  1256. serialNumber: '102001Table3PartName',
  1257. tableId: '102001Table3',
  1258. tableName: '项目物料表',
  1259. columnProp: 'partName',
  1260. headerAlign: 'center',
  1261. align: 'center',
  1262. columnLabel: '产品名称',
  1263. columnHidden: false,
  1264. columnImage: false,
  1265. columnSortable: false,
  1266. sortLv: 0,
  1267. status: true,
  1268. fixed: '',
  1269. columnWidth: 120
  1270. }
  1271. ],
  1272. // ======== 必填规则 ========
  1273. rules: {
  1274. customerDesc: [
  1275. {
  1276. required: true,
  1277. message: ' ',
  1278. trigger: 'change'
  1279. }
  1280. ],
  1281. trackerName: [
  1282. {
  1283. required: true,
  1284. message: ' ',
  1285. trigger: 'change'
  1286. }
  1287. ],
  1288. projectName: [
  1289. {
  1290. required: true,
  1291. message: ' ',
  1292. trigger: 'change'
  1293. }
  1294. ],
  1295. quoterName: [
  1296. {
  1297. required: true,
  1298. message: ' ',
  1299. trigger: 'change'
  1300. }
  1301. ],
  1302. partName: [
  1303. {
  1304. required: true,
  1305. message: ' ',
  1306. trigger: 'change'
  1307. }
  1308. ],
  1309. priorityLevel: [
  1310. {
  1311. required: true,
  1312. message: ' ',
  1313. trigger: 'change'
  1314. }
  1315. ],
  1316. requiredCompletionDate: [
  1317. {
  1318. required: true,
  1319. message: ' ',
  1320. trigger: 'change'
  1321. }
  1322. ]
  1323. },
  1324. enterResultRules: {
  1325. actualityQuotationDate: [
  1326. {
  1327. required: true,
  1328. message: ' ',
  1329. trigger: 'change'
  1330. }
  1331. ],
  1332. quotationResultInformation: [
  1333. {
  1334. required: true,
  1335. message: ' ',
  1336. trigger: 'change'
  1337. }
  1338. ]
  1339. },
  1340. submitResultRules: {
  1341. actualitySubmissionDate: [
  1342. {
  1343. required: true,
  1344. message: ' ',
  1345. trigger: 'change'
  1346. }
  1347. ],
  1348. submissionMethod: [
  1349. {
  1350. required: true,
  1351. message: ' ',
  1352. trigger: 'change'
  1353. }
  1354. ]
  1355. },
  1356. customerResponseRules: {
  1357. actualityReplyDate: [
  1358. {
  1359. required: true,
  1360. message: ' ',
  1361. trigger: 'change'
  1362. }
  1363. ],
  1364. confirmResults: [
  1365. {
  1366. required: true,
  1367. message: ' ',
  1368. trigger: 'change'
  1369. }
  1370. ],
  1371. confirmBy: [
  1372. {
  1373. required: true,
  1374. message: ' ',
  1375. trigger: 'change'
  1376. }
  1377. ]
  1378. },
  1379. // ======== 复选数据集 ========
  1380. quotationSelections: [],
  1381. projectPartListSelections: [],
  1382. // ======== 选中的当前行数据 ========
  1383. quotationCurrentRow: {},
  1384. // ======== 模态框开关控制 ========
  1385. modalFlag: false,
  1386. modalDisableFlag: false,
  1387. enterResultModalFlag: false,
  1388. submitResultModalFlag: false,
  1389. customerResponseModalFlag: false,
  1390. projectPartModelFlag: false
  1391. }
  1392. },
  1393. mounted () {
  1394. this.$nextTick(() => {
  1395. this.height = window.innerHeight / 2 - 240;
  1396. /*第二个表格高度的动态调整*/
  1397. this.secondHeight = window.innerHeight / 2 - 206;
  1398. })
  1399. },
  1400. created () {
  1401. this.getDataList()
  1402. },
  1403. methods: {
  1404. // ======== 分页相关方法 ========
  1405. /**
  1406. * 每页数
  1407. * @param val
  1408. */
  1409. sizeChangeHandle (val) {
  1410. this.pageSize = val
  1411. this.pageIndex = 1
  1412. this.getDataList()
  1413. },
  1414. /**
  1415. * 当前页
  1416. * @param val
  1417. */
  1418. currentChangeHandle (val) {
  1419. this.pageIndex = val
  1420. this.getDataList()
  1421. },
  1422. // ======== 复选框操作相关方法 ========
  1423. /**
  1424. * 选中一行
  1425. * @param row
  1426. */
  1427. projectPartClickRow (row) {
  1428. this.$refs.projectPartTable.toggleRowSelection(row);
  1429. },
  1430. /**
  1431. * 多选
  1432. * @param val
  1433. */
  1434. selectionProjectPart (val) {
  1435. this.projectPartListSelections = val
  1436. },
  1437. /**
  1438. * 获取唯一值一般都为 id
  1439. * @param row
  1440. * @returns {*}
  1441. */
  1442. getRowKeys (row) {
  1443. return row.testPartNo;
  1444. },
  1445. /**
  1446. * 未知
  1447. * @returns {boolean}
  1448. */
  1449. selectFlag () {
  1450. return true;
  1451. },
  1452. // ======== 页签切换相关方法 ========
  1453. /**
  1454. * 列表表格选择替换
  1455. * @param tab
  1456. * @param event
  1457. */
  1458. tabClick (tab, event) {
  1459. // 刷新列表数据
  1460. this.refreshCurrentTabTable()
  1461. },
  1462. /**
  1463. * 当前值发生变化的时候修改
  1464. * @param row
  1465. * @param oldRow
  1466. */
  1467. changeCurrentRow (row, oldRow) {
  1468. // 判断是否是获取焦点的事件
  1469. if (row) {
  1470. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  1471. //刷新当前页表
  1472. this.refreshCurrentTabTable()
  1473. }
  1474. },
  1475. /**
  1476. * 刷新页签的table数据
  1477. */
  1478. refreshCurrentTabTable () {
  1479. if (this.activeTable === 'quotation_result') {
  1480. this.getQuotationResult()
  1481. } else if (this.activeTable === 'project_information') {
  1482. this.getProjectInformation()
  1483. }
  1484. },
  1485. // ======== 列表数据刷新方法 ========
  1486. /**
  1487. * 获取数据列表
  1488. */
  1489. getDataList () {
  1490. this.searchData.limit = this.pageSize
  1491. this.searchData.page = this.pageIndex
  1492. quotationInformationSearch(this.searchData).then(({data}) => {
  1493. if (data.code === 0) {
  1494. this.dataList = data.page.list
  1495. this.pageIndex = data.page.currPage
  1496. this.pageSize = data.page.pageSize
  1497. this.totalPage = data.page.totalCount
  1498. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  1499. //判断是否全部存在数据
  1500. if(this.totalPage > 0){
  1501. //设置选中行
  1502. this.$refs.quotationTable.setCurrentRow(this.dataList[0])
  1503. this.refreshCurrentTabTable() //加载当前的页签的table
  1504. this.quotationClickRow(this.dataList[0])
  1505. }
  1506. }
  1507. this.dataListLoading = false
  1508. })
  1509. },
  1510. /**
  1511. * 获取报价结果列表
  1512. */
  1513. getQuotationResult () {
  1514. let tempData = {
  1515. site: this.$store.state.user.site,
  1516. quotationNo: this.quotationCurrentRow.quotationNo
  1517. }
  1518. // 报价结果对象
  1519. quotationResultSearch(tempData).then(({data}) => {
  1520. if (data && data.code === 0) {
  1521. this.quotationResultData = data.rows[0]
  1522. } else {
  1523. this.quotationResultData = {}
  1524. }
  1525. })
  1526. // 附件列表
  1527. this.getFileContentData()
  1528. },
  1529. /**
  1530. * 获取项目信息
  1531. */
  1532. getProjectInformation () {
  1533. let tempData = {
  1534. site: this.$store.state.user.site,
  1535. projectId: this.quotationCurrentRow.projectId
  1536. }
  1537. // 报价结果对象
  1538. getProjectInformation(tempData).then(({data}) => {
  1539. if (data && data.code === 0) {
  1540. this.projectInformationData = data.rows[0]
  1541. } else {
  1542. this.projectInformationData = {}
  1543. }
  1544. })
  1545. },
  1546. // ======== 新增/编辑模态框 ========
  1547. /**
  1548. * 报价信息新增模态框
  1549. */
  1550. addModal () {
  1551. this.modalData = {
  1552. flag: '1',
  1553. title: '报价新增',
  1554. site: this.$store.state.user.site,
  1555. quotationNo: '',
  1556. customerNo: '',
  1557. customerDesc: '',
  1558. projectId: '',
  1559. projectName: '',
  1560. tracker: '',
  1561. trackerName: '',
  1562. quoter: '',
  1563. quoterName: '',
  1564. quotationStatus: '草稿',
  1565. testPartNo: '',
  1566. partName: '',
  1567. priorityLevel: '',
  1568. requiredCompletionDate: '',
  1569. remark: '',
  1570. technicalConsiderations: '',
  1571. customerResponsiblePerson: '',
  1572. customerResponsiblePersonPhone: '',
  1573. nextToDo: '',
  1574. actualityQuotationDate: '',
  1575. quotationResultInformation: '',
  1576. actualitySubmissionDate: '',
  1577. submissionMethod: '',
  1578. submissionRemark: '',
  1579. actualityReplyDate: '',
  1580. confirmResults: '',
  1581. confirmBy: '',
  1582. confirmInformation: '',
  1583. quotationResultStatus: 'C',
  1584. createBy: this.$store.state.user.name
  1585. }
  1586. this.modalDisableFlag = false
  1587. this.modalFlag = true
  1588. },
  1589. /**
  1590. * 报价信息编辑模态框
  1591. * @param row
  1592. */
  1593. updateModal (row) {
  1594. this.modalData = {
  1595. flag: '2',
  1596. title: '报价编辑',
  1597. site: row.site,
  1598. quotationNo: row.quotationNo,
  1599. customerNo: row.customerNo,
  1600. customerDesc: row.customerDesc,
  1601. projectId: row.projectId,
  1602. projectName: row.projectName,
  1603. tracker: row.tracker,
  1604. trackerName: row.trackerName,
  1605. quoter: row.quoter,
  1606. quoterName: row.quoterName,
  1607. quotationStatus: row.quotationStatus,
  1608. testPartNo: row.testPartNo,
  1609. partName: row.partName,
  1610. priorityLevel: row.priorityLevel,
  1611. requiredCompletionDate: row.requiredCompletionDate,
  1612. remark: row.remark,
  1613. technicalConsiderations: row.technicalConsiderations,
  1614. customerResponsiblePerson: row.customerResponsiblePerson,
  1615. customerResponsiblePersonPhone: row.customerResponsiblePersonPhone,
  1616. nextToDo: row.nextToDo,
  1617. actualityQuotationDate: row.actualityQuotationDate,
  1618. quotationResultInformation: row.quotationResultInformation,
  1619. actualitySubmissionDate: row.actualitySubmissionDate,
  1620. submissionMethod: row.submissionMethod,
  1621. submissionRemark: row.submissionRemark,
  1622. actualityReplyDate: row.actualityReplyDate,
  1623. confirmResults: row.confirmResults,
  1624. confirmBy: row.confirmBy,
  1625. confirmInformation: row.confirmInformation,
  1626. quotationResultStatus: row.quotationResultStatus,
  1627. updateBy: this.$store.state.user.name
  1628. }
  1629. this.modalDisableFlag = true
  1630. this.modalFlag = true
  1631. },
  1632. // ======== 新增/编辑/删除方法 ========
  1633. /**
  1634. * 获取产品列表
  1635. */
  1636. getProjectPartList () {
  1637. // 先清空缓存选中
  1638. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  1639. // 拿到选中的产品编号
  1640. let projectPartList = this.modalData.testPartNo.split(';')
  1641. // 查询所有产品
  1642. getProjectPartList(this.projectPartData).then(({data}) => {
  1643. if (data && data.code === 0) {
  1644. this.projectPartList = data.rows
  1645. this.projectPartList.forEach (val => {
  1646. // 回显选中的产品
  1647. if (projectPartList.includes(val.testPartNo)) {
  1648. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  1649. }
  1650. })
  1651. this.projectPartModelFlag = true
  1652. }else {
  1653. this.$alert(data.msg, '错误', {
  1654. confirmButtonText: '确定'
  1655. })
  1656. }
  1657. })
  1658. },
  1659. /**
  1660. * 确认多选产品
  1661. */
  1662. confirmProjectPart () {
  1663. if(this.projectPartListSelections.length === 0){
  1664. this.$message.warning('请勾选产品!')
  1665. return
  1666. }
  1667. this.modalData.testPartNo = ''
  1668. this.modalData.partName = ''
  1669. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  1670. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  1671. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  1672. }
  1673. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  1674. this.modalData.partName = this.modalData.partName.substring(1)
  1675. this.projectPartModelFlag = false
  1676. },
  1677. /**
  1678. * 客户信息新增/编辑
  1679. */
  1680. saveData () {
  1681. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  1682. this.$message.warning('请选择客户编码!')
  1683. return
  1684. }
  1685. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  1686. this.$message.warning('请选择客户名称!')
  1687. return
  1688. }
  1689. if (this.modalData.tracker === '' || this.modalData.tracker == null) {
  1690. this.$message.warning('请选择跟单员编码!')
  1691. return
  1692. }
  1693. if (this.modalData.trackerName === '' || this.modalData.trackerName == null) {
  1694. this.$message.warning('请选择跟单员名称!')
  1695. return
  1696. }
  1697. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  1698. this.$message.warning('请选择项目编码!')
  1699. return
  1700. }
  1701. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  1702. this.$message.warning('请选择项目名称!')
  1703. return
  1704. }
  1705. if (this.modalData.quoter === '' || this.modalData.quoter == null) {
  1706. this.$message.warning('请选择报价专员编码!')
  1707. return
  1708. }
  1709. if (this.modalData.quoterName === '' || this.modalData.quoterName == null) {
  1710. this.$message.warning('请选择报价专员名称!')
  1711. return
  1712. }
  1713. if (this.modalData.testPartNo === '' || this.modalData.testPartNo == null) {
  1714. this.$message.warning('请选择产品编码!')
  1715. return
  1716. }
  1717. if (this.modalData.partName === '' || this.modalData.partName == null) {
  1718. this.$message.warning('请选择产品名称!')
  1719. return
  1720. }
  1721. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  1722. this.$message.warning('请选择优先等级!')
  1723. return
  1724. }
  1725. if (this.modalData.requiredCompletionDate === '' || this.modalData.requiredCompletionDate == null) {
  1726. this.$message.warning('请输入要求完成日期!')
  1727. return
  1728. }
  1729. if (this.modalData.flag === '1') {
  1730. quotationInformationSave(this.modalData).then(({data}) => {
  1731. if (data && data.code === 0) {
  1732. this.getDataList()
  1733. this.modalFlag = false
  1734. this.$message({
  1735. message: '操作成功',
  1736. type: 'success',
  1737. duration: 1500,
  1738. onClose: () => {}
  1739. })
  1740. } else {
  1741. this.$alert(data.msg, '错误', {
  1742. confirmButtonText: '确定'
  1743. })
  1744. }
  1745. })
  1746. } else {
  1747. quotationInformationEdit(this.modalData).then(({data}) => {
  1748. if (data && data.code === 0) {
  1749. this.getDataList()
  1750. this.modalFlag = false
  1751. this.$message({
  1752. message: '操作成功',
  1753. type: 'success',
  1754. duration: 1500,
  1755. onClose: () => {}
  1756. })
  1757. } else {
  1758. this.$alert(data.msg, '错误', {
  1759. confirmButtonText: '确定'
  1760. })
  1761. }
  1762. })
  1763. }
  1764. },
  1765. /**
  1766. * 报价信息删除
  1767. */
  1768. delModal () {
  1769. if(this.quotationSelections.length === 0){
  1770. this.$message.warning('请勾选要删除的报价信息!')
  1771. return
  1772. }
  1773. this.$confirm(`是否删除这 `+ this.quotationSelections.length +` 条报价信息?`, '提示', {
  1774. confirmButtonText: '确定',
  1775. cancelButtonText: '取消',
  1776. type: 'warning'
  1777. }).then(() => {
  1778. let tempData = {
  1779. informationList: this.quotationSelections
  1780. }
  1781. quotationInformationDelete(tempData).then(({data}) => {
  1782. if (data && data.code === 0) {
  1783. this.getDataList()
  1784. this.quotationSelections = []
  1785. this.$message({
  1786. message: '操作成功',
  1787. type: 'success',
  1788. duration: 1500,
  1789. onClose: () => {
  1790. }
  1791. })
  1792. } else {
  1793. this.$alert(data.msg, '错误', {
  1794. confirmButtonText: '确定'
  1795. })
  1796. }
  1797. })
  1798. }).catch(() => {
  1799. })
  1800. },
  1801. // ======== 列表操作方法 ========
  1802. /**
  1803. * 单机选中报价信息
  1804. * @param row
  1805. */
  1806. quotationClickRow (row) {
  1807. // this.$refs.quotationTable.toggleRowSelection(row)
  1808. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  1809. this.quotationDetailData = row
  1810. },
  1811. /**
  1812. * 复选报价信息
  1813. * @param val
  1814. */
  1815. selectionQuotation (val) {
  1816. this.quotationSelections = val
  1817. this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
  1818. },
  1819. // ======== 报价结果相关方法 ========
  1820. /**
  1821. * 封装录入方法
  1822. */
  1823. packQuotationResultModal () {
  1824. // 重置对象
  1825. this.enterResultData = {
  1826. site: this.$store.state.user.site,
  1827. quotationNo: '',
  1828. actualityQuotationDate: '',
  1829. quotationResultInformation: '',
  1830. quotationResultStatus: 'E',
  1831. fileContentList: [],
  1832. updateBy: this.$store.state.user.name
  1833. }
  1834. // 获得选中的报价号
  1835. if (this.quotationSelections.length > 0) {
  1836. this.quotationSelections.forEach(val => {
  1837. this.enterResultData.quotationNo += ';' + val.quotationNo
  1838. })
  1839. this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
  1840. } else {
  1841. this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
  1842. }
  1843. // 获得这些报价号的全部附件
  1844. this.getFileContentList()
  1845. this.enterResultModalFlag = true
  1846. },
  1847. /**
  1848. * 录入报价结果
  1849. */
  1850. quotationResultModal () {
  1851. // 如果有选中报价单
  1852. if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  1853. let tempData = {
  1854. currentStatus: 'C',
  1855. informationList: this.quotationSelections,
  1856. }
  1857. // 检查报价单状态
  1858. checkQuotationStatus(tempData).then(({data}) => {
  1859. if (data && data.code === 0) {
  1860. if (data.flag === 1) { // 状态一致
  1861. this.packQuotationResultModal()
  1862. } else { // 状态不同
  1863. this.$message.warning('选中的报价单进度有误,请确认!')
  1864. }
  1865. } else {
  1866. this.$alert(data.msg, '错误', {
  1867. confirmButtonText: '确定'
  1868. })
  1869. }
  1870. })
  1871. } else { // 没有选中报价单,则根据当前点击行报价单操作
  1872. this.packQuotationResultModal()
  1873. }
  1874. },
  1875. /**
  1876. * 保存报价结果
  1877. */
  1878. saveQuotationResult () {
  1879. if (this.enterResultData.actualityQuotationDate === '' || this.enterResultData.actualityQuotationDate == null) {
  1880. this.$message.warning('请选择实际报价日期!')
  1881. return
  1882. }
  1883. if (this.enterResultData.quotationResultInformation === '' || this.enterResultData.quotationResultInformation == null) {
  1884. this.$message.warning('请填写报价结果信息!')
  1885. return
  1886. }
  1887. if (this.quotationSelections.length > 1) {
  1888. this.$confirm(`是否录入多条报价结果?`, '提示', {
  1889. confirmButtonText: '确定',
  1890. cancelButtonText: '取消',
  1891. type: 'warning'
  1892. }).then(() => {
  1893. saveQuotationResult(this.enterResultData).then(({data}) => {
  1894. if (data && data.code === 0) {
  1895. this.getDataList()
  1896. this.enterResultModalFlag = false
  1897. this.$message({
  1898. message: '操作成功',
  1899. type: 'success',
  1900. duration: 1500,
  1901. onClose: () => {
  1902. }
  1903. })
  1904. } else {
  1905. this.$alert(data.msg, '错误', {
  1906. confirmButtonText: '确定'
  1907. })
  1908. }
  1909. })
  1910. }).catch(() => {
  1911. })
  1912. } else {
  1913. saveQuotationResult(this.enterResultData).then(({data}) => {
  1914. if (data && data.code === 0) {
  1915. this.getDataList()
  1916. this.enterResultModalFlag = false
  1917. this.$message({
  1918. message: '操作成功',
  1919. type: 'success',
  1920. duration: 1500,
  1921. onClose: () => {
  1922. }
  1923. })
  1924. } else {
  1925. this.$alert(data.msg, '错误', {
  1926. confirmButtonText: '确定'
  1927. })
  1928. }
  1929. })
  1930. }
  1931. },
  1932. /**
  1933. * 封装提交方法
  1934. */
  1935. packSubmitQuotationModal () {
  1936. this.submitResultData = {
  1937. site: this.$store.state.user.site,
  1938. quotationNo: '',
  1939. actualityQuotationDate: '',
  1940. quotationResultInformation: '',
  1941. quotationResultStatus: 'S',
  1942. updateBy: this.$store.state.user.name
  1943. }
  1944. // 获得选中的报价号
  1945. if (this.quotationSelections.length > 0) {
  1946. this.quotationSelections.forEach(val => {
  1947. this.submitResultData.quotationNo += ';' + val.quotationNo
  1948. })
  1949. this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  1950. } else {
  1951. this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
  1952. }
  1953. this.submitResultModalFlag = true
  1954. },
  1955. /**
  1956. * 提交客户报价
  1957. */
  1958. submitQuotationModal () {
  1959. // 如果有选中报价单
  1960. if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  1961. let tempData = {
  1962. currentStatus: 'E',
  1963. informationList: this.quotationSelections,
  1964. }
  1965. // 检查报价单状态
  1966. checkQuotationStatus(tempData).then(({data}) => {
  1967. if (data && data.code === 0) {
  1968. if (data.flag === 1) { // 状态一致
  1969. this.packSubmitQuotationModal()
  1970. } else { // 状态不同
  1971. this.$message.warning('选中的报价单进度有误,请确认!')
  1972. }
  1973. } else {
  1974. this.$alert(data.msg, '错误', {
  1975. confirmButtonText: '确定'
  1976. })
  1977. }
  1978. })
  1979. } else { // 没有选中报价单,则根据当前点击行报价单操作
  1980. this.packSubmitQuotationModal()
  1981. }
  1982. },
  1983. /**
  1984. * 保存提交结果
  1985. */
  1986. saveSubmitResult () {
  1987. if (this.submitResultData.actualitySubmissionDate === '' || this.submitResultData.actualitySubmissionDate == null) {
  1988. this.$message.warning('请选择实际提交客户日期!')
  1989. return
  1990. }
  1991. if (this.submitResultData.submissionMethod === '' || this.submitResultData.submissionMethod == null) {
  1992. this.$message.warning('请选择提交方式!')
  1993. return
  1994. }
  1995. if (this.quotationSelections.length > 1) {
  1996. this.$confirm(`是否提交多条客户报价?`, '提示', {
  1997. confirmButtonText: '确定',
  1998. cancelButtonText: '取消',
  1999. type: 'warning'
  2000. }).then(() => {
  2001. saveSubmitResult(this.submitResultData).then(({data}) => {
  2002. if (data && data.code === 0) {
  2003. this.getDataList()
  2004. this.submitResultModalFlag = false
  2005. this.$message({
  2006. message: '操作成功',
  2007. type: 'success',
  2008. duration: 1500,
  2009. onClose: () => {
  2010. }
  2011. })
  2012. } else {
  2013. this.$alert(data.msg, '错误', {
  2014. confirmButtonText: '确定'
  2015. })
  2016. }
  2017. })
  2018. }).catch(() => {
  2019. })
  2020. } else {
  2021. saveSubmitResult(this.submitResultData).then(({data}) => {
  2022. if (data && data.code === 0) {
  2023. this.getDataList()
  2024. this.submitResultModalFlag = false
  2025. this.$message({
  2026. message: '操作成功',
  2027. type: 'success',
  2028. duration: 1500,
  2029. onClose: () => {
  2030. }
  2031. })
  2032. } else {
  2033. this.$alert(data.msg, '错误', {
  2034. confirmButtonText: '确定'
  2035. })
  2036. }
  2037. })
  2038. }
  2039. },
  2040. /**
  2041. * 封装回复方法
  2042. */
  2043. packCustomerResponseModal () {
  2044. this.customerResponseData = {
  2045. site: this.$store.state.user.site,
  2046. quotationNo: '',
  2047. actualityReplyDate: '',
  2048. confirmResults: '',
  2049. confirmBy: '',
  2050. confirmInformation: '',
  2051. quotationResultStatus: 'R',
  2052. updateBy: this.$store.state.user.name
  2053. }
  2054. // 获得选中的报价号
  2055. if (this.quotationSelections.length > 0) {
  2056. this.quotationSelections.forEach(val => {
  2057. this.customerResponseData.quotationNo += ';' + val.quotationNo
  2058. })
  2059. this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
  2060. } else {
  2061. this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
  2062. }
  2063. this.customerResponseModalFlag = true
  2064. },
  2065. /**
  2066. * 客户回复
  2067. */
  2068. customerResponseModal () {
  2069. // 如果有选中报价单
  2070. if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2071. let tempData = {
  2072. currentStatus: 'S',
  2073. informationList: this.quotationSelections,
  2074. }
  2075. // 检查报价单状态
  2076. checkQuotationStatus(tempData).then(({data}) => {
  2077. if (data && data.code === 0) {
  2078. if (data.flag === 1) { // 状态一致
  2079. this.packCustomerResponseModal()
  2080. } else { // 状态不同
  2081. this.$message.warning('选中的报价单进度有误,请确认!')
  2082. }
  2083. } else {
  2084. this.$alert(data.msg, '错误', {
  2085. confirmButtonText: '确定'
  2086. })
  2087. }
  2088. })
  2089. } else { // 没有选中报价单,则根据当前点击行报价单操作
  2090. this.packCustomerResponseModal()
  2091. }
  2092. },
  2093. /**
  2094. * 保存客户回复
  2095. */
  2096. saveCustomerResponse () {
  2097. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  2098. this.$message.warning('请选择实际回复日期!')
  2099. return
  2100. }
  2101. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  2102. this.$message.warning('请选择客户确认结果!')
  2103. return
  2104. }
  2105. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  2106. this.$message.warning('请填写客户确认人!')
  2107. return
  2108. }
  2109. if (this.quotationSelections.length > 1) {
  2110. this.$confirm(`是否提交多条客户回复?`, '提示', {
  2111. confirmButtonText: '确定',
  2112. cancelButtonText: '取消',
  2113. type: 'warning'
  2114. }).then(() => {
  2115. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2116. if (data && data.code === 0) {
  2117. this.getDataList()
  2118. this.customerResponseModalFlag = false
  2119. this.$message({
  2120. message: '操作成功',
  2121. type: 'success',
  2122. duration: 1500,
  2123. onClose: () => {
  2124. }
  2125. })
  2126. } else {
  2127. this.$alert(data.msg, '错误', {
  2128. confirmButtonText: '确定'
  2129. })
  2130. }
  2131. })
  2132. }).catch(() => {
  2133. })
  2134. } else {
  2135. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  2136. if (data && data.code === 0) {
  2137. this.getDataList()
  2138. this.customerResponseModalFlag = false
  2139. this.$message({
  2140. message: '操作成功',
  2141. type: 'success',
  2142. duration: 1500,
  2143. onClose: () => {
  2144. }
  2145. })
  2146. } else {
  2147. this.$alert(data.msg, '错误', {
  2148. confirmButtonText: '确定'
  2149. })
  2150. }
  2151. })
  2152. }
  2153. },
  2154. // ======== 报价单附件的相关方法 ========
  2155. /**
  2156. * 获取报价单附件列表
  2157. */
  2158. getFileContentData () {
  2159. let currentData = {
  2160. orderRef1: this.$store.state.user.site,
  2161. orderRef2: this.quotationCurrentRow.quotationNo
  2162. }
  2163. getFileContentList(currentData).then(({data}) => {
  2164. if (data && data.code === 0) {
  2165. this.fileContentList = data.rows
  2166. } else {
  2167. this.fileContentList = []
  2168. }
  2169. })
  2170. },
  2171. /**
  2172. * 获得这些报价号的全部附件
  2173. */
  2174. getFileContentList () {
  2175. let currentData = {
  2176. orderRef1: this.$store.state.user.site,
  2177. orderRef2: this.enterResultData.quotationNo
  2178. }
  2179. getFileContentList(currentData).then(({data}) => {
  2180. if (data && data.code === 0) {
  2181. this.enterResultData.fileContentList = data.rows
  2182. } else {
  2183. this.enterResultData.fileContentList = []
  2184. }
  2185. })
  2186. },
  2187. /**
  2188. * 上传文件
  2189. */
  2190. uploadFile () {
  2191. let currentData = {
  2192. titleCon: '报价附件上传',
  2193. site: this.$store.state.user.site,
  2194. createBy: this.$store.state.user.name,
  2195. quotationNo: '',
  2196. fileRemark: '',
  2197. folder: 'quotationFile',
  2198. options: []
  2199. }
  2200. let num = 0
  2201. let arr = this.enterResultData.quotationNo.split(';')
  2202. arr.forEach(val => {
  2203. currentData.options.push({key: num++, value: val})
  2204. })
  2205. //打开组件 去做新增业务
  2206. this.$nextTick(() => {
  2207. this.$refs.quotationUploadFile.init(currentData);
  2208. })
  2209. },
  2210. /**
  2211. * 文件删除
  2212. * @param row
  2213. */
  2214. deleteFile (row) {
  2215. this.$confirm('确定要删除此文件?', '提示', {
  2216. confirmButtonText: '确定',
  2217. cancelButtonText: '取消',
  2218. type: 'warning'
  2219. }).then(() => {
  2220. deleteQuotationFile(row).then(({data}) => {
  2221. if (data && data.code === 0) {
  2222. this.getFileContentList();
  2223. this.$message({
  2224. message: '操作成功',
  2225. type: 'success',
  2226. duration: 1500,
  2227. onClose: () => {}
  2228. })
  2229. } else {
  2230. this.$alert(data.msg, '错误', {
  2231. confirmButtonText: '确定'
  2232. })
  2233. }
  2234. })
  2235. }).catch(() => {
  2236. })
  2237. },
  2238. /**
  2239. * 文件下载
  2240. * @param row
  2241. */
  2242. downloadFile (row) {
  2243. downLoadQuotationFile(row).then(({data}) => {
  2244. // 不限制文件下载类型
  2245. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  2246. // 下载文件名称
  2247. const fileName = row.fileName
  2248. // a标签下载
  2249. const linkNode = document.createElement('a')
  2250. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  2251. linkNode.style.display = 'none'
  2252. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  2253. document.body.appendChild(linkNode)
  2254. linkNode.click() // 模拟在按钮上的一次鼠标单击
  2255. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  2256. document.body.removeChild(linkNode)
  2257. })
  2258. },
  2259. // ======== chooseList相关方法 ========
  2260. /**
  2261. * 获取基础数据列表S
  2262. * @param val
  2263. * @param type
  2264. */
  2265. getBaseList (val, type) {
  2266. this.tagNo = val
  2267. this.tagNo1 = type
  2268. this.$nextTick(() => {
  2269. let strVal = ''
  2270. if (val === 102) {
  2271. if(type === 1) {
  2272. strVal = this.modalData.customerNo
  2273. }
  2274. }
  2275. if (val === 103) {
  2276. if(type === 1) {
  2277. strVal = this.modalData.tracker
  2278. }
  2279. if(type === 2) {
  2280. strVal = this.modalData.quoter
  2281. }
  2282. }
  2283. if (val === 104) {
  2284. if(type === 1) {
  2285. strVal = this.modalData.projectId
  2286. }
  2287. }
  2288. this.$refs.baseList.init(val, strVal)
  2289. })
  2290. },
  2291. /**
  2292. * 列表方法的回调
  2293. * @param val
  2294. */
  2295. getBaseData (val) {
  2296. if (this.tagNo === 102) {
  2297. if(this.tagNo1 === 1) {
  2298. this.modalData.customerNo = val.Customer_no
  2299. this.modalData.customerDesc = val.Customer_desc
  2300. }
  2301. }
  2302. if (this.tagNo === 103) {
  2303. if(this.tagNo1 === 1) {
  2304. this.modalData.tracker = val.username
  2305. this.modalData.trackerName = val.user_display
  2306. }
  2307. if(this.tagNo1 === 2) {
  2308. this.modalData.quoter = val.username
  2309. this.modalData.quoterName = val.user_display
  2310. }
  2311. }
  2312. if (this.tagNo === 104) {
  2313. if(this.tagNo1 === 1) {
  2314. this.modalData.projectId = val.project_id
  2315. this.modalData.projectName = val.project_name
  2316. }
  2317. }
  2318. },
  2319. // ======== 导出相关方法 ========
  2320. /**
  2321. * 导出excel
  2322. */
  2323. async createExportData () {
  2324. this.searchData.limit = -1
  2325. this.searchData.page = 1
  2326. await quotationInformationSearch(this.searchData).then(({data}) => {
  2327. this.resultList = data.page.list
  2328. })
  2329. return this.resultList
  2330. },
  2331. startDownload () {
  2332. },
  2333. finishDownload () {
  2334. },
  2335. fields () {
  2336. let json = '{'
  2337. this.columnList.forEach((item, index) => {
  2338. if (index == this.columnList.length - 1) {
  2339. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2340. } else {
  2341. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2342. }
  2343. })
  2344. json += '}'
  2345. let s = eval('(' + json + ')')
  2346. return s
  2347. }
  2348. }
  2349. }
  2350. </script>
  2351. <style scoped lang="scss">
  2352. /deep/ .customer-tab .el-tabs__content {
  2353. padding: 0px !important;
  2354. }
  2355. .el-transfer-panel {
  2356. border: 2px solid #17b3a3;
  2357. border-radius: 4px;
  2358. overflow: hidden;
  2359. background: #fff;
  2360. display: inline-block;
  2361. vertical-align: middle;
  2362. width: 200px;
  2363. max-height: 100%;
  2364. -webkit-box-sizing: border-box;
  2365. box-sizing: border-box;
  2366. position: relative;
  2367. }
  2368. .el-transfer-panel .el-transfer-panel__header {
  2369. height: 40px;
  2370. line-height: 40px;
  2371. background: #17b3a3;
  2372. margin: 0;
  2373. padding-left: 15px;
  2374. border-bottom: 1px solid #17b3a3;
  2375. -webkit-box-sizing: border-box;
  2376. box-sizing: border-box;
  2377. color: #000;
  2378. }
  2379. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  2380. font-size: 14px;
  2381. color: #303133;
  2382. font-weight: 400;
  2383. }
  2384. </style>