plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3445 lines
122 KiB

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