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.

3588 lines
127 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
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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)" v-if="scope.row.quotationStatus !== '已完成'">编辑</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" @blur="handleQueryCustomer"></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" @blur="handleQueryProjectByCustomer"></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 label="客户询价单号" prop="customerQuoteNo">
  244. <el-input :disabled="quotationInformationFlag('customerQuoteNo') === 'N' && modalData.flag === '2'" v-model="modalData.customerQuoteNo"></el-input>
  245. </el-form-item>
  246. </el-col>
  247. <el-col :span="4">
  248. <el-form-item label="是否需要Sourcing">
  249. <dict-data-select v-if="modalFlag" :disabled="quotationInformationFlag('sourcing') === 'N' && modalData.flag === '2'"
  250. v-model="modalData.sourcing" dict-type="sourcing"></dict-data-select>
  251. </el-form-item>
  252. </el-col>
  253. </el-row>
  254. <el-row :gutter="10">
  255. <el-col :span="12">
  256. <el-form-item label="终端客户编码">
  257. <el-row :gutter="10">
  258. <el-col :span="8">
  259. <el-input disabled v-model="modalData.finalCustomerId"></el-input>
  260. </el-col>
  261. <el-col :span="16">
  262. <el-input disabled v-model="modalData.finalCustomerName"></el-input>
  263. </el-col>
  264. </el-row>
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="4">
  268. <el-form-item label="Delivery Terms" prop="deliveryTerms">
  269. <dict-data-select v-if="modalFlag" :disabled="quotationInformationFlag('deliveryTerms') === 'N' && modalData.flag === '2'" v-model="modalData.deliveryTerms"
  270. clearable dict-type="delivery_terms" :use-default-value="modalData.flag === '1'"></dict-data-select>
  271. </el-form-item>
  272. </el-col>
  273. <el-col :span="4">
  274. <el-form-item prop="quoterName">
  275. <span v-if="quotationInformationFlag('quoter') === 'N' && modalData.flag === '2'" slot="label">报价专员</span>
  276. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2002)"><a herf="#">报价专员</a></span>
  277. <el-input :disabled="quotationInformationFlag('quoter') === 'N' && modalData.flag === '2'" v-model="modalData.quoterName" readonly></el-input>
  278. </el-form-item>
  279. </el-col>
  280. <el-col :span="4">
  281. <el-form-item prop="trackerName" v-if="modalData.sourcing === 'Y'">
  282. <span style="cursor: pointer" slot="label" @click="getBaseList(2000)"><a herf="#">采购专员</a></span>
  283. <el-input v-model="modalData.trackerName" readonly></el-input>
  284. </el-form-item>
  285. <el-form-item label="采购专员" v-else>
  286. <el-input :disabled="quotationInformationFlag('tracker') === 'N' && modalData.flag === '2'" v-model="modalData.trackerName" readonly></el-input>
  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. <inquiry-quote-detail :quotation="quotationCurrentRow"></inquiry-quote-detail>
  982. </el-tab-pane>
  983. <el-tab-pane label="附件信息" name="oss_file" >
  984. <oss-components style="margin-top: 5px" height="44vh" :columns="ossColumns" :order-ref1="quotationCurrentRow.site" :order-ref2="quotationCurrentRow.quotationNo"></oss-components>
  985. </el-tab-pane>
  986. </el-tabs>
  987. <!-- chooseList模态框 -->
  988. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  989. <!-- 上传文件的modal -->
  990. <quotationUploadFile ref="quotationUploadFile" @refreshPageTables="getFileContentData()"
  991. v-drag></quotationUploadFile>
  992. </div>
  993. </template>
  994. <script>
  995. import {
  996. quotationInformationSearch, // 询价信息列表查询
  997. quotationInformationSave, // 询价信息新增
  998. quotationInformationEdit, // 询价信息编辑
  999. quotationInformationDelete, // 询价信息删除
  1000. getFileContentList, // 获取询价单附件列表
  1001. quotationResultSearch, // 获取询价结果对象
  1002. deleteQuotationFile, // 文件删除
  1003. downLoadQuotationFile, // 文件下载
  1004. saveQuotationResult, // 保存询价结果
  1005. saveSubmitResult, // 保存提交结果
  1006. saveCustomerResponse, // 保存客户回复
  1007. getProjectPartList, // 获取产品列表
  1008. checkQuotationStatus, // 检查询价进度
  1009. getProjectInformation, // 获取项目信息
  1010. getCustomerInformation, // 获取客户信息
  1011. searchProjectInfoList,// 查询项目信息
  1012. submitChange, // 提交
  1013. quotationInformationEditStatus, // 下达
  1014. } from '@/api/quotation/quotationInformation.js'
  1015. import {
  1016. customerContactSearch, // 客户联系人列表查询
  1017. } from '@/api/customer/customerContact.js'
  1018. import {
  1019. getNodeAuthority, // 获取节点权限
  1020. } from '@/api/changeManagement/changeManagement.js'
  1021. import Chooselist from '@/views/modules/common/Chooselist'
  1022. import quotationUploadFile from "./quotation_upload_file"
  1023. import DictDataSelect from "../sys/dict-data-select.vue";
  1024. import PriceCheckProperties from "./priceCheckProperties.vue";
  1025. import TestProperties from "../test/testAttribute/testProperties.vue";
  1026. import priceCheckProperties from "./priceCheckProperties.vue";
  1027. import {getPriceCheckPropertiesList} from "../../../api/quotation/priceCheckProperties";
  1028. import PriceCheckDetail from "./sellForQuotation/priceCheckDetail/priceCheckDetail.vue";
  1029. import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail";
  1030. import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue";
  1031. import {queryCustomer} from "../../../api/customer/customerInformation";
  1032. import {queryProjectByCustomer} from "../../../api/project/project";
  1033. import OssComponents from "../oss/ossComponents.vue";
  1034. export default {
  1035. computed: {
  1036. priceCheckProperties() {
  1037. return priceCheckProperties
  1038. },
  1039. quotationInformationFlag () {
  1040. return (value) => {
  1041. if (!this.plmQuotationInformationArr){
  1042. return 'N'
  1043. }
  1044. let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value)
  1045. if (arr.length > 0) {
  1046. return arr[0].updateFlag
  1047. }
  1048. return 'N'
  1049. }
  1050. },
  1051. },
  1052. components: {
  1053. OssComponents,
  1054. InquiryQuoteDetail,
  1055. PriceCheckDetail,
  1056. TestProperties,
  1057. PriceCheckProperties,
  1058. DictDataSelect,
  1059. Chooselist,
  1060. quotationUploadFile
  1061. },
  1062. props:{
  1063. height:{
  1064. type:Number,
  1065. default:240
  1066. }
  1067. },
  1068. watch: {
  1069. searchData: {
  1070. deep: true,
  1071. handler: function (newV, oldV) {
  1072. this.searchData.customerNo = this.searchData.customerNo.toUpperCase()
  1073. this.searchData.projectId = this.searchData.projectId.toUpperCase()
  1074. }
  1075. },
  1076. modalData: {
  1077. deep: true,
  1078. handler: function (newV, oldV) {
  1079. this.modalData.customerNo = this.modalData.customerNo.toUpperCase()
  1080. this.modalData.projectId = this.modalData.projectId.toUpperCase()
  1081. this.modalData.quotationNo = this.modalData.quotationNo.toUpperCase()
  1082. }
  1083. },
  1084. quotationCurrentRow(newVal,oldVal){
  1085. this.getPriceCheckDetailList()
  1086. this.getPriceCheckProperties();
  1087. },
  1088. 'modalData.customerNo'(newV, oldV) {
  1089. if (oldV) {
  1090. if (!newV) {
  1091. this.modalData.customerDesc = ''
  1092. }
  1093. this.modalData.projectId = ''
  1094. this.modalData.consignee = ''
  1095. this.modalData.consigneeContact = ''
  1096. this.modalData.sendSamplesAddress = ''
  1097. }
  1098. },
  1099. 'modalData.projectId'(newV, oldV) {
  1100. if (oldV) {
  1101. if (!newV) {
  1102. this.modalData.projectName = ''
  1103. }
  1104. this.modalData.testPartNo = ''
  1105. this.modalData.partName = ''
  1106. this.projectPartListSelections = [];
  1107. this.projectPartList = [];
  1108. this.$refs.projectPartTable.clearSelection();
  1109. }
  1110. },
  1111. },
  1112. data() {
  1113. return {
  1114. copyPriceCheckDetail:{},
  1115. priceCheckRule: {
  1116. associatedPartNo:[{required: true, message: ' ', trigger: 'change'},],
  1117. materialRequired:[{required: true, message: ' ', trigger: 'change'},],
  1118. yearlyOrMonthlyRequirement:[{required: true, message: ' ', trigger: 'change'},],
  1119. runningWidth:[{required: true, message: ' ', trigger: 'change'},],
  1120. },
  1121. savePriceDetail:{
  1122. site:'',
  1123. quotationNo:'',
  1124. associatedPartNo:'',
  1125. materialRequired:'',
  1126. yearlyOrMonthlyRequirement:'',
  1127. runningWidth:'',
  1128. },
  1129. priceCheckDetail:{
  1130. site:'',
  1131. quotationNo:'',
  1132. associatedPartNo:'',
  1133. materialRequired:'',
  1134. yearlyOrMonthlyRequirement:'',
  1135. runningWidth:'',
  1136. },
  1137. activeTab:'part',
  1138. priceCheckPropertiesList: [],
  1139. // 导出
  1140. exportData: [],
  1141. exportName: '设备分类' + this.dayjs().format('YYYYMMDDHHmmss'),
  1142. exportHeader: ['设备分类'],
  1143. exportFooter: [],
  1144. resultList: [],
  1145. // ======== 行高 ========
  1146. secondHeight: 200,
  1147. // ======== 分页 ========
  1148. pageIndex: 1,
  1149. pageSize: 50,
  1150. totalPage: 0,
  1151. selectedDataNum: 0,
  1152. // 条件查询
  1153. searchData: {
  1154. site: this.$store.state.user.site,
  1155. customerNo: '',
  1156. customerDesc: '',
  1157. quotationBatchNo: '',
  1158. quotationItemNo: '',
  1159. trackerName: '',
  1160. testPartNo: '',
  1161. partName: '',
  1162. quotationStatus: '',
  1163. quotationResultStatus: '',
  1164. startDate: '',
  1165. endDate: '',
  1166. projectId: '',
  1167. projectName: '',
  1168. quoterName: '',
  1169. priorityLevel: '',
  1170. page: 1,
  1171. limit: 10,
  1172. menuId: this.$route.meta.menuId,
  1173. quotationNo: ''
  1174. },
  1175. // 其它
  1176. dataListLoading: false,
  1177. // 选择项目弹框开关
  1178. chooseProjectListFlag: false,
  1179. //项目搜索条件
  1180. searchProjectData: {
  1181. site: this.$store.state.user.site,
  1182. projectId: undefined,
  1183. projectName: undefined,
  1184. customerId: undefined,
  1185. },
  1186. // 项目集合
  1187. projectList: [],
  1188. // 初始页签
  1189. activeTable: 'priceCheck',
  1190. // ======== 数据对象 ========
  1191. modalData: {
  1192. flag: '',
  1193. title: '',
  1194. site: this.$store.state.user.site,
  1195. quotationNo: '',
  1196. customerNo: '',
  1197. customerDesc: '',
  1198. projectId: '',
  1199. projectName: '',
  1200. deliveryTerms: '',
  1201. quoteType: '',
  1202. tracker: '',
  1203. trackerName: '',
  1204. sourcing:'',
  1205. quoter: '',
  1206. quoterName: '',
  1207. customerQuoteNo: '',
  1208. quotationStatus: '',
  1209. testPartNo: '',
  1210. partName: '',
  1211. priorityLevel: '',
  1212. requiredCompletionDate: '',
  1213. remark: '',
  1214. technicalConsiderations: '',
  1215. customerResponsiblePerson: '',
  1216. customerResponsiblePersonPhone: '',
  1217. nextToDo: '',
  1218. actualityQuotationDate: '',
  1219. quotationResultInformation: '',
  1220. actualitySubmissionDate: '',
  1221. submissionMethod: '',
  1222. submissionRemark: '',
  1223. actualityReplyDate: '',
  1224. confirmResults: '',
  1225. confirmBy: '',
  1226. confirmInformation: '',
  1227. quotationResultStatus: '',
  1228. createDate: '',
  1229. createBy: '',
  1230. updateDate: '',
  1231. updateBy: '',
  1232. nodeConclusion: '',
  1233. stepId: '',
  1234. rejectFlag: '',
  1235. rejectStepId: '',
  1236. isReject: ''
  1237. },
  1238. quotationDetailData: {
  1239. technicalConsiderations: '',
  1240. customerResponsiblePerson: '',
  1241. customerResponsiblePersonPhone: ''
  1242. },
  1243. quotationResultData: {
  1244. actualityQuotationDate: '',
  1245. quotationResultInformation: '',
  1246. actualitySubmissionDate: '',
  1247. submissionMethod: '',
  1248. submissionRemark: '',
  1249. confirmResults: '',
  1250. actualityReplyDate: '',
  1251. confirmBy: '',
  1252. confirmInformation: '',
  1253. quotationResultStatus: '',
  1254. },
  1255. enterResultData: {
  1256. site: this.$store.state.user.site,
  1257. quotationNo: '',
  1258. actualityQuotationDate: '',
  1259. quotationResultInformation: '',
  1260. updateBy: this.$store.state.user.name,
  1261. quotationResultStatus: '',
  1262. fileContentList: []
  1263. },
  1264. submitResultData: {
  1265. site: this.$store.state.user.site,
  1266. quotationNo: '',
  1267. actualitySubmissionDate: '',
  1268. submissionMethod: '',
  1269. submissionRemark: '',
  1270. updateBy: this.$store.state.user.name,
  1271. quotationResultStatus: ''
  1272. },
  1273. customerResponseData: {
  1274. site: this.$store.state.user.site,
  1275. quotationNo: '',
  1276. actualityReplyDate: '',
  1277. confirmResults: '',
  1278. confirmBy: '',
  1279. confirmInformation: '',
  1280. updateBy: this.$store.state.user.name,
  1281. quotationResultStatus: ''
  1282. },
  1283. projectPartData: {
  1284. site: this.$store.state.user.site,
  1285. testPartNo: '',
  1286. partName: '',
  1287. projectId: '',
  1288. },
  1289. projectInformationData: {
  1290. projectId: '',
  1291. projectName: '',
  1292. projectType: '',
  1293. projectSourceDesc: '',
  1294. priorityDesc: '',
  1295. status: '',
  1296. projectDesc: '',
  1297. projectManagerName: '',
  1298. projectOwnerName: '',
  1299. userRoleName: '',
  1300. remark: ''
  1301. },
  1302. customerInformationData: {
  1303. customerNo: '',
  1304. customerDesc: '',
  1305. importantCustomer: '',
  1306. customerCurrency: '',
  1307. turnoverOfYear: '',
  1308. potentialRevenueOfYear: '',
  1309. customerStatus: '',
  1310. customerIndustry: '',
  1311. companyName: '',
  1312. jobDescription: '',
  1313. customerDescription: '',
  1314. contactName: '',
  1315. contactPhoneNumber1: '',
  1316. position: '',
  1317. addressName: '',
  1318. addressType: '',
  1319. createDate: '',
  1320. createBy: '',
  1321. updateDate: '',
  1322. updateBy: ''
  1323. },
  1324. // ======== 数据列表 ========
  1325. dataList: [],
  1326. fileContentList: [],
  1327. projectPartList: [],
  1328. contactList: [],
  1329. // ======== 列表表头 ========
  1330. columnList: [
  1331. {
  1332. userId: this.$store.state.user.name,
  1333. functionId: 102001,
  1334. serialNumber: '102001Table1QuotationNo',
  1335. tableId: '102001Table1',
  1336. tableName: '询价信息表',
  1337. columnProp: 'quotationNo',
  1338. headerAlign: 'center',
  1339. align: 'center',
  1340. columnLabel: '申请单号',
  1341. columnHidden: false,
  1342. columnImage: false,
  1343. columnSortable: false,
  1344. sortLv: 0,
  1345. status: true,
  1346. fixed: '',
  1347. columnWidth: 120
  1348. }, {
  1349. userId: this.$store.state.user.name,
  1350. functionId: 102001,
  1351. serialNumber: '102001Table1QuotationBatchNo',
  1352. tableId: '102001Table1',
  1353. tableName: '询价信息表',
  1354. columnProp: 'quotationBatchNo',
  1355. headerAlign: 'center',
  1356. align: 'center',
  1357. columnLabel: '申请批次号',
  1358. columnHidden: false,
  1359. columnImage: false,
  1360. columnSortable: false,
  1361. sortLv: 0,
  1362. status: true,
  1363. fixed: '',
  1364. columnWidth: 120
  1365. }, {
  1366. userId: this.$store.state.user.name,
  1367. functionId: 102001,
  1368. serialNumber: '102001Table1QuotationItemNo',
  1369. tableId: '102001Table1',
  1370. tableName: '询价信息表',
  1371. columnProp: 'quotationItemNo',
  1372. headerAlign: 'center',
  1373. align: 'right',
  1374. columnLabel: '序号',
  1375. columnHidden: false,
  1376. columnImage: false,
  1377. columnSortable: false,
  1378. sortLv: 0,
  1379. status: true,
  1380. fixed: '',
  1381. columnWidth: 60
  1382. },
  1383. {
  1384. userId: this.$store.state.user.name,
  1385. functionId: 102001,
  1386. serialNumber: '102001Table1CustomerNo',
  1387. tableId: '102001Table1',
  1388. tableName: '询价信息表',
  1389. columnProp: 'customerNo',
  1390. headerAlign: 'center',
  1391. align: 'center',
  1392. columnLabel: '客户编码',
  1393. columnHidden: false,
  1394. columnImage: false,
  1395. columnSortable: false,
  1396. sortLv: 0,
  1397. status: true,
  1398. fixed: '',
  1399. columnWidth: 100
  1400. },
  1401. {
  1402. userId: this.$store.state.user.name,
  1403. functionId: 102001,
  1404. serialNumber: '102001Table1CustomerDesc',
  1405. tableId: '102001Table1',
  1406. tableName: '询价信息表',
  1407. columnProp: 'customerDesc',
  1408. headerAlign: 'center',
  1409. align: 'left',
  1410. columnLabel: '客户名称',
  1411. columnHidden: false,
  1412. columnImage: false,
  1413. columnSortable: false,
  1414. sortLv: 0,
  1415. status: true,
  1416. fixed: '',
  1417. columnWidth: 120
  1418. },
  1419. {
  1420. userId: this.$store.state.user.name,
  1421. functionId: 102001,
  1422. serialNumber: '102001Table1ProjectId',
  1423. tableId: '102001Table1',
  1424. tableName: '询价信息表',
  1425. columnProp: 'projectId',
  1426. headerAlign: 'center',
  1427. align: 'center',
  1428. columnLabel: '项目编码',
  1429. columnHidden: false,
  1430. columnImage: false,
  1431. columnSortable: false,
  1432. sortLv: 0,
  1433. status: true,
  1434. fixed: '',
  1435. columnWidth: 120
  1436. },
  1437. {
  1438. userId: this.$store.state.user.name,
  1439. functionId: 102001,
  1440. serialNumber: '102001Table1ProjectName',
  1441. tableId: '102001Table1',
  1442. tableName: '询价信息表',
  1443. columnProp: 'projectName',
  1444. headerAlign: 'center',
  1445. align: 'left',
  1446. columnLabel: '项目名称',
  1447. columnHidden: false,
  1448. columnImage: false,
  1449. columnSortable: false,
  1450. sortLv: 0,
  1451. status: true,
  1452. fixed: '',
  1453. columnWidth: 120
  1454. },
  1455. {
  1456. userId: this.$store.state.user.name,
  1457. functionId: 102001,
  1458. serialNumber: '102001Table1TrackerName',
  1459. tableId: '102001Table1',
  1460. tableName: '询价信息表',
  1461. columnProp: 'trackerName',
  1462. headerAlign: 'center',
  1463. align: 'left',
  1464. columnLabel: '采购专员',
  1465. columnHidden: false,
  1466. columnImage: false,
  1467. columnSortable: false,
  1468. sortLv: 0,
  1469. status: true,
  1470. fixed: '',
  1471. columnWidth: 80
  1472. },
  1473. {
  1474. userId: this.$store.state.user.name,
  1475. functionId: 102001,
  1476. serialNumber: '102001Table1QuoterName',
  1477. tableId: '102001Table1',
  1478. tableName: '询价信息表',
  1479. columnProp: 'quoterName',
  1480. headerAlign: 'center',
  1481. align: 'left',
  1482. columnLabel: '报价专员',
  1483. columnHidden: false,
  1484. columnImage: false,
  1485. columnSortable: false,
  1486. sortLv: 0,
  1487. status: true,
  1488. fixed: '',
  1489. columnWidth: 80
  1490. },
  1491. {
  1492. userId: this.$store.state.user.name,
  1493. functionId: 102001,
  1494. serialNumber: '102001Table1TestPartNo',
  1495. tableId: '102001Table1',
  1496. tableName: '询价信息表',
  1497. columnProp: 'testPartNo',
  1498. headerAlign: 'center',
  1499. align: 'center',
  1500. columnLabel: '项目料号',
  1501. columnHidden: false,
  1502. columnImage: false,
  1503. columnSortable: false,
  1504. sortLv: 0,
  1505. status: true,
  1506. fixed: '',
  1507. columnWidth: 160
  1508. },
  1509. {
  1510. userId: this.$store.state.user.name,
  1511. functionId: 102001,
  1512. serialNumber: '102001Table1PartName',
  1513. tableId: '102001Table1',
  1514. tableName: '询价信息表',
  1515. columnProp: 'partName',
  1516. headerAlign: 'center',
  1517. align: 'left',
  1518. columnLabel: '物料描述',
  1519. columnHidden: false,
  1520. columnImage: false,
  1521. columnSortable: false,
  1522. sortLv: 0,
  1523. status: true,
  1524. fixed: '',
  1525. columnWidth: 100
  1526. },
  1527. {
  1528. userId: this.$store.state.user.name,
  1529. functionId: 102001,
  1530. serialNumber: '102001Table1PriorityLevel',
  1531. tableId: '102001Table1',
  1532. tableName: '询价信息表',
  1533. columnProp: 'priorityLevel',
  1534. headerAlign: 'center',
  1535. align: 'left',
  1536. columnLabel: '优先等级',
  1537. columnHidden: false,
  1538. columnImage: false,
  1539. columnSortable: false,
  1540. sortLv: 0,
  1541. status: true,
  1542. fixed: '',
  1543. columnWidth: 80
  1544. },
  1545. {
  1546. userId: this.$store.state.user.name,
  1547. functionId: 102001,
  1548. serialNumber: '102001Table1RequiredCompletionDate',
  1549. tableId: '102001Table1',
  1550. tableName: '询价信息表',
  1551. columnProp: 'requiredCompletionDate',
  1552. headerAlign: 'center',
  1553. align: 'center',
  1554. columnLabel: '要求完成日期',
  1555. columnHidden: false,
  1556. columnImage: false,
  1557. columnSortable: false,
  1558. sortLv: 0,
  1559. status: true,
  1560. fixed: '',
  1561. columnWidth: 160
  1562. },
  1563. {
  1564. userId: this.$store.state.user.name,
  1565. functionId: 102001,
  1566. serialNumber: '102001Table1quotationStatus',
  1567. tableId: '102001Table1',
  1568. tableName: '询价信息表',
  1569. columnProp: 'quotationStatus',
  1570. headerAlign: 'center',
  1571. align: 'center',
  1572. columnLabel: '状态',
  1573. columnHidden: false,
  1574. columnImage: false,
  1575. columnSortable: false,
  1576. sortLv: 0,
  1577. status: true,
  1578. fixed: '',
  1579. columnWidth: 100
  1580. },
  1581. {
  1582. userId: this.$store.state.user.name,
  1583. functionId: 102001,
  1584. serialNumber: '102001Table1NodeName',
  1585. tableId: '102001Table1',
  1586. tableName: '询价信息表',
  1587. columnProp: 'nodeName',
  1588. headerAlign: 'center',
  1589. align: 'center',
  1590. columnLabel: '当前节点',
  1591. columnHidden: false,
  1592. columnImage: false,
  1593. columnSortable: false,
  1594. sortLv: 0,
  1595. status: true,
  1596. fixed: '',
  1597. columnWidth: 150
  1598. },
  1599. {
  1600. userId: this.$store.state.user.name,
  1601. functionId: 102001,
  1602. serialNumber: '102001Table1CreateDate',
  1603. tableId: '102001Table1',
  1604. tableName: '询价信息表',
  1605. columnProp: 'createDate',
  1606. headerAlign: 'center',
  1607. align: 'center',
  1608. columnLabel: '创建时间',
  1609. columnHidden: false,
  1610. columnImage: false,
  1611. columnSortable: false,
  1612. sortLv: 0,
  1613. status: true,
  1614. fixed: '',
  1615. columnWidth: 160
  1616. },
  1617. {
  1618. userId: this.$store.state.user.name,
  1619. functionId: 102001,
  1620. serialNumber: '102001Table1CreateBy',
  1621. tableId: '102001Table1',
  1622. tableName: '询价信息表',
  1623. columnProp: 'createBy',
  1624. headerAlign: 'center',
  1625. align: 'left',
  1626. columnLabel: '创建人',
  1627. columnHidden: false,
  1628. columnImage: false,
  1629. columnSortable: false,
  1630. sortLv: 0,
  1631. status: true,
  1632. fixed: '',
  1633. columnWidth: 80
  1634. },
  1635. {
  1636. userId: this.$store.state.user.name,
  1637. functionId: 102001,
  1638. serialNumber: '102001Table1UpdateDate',
  1639. tableId: '102001Table1',
  1640. tableName: '询价信息表',
  1641. columnProp: 'updateDate',
  1642. headerAlign: 'center',
  1643. align: 'center',
  1644. columnLabel: '更新时间',
  1645. columnHidden: false,
  1646. columnImage: false,
  1647. columnSortable: false,
  1648. sortLv: 0,
  1649. status: true,
  1650. fixed: '',
  1651. columnWidth: 160
  1652. },
  1653. {
  1654. userId: this.$store.state.user.name,
  1655. functionId: 102001,
  1656. serialNumber: '102001Table1UpdateBy',
  1657. tableId: '102001Table1',
  1658. tableName: '询价信息表',
  1659. columnProp: 'updateBy',
  1660. headerAlign: 'center',
  1661. align: 'left',
  1662. columnLabel: '更新人',
  1663. columnHidden: false,
  1664. columnImage: false,
  1665. columnSortable: false,
  1666. sortLv: 0,
  1667. status: true,
  1668. fixed: '',
  1669. columnWidth: 80
  1670. }
  1671. ],
  1672. fileColumnList: [
  1673. {
  1674. userId: this.$store.state.user.name,
  1675. functionId: 102001,
  1676. serialNumber: '102001Table2FileName',
  1677. tableId: '102001Table2',
  1678. tableName: '文件信息表',
  1679. columnProp: 'fileName',
  1680. headerAlign: 'center',
  1681. align: 'center',
  1682. columnLabel: '文件名称',
  1683. columnHidden: false,
  1684. columnImage: false,
  1685. columnSortable: false,
  1686. sortLv: 0,
  1687. status: true,
  1688. fixed: '',
  1689. columnWidth: 140
  1690. },
  1691. {
  1692. userId: this.$store.state.user.name,
  1693. functionId: 102001,
  1694. serialNumber: '102001Table2FileRemark',
  1695. tableId: '102001Table2',
  1696. tableName: '文件信息表',
  1697. columnProp: 'fileRemark',
  1698. headerAlign: 'center',
  1699. align: 'center',
  1700. columnLabel: '备注',
  1701. columnHidden: false,
  1702. columnImage: false,
  1703. columnSortable: false,
  1704. sortLv: 0,
  1705. status: true,
  1706. fixed: '',
  1707. columnWidth: 240
  1708. },
  1709. // {
  1710. // userId: this.$store.state.user.name,
  1711. // functionId: 102001,
  1712. // serialNumber: '102001Table2OrderRef3',
  1713. // tableId: '102001Table2',
  1714. // tableName: '文件信息表',
  1715. // columnProp: 'orderRef3',
  1716. // headerAlign: 'center',
  1717. // align: 'center',
  1718. // columnLabel: '文件描述',
  1719. // columnHidden: false,
  1720. // columnImage: false,
  1721. // columnSortable: false,
  1722. // sortLv: 0,
  1723. // status: true,
  1724. // fixed: '',
  1725. // columnWidth: 120
  1726. // },
  1727. {
  1728. userId: this.$store.state.user.name,
  1729. functionId: 102001,
  1730. serialNumber: '102001Table2CreateDate',
  1731. tableId: '102001Table2',
  1732. tableName: '文件信息表',
  1733. columnProp: 'createDate',
  1734. headerAlign: 'center',
  1735. align: 'center',
  1736. columnLabel: '上传时间',
  1737. columnHidden: false,
  1738. columnImage: false,
  1739. columnSortable: false,
  1740. sortLv: 0,
  1741. status: true,
  1742. fixed: '',
  1743. columnWidth: 140
  1744. },
  1745. {
  1746. userId: this.$store.state.user.name,
  1747. functionId: 102001,
  1748. serialNumber: '102001Table2CreatedBy',
  1749. tableId: '102001Table2',
  1750. tableName: '文件信息表',
  1751. columnProp: 'createdBy',
  1752. headerAlign: 'center',
  1753. align: 'center',
  1754. columnLabel: '上传人',
  1755. columnHidden: false,
  1756. columnImage: false,
  1757. columnSortable: false,
  1758. sortLv: 0,
  1759. status: true,
  1760. fixed: '',
  1761. columnWidth: 140
  1762. }
  1763. ],
  1764. projectPartDetailList: [
  1765. {
  1766. userId: this.$store.state.user.name,
  1767. functionId: 102001,
  1768. serialNumber: '102001Table3TestPartNo',
  1769. tableId: '102001Table3',
  1770. tableName: '项目物料表',
  1771. columnProp: 'testPartNo',
  1772. headerAlign: 'center',
  1773. align: 'center',
  1774. columnLabel: '产品编码',
  1775. columnHidden: false,
  1776. columnImage: false,
  1777. columnSortable: false,
  1778. sortLv: 0,
  1779. status: true,
  1780. fixed: '',
  1781. columnWidth: 150
  1782. },
  1783. {
  1784. userId: this.$store.state.user.name,
  1785. functionId: 102001,
  1786. serialNumber: '102001Table3PartDesc',
  1787. tableId: '102001Table3',
  1788. tableName: '项目物料表',
  1789. columnProp: 'partDesc',
  1790. headerAlign: 'center',
  1791. align: 'center',
  1792. columnLabel: '产品名称',
  1793. columnHidden: false,
  1794. columnImage: false,
  1795. columnSortable: false,
  1796. sortLv: 0,
  1797. status: true,
  1798. fixed: '',
  1799. columnWidth: 120
  1800. }, {
  1801. userId: this.$store.state.user.name,
  1802. functionId: 102001,
  1803. serialNumber: '102001Table3PartSpec',
  1804. tableId: '102001Table3',
  1805. tableName: '项目物料表',
  1806. columnProp: 'partSpec',
  1807. headerAlign: 'center',
  1808. align: 'center',
  1809. columnLabel: '产品规格',
  1810. columnHidden: false,
  1811. columnImage: false,
  1812. columnSortable: false,
  1813. sortLv: 0,
  1814. status: true,
  1815. fixed: '',
  1816. columnWidth: 120
  1817. }, {
  1818. userId: this.$store.state.user.name,
  1819. functionId: 102001,
  1820. serialNumber: '102001Table3PartTypeDesc',
  1821. tableId: '102001Table3',
  1822. tableName: '项目物料表',
  1823. columnProp: 'partTypeDesc',
  1824. headerAlign: 'center',
  1825. align: 'center',
  1826. columnLabel: '产品类型',
  1827. columnHidden: false,
  1828. columnImage: false,
  1829. columnSortable: false,
  1830. sortLv: 0,
  1831. status: true,
  1832. fixed: '',
  1833. columnWidth: 120
  1834. },
  1835. {
  1836. userId: this.$store.state.user.name,
  1837. functionId: 102001,
  1838. serialNumber: '102001Table3Type',
  1839. tableId: '102001Table3',
  1840. tableName: '项目物料表',
  1841. columnProp: 'type',
  1842. headerAlign: 'center',
  1843. align: 'center',
  1844. columnLabel: '制造类型',
  1845. columnHidden: false,
  1846. columnImage: false,
  1847. columnSortable: false,
  1848. sortLv: 0,
  1849. status: true,
  1850. fixed: '',
  1851. columnWidth: 120
  1852. },
  1853. {
  1854. userId: this.$store.state.user.name,
  1855. functionId: 102001,
  1856. serialNumber: '102001Table3UmId',
  1857. tableId: '102001Table3',
  1858. tableName: '项目物料表',
  1859. columnProp: 'umId',
  1860. headerAlign: 'center',
  1861. align: 'center',
  1862. columnLabel: '单位',
  1863. columnHidden: false,
  1864. columnImage: false,
  1865. columnSortable: false,
  1866. sortLv: 0,
  1867. status: true,
  1868. fixed: '',
  1869. columnWidth: 100
  1870. },
  1871. {
  1872. userId: this.$store.state.user.name,
  1873. functionId: 102001,
  1874. serialNumber: '102001Table3CodeNo',
  1875. tableId: '102001Table3',
  1876. tableName: '项目物料表',
  1877. columnProp: 'codeNo',
  1878. headerAlign: 'center',
  1879. align: 'center',
  1880. columnLabel: '模板编码',
  1881. columnHidden: false,
  1882. columnImage: false,
  1883. columnSortable: false,
  1884. sortLv: 0,
  1885. status: true,
  1886. fixed: '',
  1887. columnWidth: 120
  1888. }, {
  1889. userId: this.$store.state.user.name,
  1890. functionId: 102001,
  1891. serialNumber: '102001Table3CodeDesc',
  1892. tableId: '102001Table3',
  1893. tableName: '项目物料表',
  1894. columnProp: 'codeDesc',
  1895. headerAlign: 'center',
  1896. align: 'center',
  1897. columnLabel: '模板名称',
  1898. columnHidden: false,
  1899. columnImage: false,
  1900. columnSortable: false,
  1901. sortLv: 0,
  1902. status: true,
  1903. fixed: '',
  1904. columnWidth: 120
  1905. }
  1906. ],
  1907. columnContactList: [
  1908. {
  1909. userId: this.$store.state.user.name,
  1910. functionId: 102001,
  1911. serialNumber: '102001Table4ContactName',
  1912. tableId: '102001Table4',
  1913. tableName: '客户联系人表',
  1914. columnProp: 'contactName',
  1915. headerAlign: 'center',
  1916. align: 'center',
  1917. columnLabel: '客户负责人',
  1918. columnHidden: false,
  1919. columnImage: false,
  1920. status: true,
  1921. fixed: '',
  1922. },
  1923. {
  1924. userId: this.$store.state.user.name,
  1925. functionId: 102001,
  1926. serialNumber: '102001Table4ContactPhoneNumber1',
  1927. tableId: '102001Table4',
  1928. tableName: '客户联系人表',
  1929. columnProp: 'contactPhoneNumber1',
  1930. headerAlign: 'center',
  1931. align: 'center',
  1932. columnLabel: '联系方式',
  1933. columnHidden: false,
  1934. columnImage: false,
  1935. status: true,
  1936. fixed: '',
  1937. },
  1938. {
  1939. userId: this.$store.state.user.name,
  1940. functionId: 102001,
  1941. serialNumber: '102001Table4PrimaryContact',
  1942. tableId: '102001Table4',
  1943. tableName: '客户联系人表',
  1944. columnProp: 'primaryContact',
  1945. headerAlign: 'center',
  1946. align: 'center',
  1947. columnLabel: '默认联系人',
  1948. columnHidden: false,
  1949. columnImage: false,
  1950. status: true,
  1951. fixed: '',
  1952. },
  1953. {
  1954. userId: this.$store.state.user.name,
  1955. functionId: 102001,
  1956. serialNumber: '102001Table4ContactStatus',
  1957. tableId: '102001Table4',
  1958. tableName: '客户联系人表',
  1959. columnProp: 'contactStatus',
  1960. headerAlign: 'center',
  1961. align: 'center',
  1962. columnLabel: '人员状态',
  1963. columnHidden: false,
  1964. columnImage: false,
  1965. status: true,
  1966. fixed: '',
  1967. },
  1968. ],
  1969. // ======== 必填规则 ========
  1970. rules: {
  1971. customerNo: [
  1972. {required: true, message: ' ', trigger: 'change'},
  1973. {required: true, message: ' ', trigger: 'blur'},
  1974. ],
  1975. customerDesc: [
  1976. {required: true, message: ' ', trigger: 'change'},
  1977. {required: true, message: ' ', trigger: 'blur'},
  1978. ],
  1979. trackerName: [
  1980. {required: true, message: ' ', trigger: 'change'},
  1981. {required: true, message: ' ', trigger: 'blur'},
  1982. ],
  1983. projectId: [
  1984. {required: true, message: ' ', trigger: 'change'},
  1985. {required: true, message: ' ', trigger: 'blur'},
  1986. ],
  1987. projectName: [
  1988. {required: true, message: ' ', trigger: 'change'},
  1989. {required: true, message: ' ', trigger: 'blur'},
  1990. ],
  1991. quoterName: [
  1992. {required: true, message: ' ', trigger: 'change'},
  1993. {required: true, message: ' ', trigger: 'blur'},
  1994. ],
  1995. partName: [
  1996. {required: true, message: ' ', trigger: 'change'},
  1997. {required: true, message: ' ', trigger: 'blur'},
  1998. ],
  1999. priorityLevel: [
  2000. {required: true, message: ' ', trigger: 'change'},
  2001. ],
  2002. requiredCompletionDate: [
  2003. {required: true, message: ' ', trigger: 'change'},
  2004. {required: true, message: ' ', trigger: 'blur'},
  2005. ],
  2006. deliveryTerms: [
  2007. {required: true, message: ' ', trigger: 'change'},
  2008. {required: true, message: ' ', trigger: 'blur'},
  2009. ],
  2010. quoteType: [
  2011. {required: true, message: ' ', trigger: 'change'},
  2012. {required: true, message: ' ', trigger: 'blur'},
  2013. ],
  2014. },
  2015. enterResultRules: {
  2016. actualityQuotationDate: [
  2017. {
  2018. required: true,
  2019. message: ' ',
  2020. trigger: 'change'
  2021. }
  2022. ],
  2023. quotationResultInformation: [
  2024. {
  2025. required: true,
  2026. message: ' ',
  2027. trigger: 'change'
  2028. }
  2029. ]
  2030. },
  2031. submitResultRules: {
  2032. actualitySubmissionDate: [
  2033. {
  2034. required: true,
  2035. message: ' ',
  2036. trigger: 'change'
  2037. }
  2038. ],
  2039. submissionMethod: [
  2040. {
  2041. required: true,
  2042. message: ' ',
  2043. trigger: 'change'
  2044. }
  2045. ]
  2046. },
  2047. customerResponseRules: {
  2048. actualityReplyDate: [
  2049. {
  2050. required: true,
  2051. message: ' ',
  2052. trigger: 'change'
  2053. }
  2054. ],
  2055. confirmResults: [
  2056. {
  2057. required: true,
  2058. message: ' ',
  2059. trigger: 'change'
  2060. }
  2061. ],
  2062. confirmBy: [
  2063. {
  2064. required: true,
  2065. message: ' ',
  2066. trigger: 'change'
  2067. }
  2068. ]
  2069. },
  2070. // ======== 复选数据集 ========
  2071. quotationSelections: [],
  2072. projectPartListSelections: [],
  2073. // ======== 选中的当前行数据 ========
  2074. quotationCurrentRow: {},
  2075. // ======== 模态框开关控制 ========
  2076. modalFlag: false,
  2077. modalDisableFlag: false,
  2078. enterResultModalFlag: false,
  2079. submitResultModalFlag: false,
  2080. customerResponseModalFlag: false,
  2081. projectPartModelFlag: false,
  2082. contactModelFlag: false,
  2083. priceCheckDetailList:[],
  2084. plmQuotationInformationArr: [],
  2085. ossColumns:[
  2086. {
  2087. userId: this.$store.state.user.name,
  2088. functionId: 103001,
  2089. serialNumber: '103001Table2FileName',
  2090. tableId: '103001Table2',
  2091. tableName: '文件信息表',
  2092. columnProp: 'fileName',
  2093. headerAlign: 'center',
  2094. align: 'center',
  2095. columnLabel: '文件名称',
  2096. columnHidden: false,
  2097. columnImage: false,
  2098. columnSortable: false,
  2099. sortLv: 0,
  2100. status: true,
  2101. fixed: '',
  2102. columnWidth: 140
  2103. },
  2104. {
  2105. userId: this.$store.state.user.name,
  2106. functionId: 103001,
  2107. serialNumber: '103001Table2FileRemark',
  2108. tableId: '103001Table2',
  2109. tableName: '文件信息表',
  2110. columnProp: 'fileRemark',
  2111. headerAlign: 'center',
  2112. align: 'center',
  2113. columnLabel: '备注',
  2114. columnHidden: false,
  2115. columnImage: false,
  2116. columnSortable: false,
  2117. sortLv: 0,
  2118. status: true,
  2119. fixed: '',
  2120. columnWidth: 240
  2121. },
  2122. // {
  2123. // userId: this.$store.state.user.name,
  2124. // functionId: 103001,
  2125. // serialNumber: '103001Table2OrderRef3',
  2126. // tableId: '103001Table2',
  2127. // tableName: '文件信息表',
  2128. // columnProp: 'orderRef3',
  2129. // headerAlign: 'center',
  2130. // align: 'center',
  2131. // columnLabel: '文件描述',
  2132. // columnHidden: false,
  2133. // columnImage: false,
  2134. // columnSortable: false,
  2135. // sortLv: 0,
  2136. // status: true,
  2137. // fixed: '',
  2138. // columnWidth: 120
  2139. // },
  2140. {
  2141. userId: this.$store.state.user.name,
  2142. functionId: 103001,
  2143. serialNumber: '103001Table2CreateDate',
  2144. tableId: '103001Table2',
  2145. tableName: '文件信息表',
  2146. columnProp: 'createDate',
  2147. headerAlign: 'center',
  2148. align: 'center',
  2149. columnLabel: '上传时间',
  2150. columnHidden: false,
  2151. columnImage: false,
  2152. columnSortable: false,
  2153. sortLv: 0,
  2154. status: true,
  2155. fixed: '',
  2156. columnWidth: 140
  2157. },
  2158. {
  2159. userId: this.$store.state.user.name,
  2160. functionId: 103001,
  2161. serialNumber: '103001Table2CreatedBy',
  2162. tableId: '103001Table2',
  2163. tableName: '文件信息表',
  2164. columnProp: 'createBy',
  2165. headerAlign: 'center',
  2166. align: 'center',
  2167. columnLabel: '上传人',
  2168. columnHidden: false,
  2169. columnImage: false,
  2170. columnSortable: false,
  2171. sortLv: 0,
  2172. status: true,
  2173. fixed: '',
  2174. columnWidth: 140
  2175. }
  2176. ],
  2177. }
  2178. },
  2179. mounted() {
  2180. this.$nextTick(() => {
  2181. /*第二个表格高度的动态调整*/
  2182. this.secondHeight = window.innerHeight -this.height;
  2183. })
  2184. },
  2185. created() {
  2186. this.getDataList()
  2187. },
  2188. activated () {
  2189. if (this.$route.params.type === 'tokenLogin') {
  2190. if (this.$route.params.docNo) {
  2191. this.searchData.quotationNo = this.$route.params.docNo
  2192. }
  2193. this.searchData.limit = this.pageSize
  2194. this.searchData.page = this.pageIndex
  2195. quotationInformationSearch(this.searchData).then(({data}) => {
  2196. if (data.code === 0) {
  2197. this.dataList = data.page.list
  2198. this.pageIndex = data.page.currPage
  2199. this.pageSize = data.page.pageSize
  2200. this.totalPage = data.page.totalCount
  2201. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2202. //判断是否全部存在数据
  2203. if (this.dataList.length > 0) {
  2204. //设置选中行
  2205. // this.$refs.quotationTable.setCurrentRow(this.dataList[0])
  2206. // this.refreshCurrentTabTable() //加载当前的页签的table
  2207. this.quotationClickRow(this.dataList[0])
  2208. this.updateModal(this.dataList[0])
  2209. }
  2210. }
  2211. })
  2212. }else {
  2213. if (this.$route.params.quotationNo) {
  2214. this.searchData.quotationNo = this.$route.params.quotationNo
  2215. this.searchData.limit = this.pageSize
  2216. this.searchData.page = this.pageIndex
  2217. quotationInformationSearch(this.searchData).then(({data}) => {
  2218. if (data.code === 0) {
  2219. this.dataList = data.page.list
  2220. this.pageIndex = data.page.currPage
  2221. this.pageSize = data.page.pageSize
  2222. this.totalPage = data.page.totalCount
  2223. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2224. this.searchData.quotationNo = ''
  2225. //判断是否全部存在数据
  2226. if (this.dataList.length > 0) {
  2227. //设置选中行
  2228. // this.$refs.quotationTable.setCurrentRow(this.dataList[0])
  2229. // this.refreshCurrentTabTable() //加载当前的页签的table
  2230. this.quotationClickRow(this.dataList[0])
  2231. // this.updateModal(this.dataList[0])
  2232. }
  2233. }
  2234. })
  2235. }
  2236. }
  2237. },
  2238. methods: {
  2239. // ======== 分页相关方法 ========
  2240. /**
  2241. * 每页数
  2242. * @param val
  2243. */
  2244. sizeChangeHandle(val) {
  2245. this.pageSize = val
  2246. this.pageIndex = 1
  2247. this.getDataList()
  2248. },
  2249. /**
  2250. * 当前页
  2251. * @param val
  2252. */
  2253. currentChangeHandle(val) {
  2254. this.pageIndex = val
  2255. this.getDataList()
  2256. },
  2257. // ======== 复选框操作相关方法 ========
  2258. /**
  2259. * 选中一行
  2260. * @param row
  2261. */
  2262. projectPartClickRow(row) {
  2263. if (this.modalData.flag === '1') {
  2264. this.$refs.projectPartTable.toggleRowSelection(row);
  2265. this.confirmProjectPart();
  2266. }
  2267. },
  2268. /**
  2269. * 多选
  2270. * @param val
  2271. */
  2272. selectionProjectPart(val) {
  2273. this.projectPartListSelections = val
  2274. },
  2275. /**
  2276. * 获取唯一值一般都为 id
  2277. * @param row
  2278. * @returns {*}
  2279. */
  2280. getRowKeys(row) {
  2281. return row.testPartNo;
  2282. },
  2283. /**
  2284. * 未知
  2285. * @returns {boolean}
  2286. */
  2287. selectFlag() {
  2288. return true;
  2289. },
  2290. // ======== 页签切换相关方法 ========
  2291. /**
  2292. * 列表表格选择替换
  2293. * @param tab
  2294. * @param event
  2295. */
  2296. tabClick(tab, event) {
  2297. // 刷新列表数据
  2298. this.refreshCurrentTabTable()
  2299. },
  2300. /**
  2301. * 当前值发生变化的时候修改
  2302. * @param row
  2303. * @param oldRow
  2304. */
  2305. changeCurrentRow(row, oldRow) {
  2306. // 判断是否是获取焦点的事件
  2307. if (row) {
  2308. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  2309. //刷新当前页表
  2310. this.refreshCurrentTabTable()
  2311. }
  2312. },
  2313. /**
  2314. * 刷新页签的table数据
  2315. */
  2316. refreshCurrentTabTable() {
  2317. if (this.activeTable === 'quotation_result') {
  2318. this.getQuotationResult()
  2319. } else if (this.activeTable === 'project_information') {
  2320. this.getProjectInformation()
  2321. } else if (this.activeTable === 'customer_information') {
  2322. this.getCustomerInformation()
  2323. }
  2324. },
  2325. // ======== 列表数据刷新方法 ========
  2326. /**
  2327. * 获取数据列表
  2328. */
  2329. getDataList() {
  2330. this.searchData.limit = this.pageSize
  2331. this.searchData.page = this.pageIndex
  2332. quotationInformationSearch(this.searchData).then(({data}) => {
  2333. if (data.code === 0) {
  2334. this.dataList = data.page.list
  2335. this.pageIndex = data.page.currPage
  2336. this.pageSize = data.page.pageSize
  2337. this.totalPage = data.page.totalCount
  2338. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  2339. //判断是否全部存在数据
  2340. if (this.dataList.length > 0) {
  2341. //设置选中行
  2342. // this.$refs.quotationTable.setCurrentRow(this.dataList[0])
  2343. // this.refreshCurrentTabTable() //加载当前的页签的table
  2344. this.quotationClickRow(this.dataList[0])
  2345. }else {
  2346. this.quotationCurrentRow = {}
  2347. }
  2348. }
  2349. this.dataListLoading = false
  2350. })
  2351. },
  2352. /**
  2353. * 获取询价结果列表
  2354. */
  2355. getQuotationResult() {
  2356. let tempData = {
  2357. site: this.$store.state.user.site,
  2358. quotationNo: this.quotationCurrentRow.quotationNo
  2359. }
  2360. // 询价结果对象
  2361. quotationResultSearch(tempData).then(({data}) => {
  2362. if (data && data.code === 0) {
  2363. this.quotationResultData = data.rows[0]
  2364. } else {
  2365. this.quotationResultData = {}
  2366. }
  2367. })
  2368. // 附件列表
  2369. this.getFileContentData()
  2370. },
  2371. /**
  2372. * 获取项目信息
  2373. */
  2374. getProjectInformation() {
  2375. let tempData = {
  2376. site: this.$store.state.user.site,
  2377. projectId: this.quotationCurrentRow.projectId
  2378. }
  2379. // 询价结果对象
  2380. getProjectInformation(tempData).then(({data}) => {
  2381. if (data && data.code === 0) {
  2382. this.projectInformationData = data.rows[0]
  2383. } else {
  2384. this.projectInformationData = {}
  2385. }
  2386. })
  2387. },
  2388. /**
  2389. * 获取客户信息
  2390. */
  2391. getCustomerInformation() {
  2392. let tempData = {
  2393. site: this.$store.state.user.site,
  2394. customerNo: this.quotationCurrentRow.customerNo
  2395. }
  2396. // 询价结果对象
  2397. getCustomerInformation(tempData).then(({data}) => {
  2398. if (data && data.code === 0) {
  2399. this.customerInformationData = data.rows[0]
  2400. } else {
  2401. this.customerInformationData = {}
  2402. }
  2403. })
  2404. },
  2405. // ======== 新增/编辑模态框 ========
  2406. /**
  2407. * 询价信息新增模态框
  2408. */
  2409. addModal() {
  2410. this.modalData = {
  2411. flag: '1',
  2412. title: '询价新增',
  2413. site: this.$store.state.user.site,
  2414. quotationNo: '',
  2415. customerNo: '',
  2416. customerDesc: '',
  2417. deliveryTerms: '',
  2418. sourcing:'',
  2419. quoteType: '',
  2420. projectId: '',
  2421. projectName: '',
  2422. finalCustomerId: '',
  2423. finalCustomerName: '',
  2424. tracker: '',
  2425. trackerName: '',
  2426. quoter: '',
  2427. quoterName: '',
  2428. customerQuoteNo: '',
  2429. quotationStatus: '草稿',
  2430. testPartNo: '',
  2431. partName: '',
  2432. priorityLevel: '',
  2433. requiredCompletionDate: '',
  2434. remark: '',
  2435. technicalConsiderations: '',
  2436. customerResponsiblePerson: '',
  2437. customerResponsiblePersonPhone: '',
  2438. nextToDo: '',
  2439. actualityQuotationDate: '',
  2440. quotationResultInformation: '',
  2441. actualitySubmissionDate: '',
  2442. submissionMethod: '',
  2443. submissionRemark: '',
  2444. actualityReplyDate: '',
  2445. confirmResults: '',
  2446. confirmBy: '',
  2447. confirmInformation: '',
  2448. quotationResultStatus: 'B',
  2449. createBy: this.$store.state.user.name
  2450. }
  2451. this.modalDisableFlag = false
  2452. this.modalFlag = true
  2453. },
  2454. /**
  2455. * 询价信息编辑模态框
  2456. * @param row
  2457. */
  2458. async updateModal(row) {
  2459. await this.getNodeAuthority(row)
  2460. this.modalData = {
  2461. flag: '2',
  2462. title: '询价编辑-' + row.quotationNo,
  2463. deliveryTerms: row.deliveryTerms,
  2464. quoteType: row.quoteType,
  2465. site: row.site,
  2466. quotationNo: row.quotationNo,
  2467. customerNo: row.customerNo,
  2468. customerDesc: row.customerDesc,
  2469. projectId: row.projectId,
  2470. projectName: row.projectName,
  2471. finalCustomerId: row.finalCustomerId,
  2472. finalCustomerName: row.finalCustomerName,
  2473. tracker: row.tracker,
  2474. trackerName: row.trackerName,
  2475. quoter: row.quoter,
  2476. sourcing:row.sourcing,
  2477. quoterName: row.quoterName,
  2478. customerQuoteNo: row.customerQuoteNo,
  2479. quotationStatus: row.quotationStatus,
  2480. testPartNo: row.testPartNo,
  2481. partName: row.partName,
  2482. priorityLevel: row.priorityLevel,
  2483. requiredCompletionDate: row.requiredCompletionDate,
  2484. remark: row.remark,
  2485. technicalConsiderations: row.technicalConsiderations,
  2486. customerResponsiblePerson: row.customerResponsiblePerson,
  2487. customerResponsiblePersonPhone: row.customerResponsiblePersonPhone,
  2488. nextToDo: row.nextToDo,
  2489. actualityQuotationDate: row.actualityQuotationDate,
  2490. quotationResultInformation: row.quotationResultInformation,
  2491. actualitySubmissionDate: row.actualitySubmissionDate,
  2492. submissionMethod: row.submissionMethod,
  2493. submissionRemark: row.submissionRemark,
  2494. actualityReplyDate: row.actualityReplyDate,
  2495. confirmResults: row.confirmResults,
  2496. confirmBy: row.confirmBy,
  2497. confirmInformation: row.confirmInformation,
  2498. quotationResultStatus: row.quotationResultStatus,
  2499. updateBy: this.$store.state.user.name,
  2500. quotationAmount:row.quotationAmount,
  2501. nodeConclusion: '',
  2502. stepId: row.stepId,
  2503. rejectFlag: row.rejectFlag,
  2504. rejectStepId: row.rejectStepId,
  2505. isReject: row.isReject
  2506. }
  2507. this.priceCheckDetail = row.priceCheckDetail
  2508. this.modalDisableFlag = true
  2509. this.modalFlag = true
  2510. },
  2511. // ======== 新增/编辑/删除方法 ========
  2512. /**
  2513. * 获取产品列表
  2514. */
  2515. getProjectPartList() {
  2516. if (!this.modalData.projectId) {
  2517. this.$message.warning("请选择项目编码!")
  2518. return
  2519. }
  2520. // 先清空缓存选中
  2521. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2522. // 拿到选中的产品编号
  2523. let projectPartList = this.modalData.testPartNo.split(';')
  2524. // 获得查询
  2525. this.projectPartData.projectId = this.modalData.projectId;
  2526. // 查询所有产品
  2527. getProjectPartList(this.projectPartData).then(({data}) => {
  2528. if (data && data.code === 0) {
  2529. this.projectPartList = data.rows
  2530. this.projectPartList.forEach(val => {
  2531. // 回显选中的产品
  2532. if (projectPartList.includes(val.testPartNo)) {
  2533. this.$nextTick(() => this.$refs.projectPartTable.toggleRowSelection(val, true))
  2534. }
  2535. })
  2536. } else {
  2537. this.$alert(data.msg, '错误', {
  2538. confirmButtonText: '确定'
  2539. })
  2540. }
  2541. })
  2542. },
  2543. /**
  2544. * 确认多选产品
  2545. */
  2546. confirmProjectPart() {
  2547. if (this.projectPartListSelections.length === 0) {
  2548. // 先清空缓存选中
  2549. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  2550. // 拿到选中的产品编号
  2551. this.modalData.testPartNo = ''
  2552. this.modalData.partName = ''
  2553. return
  2554. }
  2555. this.modalData.testPartNo = ''
  2556. this.modalData.partName = ''
  2557. for (let i = 0; i < this.projectPartListSelections.length; i++) {
  2558. this.modalData.testPartNo = this.modalData.testPartNo + ";" + this.projectPartListSelections[i].testPartNo
  2559. this.modalData.partName = this.modalData.partName + ";" + this.projectPartListSelections[i].partName
  2560. }
  2561. this.modalData.testPartNo = this.modalData.testPartNo.substring(1)
  2562. this.modalData.partName = this.modalData.partName.substring(1)
  2563. },
  2564. /**
  2565. * 客户信息新增/编辑
  2566. */
  2567. saveData() {
  2568. this.$refs.saveDataForm.validate((valid) => {
  2569. if (!valid) {
  2570. if (this.modalData.customerNo === '' || this.modalData.customerNo == null) {
  2571. this.$message.warning('请选择客户编码!')
  2572. return
  2573. }
  2574. if (this.modalData.customerDesc === '' || this.modalData.customerDesc == null) {
  2575. this.$message.warning('请选择客户名称!')
  2576. return
  2577. }
  2578. if ((this.modalData.tracker === '' || this.modalData.tracker == null) && this.modalData.sourcing === 'Y') {
  2579. this.$message.warning('请选择采购专员编码!')
  2580. return
  2581. }
  2582. if ((this.modalData.trackerName === '' || this.modalData.trackerName == null) && this.modalData.sourcing !== 'Y') {
  2583. this.$message.warning('请选择采购专员名称!')
  2584. return
  2585. }
  2586. if (this.modalData.projectId === '' || this.modalData.projectId == null) {
  2587. this.$message.warning('请选择项目编码!')
  2588. return
  2589. }
  2590. if (this.modalData.projectName === '' || this.modalData.projectName == null) {
  2591. this.$message.warning('请选择项目名称!')
  2592. return
  2593. }
  2594. if (this.modalData.quoter === '' || this.modalData.quoter == null) {
  2595. this.$message.warning('请选择询价专员编码!')
  2596. return
  2597. }
  2598. if (this.modalData.quoterName === '' || this.modalData.quoterName == null) {
  2599. this.$message.warning('请选择询价专员名称!')
  2600. return
  2601. }
  2602. if (this.modalData.priorityLevel === '' || this.modalData.priorityLevel == null) {
  2603. this.$message.warning('请选择优先等级!')
  2604. return
  2605. }
  2606. if (this.modalData.requiredCompletionDate === '' || this.modalData.requiredCompletionDate == null) {
  2607. this.$message.warning('请输入要求完成日期!')
  2608. return
  2609. }
  2610. if (this.modalData.deliveryTerms === '' || this.modalData.deliveryTerms == null) {
  2611. this.$message.warning('请选择Delivery Terms!')
  2612. return
  2613. }
  2614. if (this.modalData.quoteType === '' || this.modalData.quoteType == null) {
  2615. this.$message.warning('请选择Quote Type!')
  2616. return
  2617. }
  2618. } else {
  2619. if (this.projectPartListSelections.length === 0) {
  2620. this.$message.warning('请选择物料信息!')
  2621. return
  2622. }
  2623. this.confirmProjectPart();
  2624. if (this.modalData.flag === '1') {
  2625. quotationInformationSave(this.modalData).then(({data}) => {
  2626. if (data && data.code === 0) {
  2627. this.getDataList()
  2628. this.modalFlag = false
  2629. this.$message({
  2630. message: '操作成功',
  2631. type: 'success',
  2632. duration: 1500,
  2633. onClose: () => {
  2634. }
  2635. })
  2636. } else {
  2637. this.$alert(data.msg, '错误', {
  2638. confirmButtonText: '确定'
  2639. })
  2640. }
  2641. })
  2642. } else {
  2643. quotationInformationEdit(this.modalData).then(({data}) => {
  2644. if (data && data.code === 0) {
  2645. this.getDataList()
  2646. this.modalFlag = false
  2647. this.$message({
  2648. message: '操作成功',
  2649. type: 'success',
  2650. duration: 1500,
  2651. onClose: () => {
  2652. }
  2653. })
  2654. } else {
  2655. this.$alert(data.msg, '错误', {
  2656. confirmButtonText: '确定'
  2657. })
  2658. }
  2659. })
  2660. }
  2661. }
  2662. })
  2663. },
  2664. /**
  2665. * 询价信息删除
  2666. */
  2667. delModal() {
  2668. if (this.quotationSelections.length === 0) {
  2669. this.$message.warning('请勾选要删除的询价信息!')
  2670. return
  2671. }
  2672. this.$confirm(`是否删除这 ` + this.quotationSelections.length + ` 条询价信息?`, '提示', {
  2673. confirmButtonText: '确定',
  2674. cancelButtonText: '取消',
  2675. type: 'warning'
  2676. }).then(() => {
  2677. let tempData = {
  2678. informationList: this.quotationSelections
  2679. }
  2680. quotationInformationDelete(tempData).then(({data}) => {
  2681. if (data && data.code === 0) {
  2682. this.getDataList()
  2683. this.quotationSelections = []
  2684. this.$message({
  2685. message: '操作成功',
  2686. type: 'success',
  2687. duration: 1500,
  2688. onClose: () => {
  2689. }
  2690. })
  2691. } else {
  2692. this.$alert(data.msg, '错误', {
  2693. confirmButtonText: '确定'
  2694. })
  2695. }
  2696. })
  2697. }).catch(() => {
  2698. })
  2699. },
  2700. // ======== 列表操作方法 ========
  2701. /**
  2702. * 单机选中询价信息
  2703. * @param row
  2704. */
  2705. quotationClickRow(row) {
  2706. // this.$refs.quotationTable.toggleRowSelection(row)
  2707. this.quotationCurrentRow = JSON.parse(JSON.stringify(row))
  2708. this.quotationDetailData = row;
  2709. },
  2710. getPriceCheckProperties() {
  2711. let params = {
  2712. site: this.quotationCurrentRow.site,
  2713. quotationNo: this.quotationCurrentRow.quotationNo
  2714. }
  2715. getPriceCheckPropertiesList(params).then(({data}) => {
  2716. if (data && data.code === 0) {
  2717. this.priceCheckPropertiesList = data.rows
  2718. } else {
  2719. this.$message.warning(data.msg)
  2720. }
  2721. }).catch((error) => {
  2722. this.$message.error(error)
  2723. })
  2724. },
  2725. /**
  2726. * 复选询价信息
  2727. * @param val
  2728. */
  2729. selectionQuotation(val) {
  2730. this.quotationSelections = val
  2731. this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
  2732. },
  2733. // ======== 询价结果相关方法 ========
  2734. /**
  2735. * 封装录入方法
  2736. */
  2737. packQuotationResultModal() {
  2738. // 重置对象
  2739. this.enterResultData = {
  2740. site: this.$store.state.user.site,
  2741. quotationNo: '',
  2742. actualityQuotationDate: new Date(),
  2743. quotationResultInformation: '',
  2744. quotationResultStatus: 'E',
  2745. fileContentList: [],
  2746. updateBy: this.$store.state.user.name
  2747. }
  2748. // 获得选中的询价号
  2749. // if (this.quotationSelections.length > 0) {
  2750. // this.quotationSelections.forEach(val => {
  2751. // this.enterResultData.quotationNo += ';' + val.quotationNo
  2752. // })
  2753. // this.enterResultData.quotationNo = this.enterResultData.quotationNo.substring(1)
  2754. // } else {
  2755. // this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2756. // }
  2757. this.enterResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2758. // // 获得这些询价号的全部附件
  2759. // this.getFileContentList()
  2760. this.enterResultModalFlag = true
  2761. },
  2762. /**
  2763. * 录入询价结果
  2764. */
  2765. quotationResultModal() {
  2766. // // 如果有选中询价单
  2767. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2768. // let tempData = {
  2769. // currentStatus: 'C',
  2770. // informationList: this.quotationSelections,
  2771. // }
  2772. // // 检查询价单状态
  2773. // checkQuotationStatus(tempData).then(({data}) => {
  2774. // if (data && data.code === 0) {
  2775. // if (data.flag === 1) { // 状态一致
  2776. // this.packQuotationResultModal()
  2777. // } else { // 状态不同
  2778. // this.$message.warning('选中的询价单进度有误,请确认!')
  2779. // }
  2780. // } else {
  2781. // this.$alert(data.msg, '错误', {
  2782. // confirmButtonText: '确定'
  2783. // })
  2784. // }
  2785. // })
  2786. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  2787. // this.packQuotationResultModal()
  2788. // }
  2789. this.packQuotationResultModal()
  2790. },
  2791. /**
  2792. * 保存询价结果
  2793. */
  2794. saveQuotationResult() {
  2795. if (this.enterResultData.actualityQuotationDate === '' || this.enterResultData.actualityQuotationDate == null) {
  2796. this.$message.warning('请选择实际询价日期!')
  2797. return
  2798. }
  2799. if (this.enterResultData.quotationResultInformation === '' || this.enterResultData.quotationResultInformation == null) {
  2800. this.$message.warning('请填写询价结果信息!')
  2801. return
  2802. }
  2803. // if (this.quotationSelections.length > 1) {
  2804. // this.$confirm(`是否录入多条询价结果?`, '提示', {
  2805. // confirmButtonText: '确定',
  2806. // cancelButtonText: '取消',
  2807. // type: 'warning'
  2808. // }).then(() => {
  2809. // saveQuotationResult(this.enterResultData).then(({data}) => {
  2810. // if (data && data.code === 0) {
  2811. // this.getDataList()
  2812. // this.enterResultModalFlag = false
  2813. // this.$message({
  2814. // message: '操作成功',
  2815. // type: 'success',
  2816. // duration: 1500,
  2817. // onClose: () => {
  2818. // }
  2819. // })
  2820. // } else {
  2821. // this.$alert(data.msg, '错误', {
  2822. // confirmButtonText: '确定'
  2823. // })
  2824. // }
  2825. // })
  2826. // }).catch(() => {
  2827. // })
  2828. // } else {
  2829. saveQuotationResult(this.enterResultData).then(({data}) => {
  2830. if (data && data.code === 0) {
  2831. this.getDataList()
  2832. this.enterResultModalFlag = false
  2833. this.$message({
  2834. message: '操作成功',
  2835. type: 'success',
  2836. duration: 1500,
  2837. onClose: () => {
  2838. }
  2839. })
  2840. } else {
  2841. this.$alert(data.msg, '错误', {
  2842. confirmButtonText: '确定'
  2843. })
  2844. }
  2845. })
  2846. // }
  2847. },
  2848. /**
  2849. * 封装提交方法
  2850. */
  2851. packSubmitQuotationModal() {
  2852. this.submitResultData = {
  2853. site: this.$store.state.user.site,
  2854. quotationNo: '',
  2855. actualitySubmissionDate: new Date(),
  2856. submissionMethod: '',
  2857. submissionRemark: '',
  2858. quotationResultStatus: 'S',
  2859. updateBy: this.$store.state.user.name
  2860. }
  2861. // 获得选中的询价号
  2862. // if (this.quotationSelections.length > 0) {
  2863. // this.quotationSelections.forEach(val => {
  2864. // this.submitResultData.quotationNo += ';' + val.quotationNo
  2865. // })
  2866. // this.submitResultData.quotationNo = this.submitResultData.quotationNo.substring(1)
  2867. // } else {
  2868. // this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2869. // }
  2870. this.submitResultData.quotationNo = this.quotationCurrentRow.quotationNo
  2871. this.submitResultModalFlag = true
  2872. },
  2873. /**
  2874. * 提交客户询价
  2875. */
  2876. submitQuotationModal() {
  2877. // // 如果有选中询价单
  2878. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2879. // let tempData = {
  2880. // currentStatus: 'E',
  2881. // informationList: this.quotationSelections,
  2882. // }
  2883. // // 检查询价单状态
  2884. // checkQuotationStatus(tempData).then(({data}) => {
  2885. // if (data && data.code === 0) {
  2886. // if (data.flag === 1) { // 状态一致
  2887. // this.packSubmitQuotationModal()
  2888. // } else { // 状态不同
  2889. // this.$message.warning('选中的询价单进度有误,请确认!')
  2890. // }
  2891. // } else {
  2892. // this.$alert(data.msg, '错误', {
  2893. // confirmButtonText: '确定'
  2894. // })
  2895. // }
  2896. // })
  2897. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  2898. // this.packSubmitQuotationModal()
  2899. // }
  2900. this.packSubmitQuotationModal()
  2901. },
  2902. /**
  2903. * 保存提交结果
  2904. */
  2905. saveSubmitResult() {
  2906. if (this.submitResultData.actualitySubmissionDate === '' || this.submitResultData.actualitySubmissionDate == null) {
  2907. this.$message.warning('请选择实际提交客户日期!')
  2908. return
  2909. }
  2910. if (this.submitResultData.submissionMethod === '' || this.submitResultData.submissionMethod == null) {
  2911. this.$message.warning('请选择提交方式!')
  2912. return
  2913. }
  2914. // if (this.quotationSelections.length > 1) {
  2915. // this.$confirm(`是否提交多条客户询价?`, '提示', {
  2916. // confirmButtonText: '确定',
  2917. // cancelButtonText: '取消',
  2918. // type: 'warning'
  2919. // }).then(() => {
  2920. // saveSubmitResult(this.submitResultData).then(({data}) => {
  2921. // if (data && data.code === 0) {
  2922. // this.getDataList()
  2923. // this.submitResultModalFlag = false
  2924. // this.$message({
  2925. // message: '操作成功',
  2926. // type: 'success',
  2927. // duration: 1500,
  2928. // onClose: () => {
  2929. // }
  2930. // })
  2931. // } else {
  2932. // this.$alert(data.msg, '错误', {
  2933. // confirmButtonText: '确定'
  2934. // })
  2935. // }
  2936. // })
  2937. // }).catch(() => {
  2938. // })
  2939. // } else {
  2940. saveSubmitResult(this.submitResultData).then(({data}) => {
  2941. if (data && data.code === 0) {
  2942. this.getDataList()
  2943. this.submitResultModalFlag = false
  2944. this.$message({
  2945. message: '操作成功',
  2946. type: 'success',
  2947. duration: 1500,
  2948. onClose: () => {
  2949. }
  2950. })
  2951. } else {
  2952. this.$alert(data.msg, '错误', {
  2953. confirmButtonText: '确定'
  2954. })
  2955. }
  2956. })
  2957. // }
  2958. },
  2959. /**
  2960. * 封装回复方法
  2961. */
  2962. packCustomerResponseModal() {
  2963. this.customerResponseData = {
  2964. site: this.$store.state.user.site,
  2965. quotationNo: '',
  2966. actualityReplyDate: new Date(),
  2967. confirmResults: '接受',
  2968. confirmBy: '',
  2969. confirmInformation: '',
  2970. quotationResultStatus: 'R',
  2971. updateBy: this.$store.state.user.name
  2972. }
  2973. // 获得选中的询价号
  2974. // if (this.quotationSelections.length > 0) {
  2975. // this.quotationSelections.forEach(val => {
  2976. // this.customerResponseData.quotationNo += ';' + val.quotationNo
  2977. // })
  2978. // this.customerResponseData.quotationNo = this.customerResponseData.quotationNo.substring(1)
  2979. // } else {
  2980. // this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
  2981. // }
  2982. this.customerResponseData.quotationNo = this.quotationCurrentRow.quotationNo
  2983. this.customerResponseModalFlag = true
  2984. },
  2985. /**
  2986. * 客户回复
  2987. */
  2988. customerResponseModal() {
  2989. // // 如果有选中询价单
  2990. // if (this.quotationSelections != null && this.quotationSelections.length > 0) {
  2991. // let tempData = {
  2992. // currentStatus: 'S',
  2993. // informationList: this.quotationSelections,
  2994. // }
  2995. // // 检查询价单状态
  2996. // checkQuotationStatus(tempData).then(({data}) => {
  2997. // if (data && data.code === 0) {
  2998. // if (data.flag === 1) { // 状态一致
  2999. // this.packCustomerResponseModal()
  3000. // } else { // 状态不同
  3001. // this.$message.warning('选中的询价单进度有误,请确认!')
  3002. // }
  3003. // } else {
  3004. // this.$alert(data.msg, '错误', {
  3005. // confirmButtonText: '确定'
  3006. // })
  3007. // }
  3008. // })
  3009. // } else { // 没有选中询价单,则根据当前点击行询价单操作
  3010. // this.packCustomerResponseModal()
  3011. // }
  3012. this.packCustomerResponseModal()
  3013. },
  3014. /**
  3015. * 保存客户回复
  3016. */
  3017. saveCustomerResponse() {
  3018. if (this.customerResponseData.actualityReplyDate === '' || this.customerResponseData.actualityReplyDate == null) {
  3019. this.$message.warning('请选择实际回复日期!')
  3020. return
  3021. }
  3022. if (this.customerResponseData.confirmResults === '' || this.customerResponseData.confirmResults == null) {
  3023. this.$message.warning('请选择客户确认结果!')
  3024. return
  3025. }
  3026. if (this.customerResponseData.confirmBy === '' || this.customerResponseData.confirmBy == null) {
  3027. this.$message.warning('请填写客户确认人!')
  3028. return
  3029. }
  3030. // if (this.quotationSelections.length > 1) {
  3031. // this.$confirm(`是否提交多条客户回复?`, '提示', {
  3032. // confirmButtonText: '确定',
  3033. // cancelButtonText: '取消',
  3034. // type: 'warning'
  3035. // }).then(() => {
  3036. // saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3037. // if (data && data.code === 0) {
  3038. // this.getDataList()
  3039. // this.customerResponseModalFlag = false
  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. // } else {
  3056. saveCustomerResponse(this.customerResponseData).then(({data}) => {
  3057. if (data && data.code === 0) {
  3058. this.getDataList()
  3059. this.customerResponseModalFlag = false
  3060. this.$message({
  3061. message: '操作成功',
  3062. type: 'success',
  3063. duration: 1500,
  3064. onClose: () => {
  3065. }
  3066. })
  3067. } else {
  3068. this.$alert(data.msg, '错误', {
  3069. confirmButtonText: '确定'
  3070. })
  3071. }
  3072. })
  3073. // }
  3074. },
  3075. // ======== 询价单附件的相关方法 ========
  3076. /**
  3077. * 获取询价单附件列表
  3078. */
  3079. getFileContentData() {
  3080. let currentData = {
  3081. orderRef1: this.$store.state.user.site,
  3082. orderRef2: this.quotationCurrentRow.quotationNo
  3083. }
  3084. getFileContentList(currentData).then(({data}) => {
  3085. if (data && data.code === 0) {
  3086. this.fileContentList = data.rows
  3087. } else {
  3088. this.fileContentList = []
  3089. }
  3090. })
  3091. },
  3092. // /**
  3093. // * 获得这些询价号的全部附件
  3094. // */
  3095. // getFileContentList () {
  3096. // let currentData = {
  3097. // orderRef1: this.$store.state.user.site,
  3098. // orderRef2: this.enterResultData.quotationNo
  3099. // }
  3100. // getFileContentList(currentData).then(({data}) => {
  3101. // if (data && data.code === 0) {
  3102. // this.enterResultData.fileContentList = data.rows
  3103. // } else {
  3104. // this.enterResultData.fileContentList = []
  3105. // }
  3106. // })
  3107. // },
  3108. /**
  3109. * 上传文件
  3110. */
  3111. uploadFile() {
  3112. let currentData = {
  3113. titleCon: '询价附件上传',
  3114. site: this.$store.state.user.site,
  3115. createBy: this.$store.state.user.name,
  3116. quotationNo: this.enterResultData.quotationNo,
  3117. fileRemark: '',
  3118. folder: 'quotationFile',
  3119. // options: []
  3120. }
  3121. // let num = 0
  3122. // let arr = this.enterResultData.quotationNo.split(';')
  3123. // arr.forEach(val => {
  3124. // currentData.options.push({key: num++, value: val})
  3125. // })
  3126. //打开组件 去做新增业务
  3127. this.$nextTick(() => {
  3128. this.$refs.quotationUploadFile.init(currentData);
  3129. })
  3130. },
  3131. /**
  3132. * 文件删除
  3133. * @param row
  3134. */
  3135. deleteFile(row) {
  3136. this.$confirm('确定要删除此文件?', '提示', {
  3137. confirmButtonText: '确定',
  3138. cancelButtonText: '取消',
  3139. type: 'warning'
  3140. }).then(() => {
  3141. deleteQuotationFile(row).then(({data}) => {
  3142. if (data && data.code === 0) {
  3143. this.getFileContentList();
  3144. this.$message({
  3145. message: '操作成功',
  3146. type: 'success',
  3147. duration: 1500,
  3148. onClose: () => {
  3149. }
  3150. })
  3151. } else {
  3152. this.$alert(data.msg, '错误', {
  3153. confirmButtonText: '确定'
  3154. })
  3155. }
  3156. })
  3157. }).catch(() => {
  3158. })
  3159. },
  3160. /**
  3161. * 文件下载
  3162. * @param row
  3163. */
  3164. downloadFile(row) {
  3165. downLoadQuotationFile(row).then(({data}) => {
  3166. // 不限制文件下载类型
  3167. const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'})
  3168. // 下载文件名称
  3169. const fileName = row.fileName
  3170. // a标签下载
  3171. const linkNode = document.createElement('a')
  3172. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3173. linkNode.style.display = 'none'
  3174. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3175. document.body.appendChild(linkNode)
  3176. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3177. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3178. document.body.removeChild(linkNode)
  3179. })
  3180. },
  3181. // 双击选择负责人
  3182. getContactData(row) {
  3183. this.modalData.customerResponsiblePerson = row.contactName
  3184. this.modalData.customerResponsiblePersonPhone = row.contactPhoneNumber1
  3185. this.contactModelFlag = false
  3186. },
  3187. /**
  3188. * 获取该客户的客户负责人
  3189. */
  3190. getCustomerContactList() {
  3191. let tempData = {
  3192. site: this.$store.state.user.site,
  3193. customerNo: this.modalData.customerNo
  3194. }
  3195. customerContactSearch(tempData).then(({data}) => {
  3196. if (data && data.code === 0) {
  3197. this.contactList = data.rows
  3198. this.contactModelFlag = true
  3199. } else {
  3200. this.contactList = []
  3201. }
  3202. });
  3203. },
  3204. // ======== chooseList相关方法 ========
  3205. /**
  3206. * 获取基础数据列表S
  3207. * @param val
  3208. * @param type
  3209. */
  3210. getBaseList(val, type) {
  3211. this.tagNo = val
  3212. this.tagNo1 = type
  3213. this.$nextTick(() => {
  3214. let strVal = ''
  3215. let conSql = ''
  3216. if (val === 102) {
  3217. if (type === 1) {
  3218. strVal = this.modalData.customerNo
  3219. }
  3220. }
  3221. if (val === 103) {
  3222. if (type === 1) {
  3223. strVal = this.modalData.tracker
  3224. }
  3225. if (type === 2) {
  3226. strVal = this.modalData.quoter
  3227. }
  3228. }
  3229. if (val === 104) {
  3230. if (type === 1) {
  3231. strVal = this.modalData.projectId
  3232. }
  3233. }
  3234. if (val === 2000) {
  3235. strVal = this.modalData.trackerName
  3236. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3237. }
  3238. if (val === 2002) {
  3239. strVal = this.modalData.quoterName
  3240. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3241. }
  3242. this.$refs.baseList.init(val, strVal, conSql)
  3243. })
  3244. },
  3245. /**
  3246. * 列表方法的回调
  3247. * @param val
  3248. */
  3249. getBaseData(val) {
  3250. if (this.tagNo === 102) {
  3251. if (this.tagNo1 === 1) {
  3252. if (val.Customer_no === this.modalData.customerNo) {
  3253. return
  3254. }
  3255. this.modalData.customerNo = val.Customer_no
  3256. this.modalData.customerDesc = val.Customer_desc
  3257. this.modalData.projectId = ''
  3258. this.modalData.projectName = ''
  3259. this.projectPartList = []
  3260. }
  3261. }
  3262. if (this.tagNo === 103) {
  3263. if (this.tagNo1 === 1) {
  3264. this.modalData.tracker = val.username
  3265. this.modalData.trackerName = val.user_display
  3266. }
  3267. if (this.tagNo1 === 2) {
  3268. this.modalData.quoter = val.username
  3269. this.modalData.quoterName = val.user_display
  3270. }
  3271. }
  3272. if (this.tagNo === 104) {
  3273. if (this.tagNo1 === 1) {
  3274. this.modalData.projectId = val.project_id
  3275. this.modalData.projectName = val.project_name
  3276. }
  3277. }
  3278. if (this.tagNo === 2000) {
  3279. this.modalData.tracker = val.username
  3280. this.modalData.trackerName = val.user_display
  3281. }
  3282. if (this.tagNo === 2002) {
  3283. this.modalData.quoter = val.username
  3284. this.modalData.quoterName = val.user_display
  3285. }
  3286. },
  3287. // ======== 导出相关方法 ========
  3288. /**
  3289. * 导出excel
  3290. */
  3291. async createExportData() {
  3292. this.searchData.limit = -1
  3293. this.searchData.page = 1
  3294. await quotationInformationSearch(this.searchData).then(({data}) => {
  3295. this.resultList = data.page.list
  3296. })
  3297. return this.resultList
  3298. },
  3299. startDownload() {
  3300. },
  3301. finishDownload() {
  3302. },
  3303. fields() {
  3304. let json = '{'
  3305. this.columnList.forEach((item, index) => {
  3306. if (index == this.columnList.length - 1) {
  3307. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3308. } else {
  3309. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3310. }
  3311. })
  3312. json += '}'
  3313. let s = eval('(' + json + ')')
  3314. return s
  3315. },
  3316. // 保存弹框关闭事件
  3317. closeSaveDataDialog() {
  3318. this.activeTab='part';
  3319. this.$refs.saveDataForm.resetFields(); // 先清空缓存选中
  3320. this.$nextTick(() => this.$refs.projectPartTable.clearSelection())
  3321. // 拿到选中的产品编号
  3322. this.modalData.testPartNo = ''
  3323. this.modalData.partName = ''
  3324. this.projectPartData = {
  3325. site: this.$store.state.user.site,
  3326. testPartNo: '',
  3327. partName: '',
  3328. projectId: '',
  3329. }
  3330. this.priceCheckDetail = JSON.parse(JSON.stringify(this.copyPriceCheckDetail))
  3331. if (this.modalData.flag === '1'){
  3332. this.$refs.saveDetailForm.resetFields();
  3333. }
  3334. },
  3335. // 保存弹框打开事件
  3336. openSaveDataDialog() {
  3337. if (!this.modalData.projectId) {
  3338. this.projectPartList = [];
  3339. return
  3340. }
  3341. this.getProjectPartList()
  3342. },
  3343. // 查询searchProjectInfoList
  3344. searchProjectInfoList() {
  3345. this.projectList = [];
  3346. this.searchProjectData.customerId = this.modalData.customerNo
  3347. searchProjectInfoList(this.searchProjectData).then(({data}) => {
  3348. if (data && data.code === 0) {
  3349. this.projectList = data.rows
  3350. } else {
  3351. this.projectList = []
  3352. }
  3353. }).catch((error) => {
  3354. this.$message.error('查询项目信息失败')
  3355. })
  3356. },
  3357. closeProjectInfoDialog() {
  3358. this.$refs.closeProjectInfoForm.resetFields();
  3359. this.searchProjectData = {
  3360. site: this.$store.state.user.site,
  3361. projectId: undefined,
  3362. projectName: undefined,
  3363. customerId: undefined,
  3364. }
  3365. },
  3366. projectClickRow(row) {
  3367. this.modalData.projectId = row.projectId
  3368. this.modalData.projectName = row.projectName
  3369. this.modalData.finalCustomerId = row.finalCustomerId
  3370. this.modalData.finalCustomerName = row.finalCustomerName
  3371. this.getProjectPartList()
  3372. this.chooseProjectListFlag = false
  3373. },
  3374. checkSelectable(row, index) {
  3375. if (this.modalData.flag === '1') {
  3376. return true
  3377. } else {
  3378. return false
  3379. }
  3380. },
  3381. rowStyle({row}) {
  3382. if (this.quotationCurrentRow.quotationNo === row.quotationNo) {
  3383. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3384. }
  3385. },
  3386. partRowStyle({row}) {
  3387. if (this.modalData.testPartNo === row.testPartNo) {
  3388. return {'background-color': '#E8F7F6', cursor: 'pointer'};
  3389. }
  3390. },
  3391. updateModalStatus(row, status) {
  3392. this.$confirm(`是否确认下达?`, '提示', {
  3393. confirmButtonText: '确定',
  3394. cancelButtonText: '取消',
  3395. type: 'warning'
  3396. }).then(() => {
  3397. let params = JSON.parse(JSON.stringify(row))
  3398. params.quotationResultStatus = status;
  3399. params.quotationStatus = '下达';
  3400. params.userName = this.$store.state.user.name
  3401. params.menuId = this.$route.meta.menuId
  3402. quotationInformationEditStatus(params).then(({data}) => {
  3403. if (data && data.code === 0) {
  3404. this.$message.success('询价单已下达')
  3405. this.getDataList()
  3406. } else {
  3407. this.$message.warning(data.msg)
  3408. }
  3409. }).catch((error) => {
  3410. this.$message.error(error)
  3411. })
  3412. })
  3413. },
  3414. getPriceCheckDetailList(){
  3415. let params = {
  3416. site:this.quotationCurrentRow.site,
  3417. quotationNo:this.quotationCurrentRow.quotationNo
  3418. }
  3419. getPriceCheckDetailList(params).then(({data}) => {
  3420. if (data && data.code === 0){
  3421. this.priceCheckDetailList = data.rows
  3422. }else {
  3423. this.$message.warning(data.msg)
  3424. }
  3425. }).catch((error)=>{
  3426. this.$message.error(error)
  3427. })
  3428. },
  3429. // 同意提交
  3430. agreeSubmit () {
  3431. this.$confirm(`是否确认提交?`, '提示', {
  3432. confirmButtonText: '确定',
  3433. cancelButtonText: '取消',
  3434. type: 'warning'
  3435. }).then(() => {
  3436. this.modalData.nodeConclusion = 'Y'
  3437. this.submitData()
  3438. })
  3439. },
  3440. // 驳回提交
  3441. rejectSubmit () {
  3442. this.$confirm(`是否确认驳回?`, '提示', {
  3443. confirmButtonText: '确定',
  3444. cancelButtonText: '取消',
  3445. type: 'warning'
  3446. }).then(() => {
  3447. this.modalData.nodeConclusion = 'N'
  3448. this.submitData()
  3449. })
  3450. },
  3451. // 提交
  3452. submitData () {
  3453. if (this.plmQuotationInformationArr) {
  3454. for (let i = 0; i < this.plmQuotationInformationArr.length; i++) {
  3455. if (!this.modalData[this.plmQuotationInformationArr[i].fieldId] && this.plmQuotationInformationArr[i].required === 'Y') {
  3456. this.$message.warning(this.plmQuotationInformationArr[i].fieldName + '不能为空!')
  3457. return
  3458. }
  3459. }
  3460. }
  3461. this.modalData.userName = this.$store.state.user.name
  3462. this.modalData.menuId = this.$route.meta.menuId
  3463. submitChange(this.modalData).then(({data}) => {
  3464. if (data && data.code === 0) {
  3465. this.getDataList()
  3466. this.$message({message: '操作成功', type: 'success'})
  3467. this.submitModalFlag = false
  3468. this.modalFlag = false
  3469. } else {
  3470. this.$alert(data.msg, '错误', {
  3471. confirmButtonText: '确定'
  3472. })
  3473. }
  3474. })
  3475. },
  3476. // 获取流程的配置权限
  3477. async getNodeAuthority (row) {
  3478. let tempData = {
  3479. site: row.site,
  3480. stepId: row.stepId,
  3481. menuId: this.$route.meta.menuId
  3482. }
  3483. await getNodeAuthority(tempData).then(({data}) => {
  3484. if (data && data.code === 0) {
  3485. this.plmQuotationInformationArr = data.rows.plm_quotation_information
  3486. }
  3487. })
  3488. },
  3489. handleQueryCustomer(){
  3490. let params = {
  3491. site:this.$store.state.user.site,
  3492. customerNo:this.modalData.customerNo
  3493. }
  3494. queryCustomer(params).then(({data})=>{
  3495. if (data && data.code === 0 ) {
  3496. if (data.rows && data.rows.length === 1){
  3497. this.modalData.customerDesc = data.rows[0].customerDesc
  3498. }else {
  3499. this.modalData.customerDesc = ''
  3500. }
  3501. }else {
  3502. this.$message.warning(data.msg)
  3503. }
  3504. }).catch((error)=>{
  3505. this.$message.error(error)
  3506. })
  3507. },
  3508. handleQueryProjectByCustomer(){
  3509. let params = {
  3510. site:this.$store.state.user.site,
  3511. customerId:this.modalData.customerNo,
  3512. projectId:this.modalData.projectId
  3513. }
  3514. queryProjectByCustomer(params).then(({data})=>{
  3515. if (data && data.code === 0 ){
  3516. if (data.rows && data.rows.length === 1){
  3517. this.modalData.projectName = data.rows[0].projectName
  3518. this.modalData.finalCustomerId = data.rows[0].finalCustomerId
  3519. this.modalData.finalCustomerName = data.rows[0].finalCustomerName
  3520. }else {
  3521. this.modalData.projectName = ''
  3522. this.modalData.finalCustomerId = ''
  3523. this.modalData.finalCustomerName = ''
  3524. }
  3525. }else {
  3526. this.$message.warning(data.msg)
  3527. }
  3528. }).catch((error)=>{
  3529. this.$message.error(error)
  3530. })
  3531. },
  3532. }
  3533. }
  3534. </script>
  3535. <style scoped>
  3536. /deep/ .customer-tab .el-tabs__content {
  3537. padding: 0px !important;
  3538. height: 459px;
  3539. }
  3540. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
  3541. background-color: #17B3A3;
  3542. border-color: #17B3A3;
  3543. }
  3544. /deep/ .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
  3545. border-color: #FFF
  3546. }
  3547. /deep/ .el-form-item--medium .el-form-item__content{
  3548. height: auto;
  3549. }
  3550. </style>