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.

3649 lines
128 KiB

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