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.

3539 lines
123 KiB

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