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.

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