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.

3557 lines
124 KiB

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