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.

3544 lines
123 KiB

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