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.

3552 lines
124 KiB

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