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.

3607 lines
126 KiB

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