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.

3784 lines
133 KiB

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