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.

2326 lines
79 KiB

3 years ago
3 years ago
3 years ago
11 months ago
11 months ago
3 years ago
1 year ago
3 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
3 years ago
3 years ago
2 years ago
9 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 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
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
3 years ago
11 months ago
1 year ago
3 years ago
11 months ago
3 years ago
2 years ago
3 years ago
3 years ago
11 months ago
10 months ago
3 years ago
11 months ago
2 years ago
11 months ago
1 year ago
2 years ago
11 months ago
11 months ago
11 months ago
11 months ago
3 years ago
11 months ago
2 years ago
11 months ago
1 year ago
2 years ago
11 months ago
11 months ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
9 months ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years 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
11 months ago
11 months ago
9 months ago
8 months ago
2 years ago
3 years ago
3 years ago
9 months ago
11 months ago
1 year ago
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
9 months ago
9 months ago
3 years ago
2 years ago
3 years ago
11 months ago
3 years ago
1 year ago
1 year ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
11 months ago
3 years ago
11 months ago
3 years ago
11 months ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
11 months ago
1 year ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
11 months ago
3 years ago
2 years ago
3 years ago
11 months ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
11 months ago
3 years ago
11 months ago
3 years ago
11 months ago
3 years ago
11 months ago
3 years ago
3 years ago
1 year ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
1 year ago
1 year ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
8 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
9 months ago
3 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
1 year 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
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
3 years ago
3 years ago
9 months ago
3 years ago
9 months ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
2 years ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
3 years ago
11 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="mod-config">
  3. <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
  4. <el-form-item :label="'项目号'">
  5. <el-input v-model="searchData.projectId" clearable style="width: 120px"></el-input>
  6. </el-form-item>
  7. <el-form-item label="项目名称">
  8. <!-- <span slot="label" style="" @click="getBaseList(1010,1)"><a herf="#">项目类型</a></span>-->
  9. <el-input v-model="searchData.projectName" clearable style="width: 150px"></el-input>
  10. <!-- <dict-data-select dict-type="project_info_type_db" filterable clearable :use-default-value="false" v-model="searchData.projectType"></dict-data-select>-->
  11. </el-form-item>
  12. <el-form-item :label="'项目负责人'">
  13. <el-input v-model="searchData.projectOwnerName" clearable style="width: 120px"></el-input>
  14. </el-form-item>
  15. <el-form-item :label="'客户项目编码'">
  16. <el-input v-model="searchData.customerProjectNo" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item label="项目优先级">
  19. <dict-data-select dict-type="project_info_priority" clearable v-model="searchData.priority" style="width: 100px"></dict-data-select>
  20. </el-form-item>
  21. <el-form-item label="客户代码">
  22. <el-input v-model="searchData.customerId" clearable style="width: 120px"></el-input>
  23. </el-form-item>
  24. <el-form-item label="客户名称">
  25. <el-input v-model="searchData.customerName" clearable style="width: 150px"></el-input>
  26. </el-form-item>
  27. <el-form-item label=" ">
  28. <el-button @click="search()" type="primary" style="margin-left: 2px;margin-top:0px">查询</el-button>
  29. <el-button @click="addOrUpdateHandle('save')" type="primary" style="margin-left: 2px;margin-top: 0px">新增</el-button>
  30. <download-excel
  31. :fields="fields()"
  32. :data="exportData"
  33. type="xls"
  34. :name="exportName"
  35. :header="exportHeader"
  36. :footer="exportFooter"
  37. :fetch="createExportData"
  38. :before-generate="startDownload"
  39. :before-finish="finishDownload"
  40. worksheet="导出信息"
  41. class="el-button el-button--primary el-button--medium">
  42. {{ '导出' }}
  43. </download-excel>
  44. <el-button @click="filterVisible = true">搜索</el-button>
  45. </el-form-item>
  46. </el-form>
  47. <el-table
  48. :height="height"
  49. :data="dataList1"
  50. border
  51. ref="mainTable"
  52. @row-click="changeData"
  53. highlight-current-row
  54. v-loading="dataListLoading"
  55. style="width: 100%;">
  56. <el-table-column
  57. header-align="center"
  58. align="center"
  59. width="150"
  60. fixed="right"
  61. label="操作">
  62. <template slot-scope="scope">
  63. <a type="text" size="small" @click="addOrUpdateHandle(scope.row.projectId)">新增</a>
  64. <a type="text" size="small" @click="UpdateHandle(scope.row)">修改</a>
  65. <a type="text" size="small" @click="deleteProjectInfo(scope.row)">删除</a>
  66. </template>
  67. </el-table-column>
  68. <el-table-column
  69. v-for="(item,index) in columnList1" :key="index"
  70. :sortable="item.columnSortable"
  71. :prop="item.columnProp"
  72. :header-align="item.headerAlign"
  73. :show-overflow-tooltip="item.showOverflowTooltip"
  74. :align="item.align"
  75. :fixed="item.fixed==''?false:item.fixed"
  76. :min-width="item.columnWidth"
  77. :label="item.columnLabel">
  78. <template slot-scope="scope">
  79. <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
  80. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  81. </template>
  82. </el-table-column>
  83. </el-table>
  84. <el-pagination
  85. @size-change="sizeChangeHandle"
  86. @current-change="currentChangeHandle"
  87. :current-page="pageIndex"
  88. :page-sizes="[20, 50, 100, 1000]"
  89. :page-size="pageSize"
  90. :total="totalPage"
  91. layout="total, sizes, prev, pager, next, jumper">
  92. </el-pagination>
  93. <el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="tabClick">
  94. <el-tab-pane label="项目信息" name="info">
  95. <el-form label-position="top" style="margin-top: 0px; margin-left: 0px;">
  96. <el-row :gutter="20">
  97. <el-col :span="5"><div class="grid-content bg-purple">
  98. <el-form-item :label="'项目号'">
  99. <el-input v-model="projectData.projectId" readonly ></el-input>
  100. </el-form-item>
  101. </div></el-col>
  102. <el-col :span="5"><div class="grid-content bg-purple">
  103. <el-form-item :label="'项目类型'">
  104. <el-input v-model="projectData.projectType" readonly ></el-input>
  105. </el-form-item>
  106. </div></el-col>
  107. <el-col :span="5"><div class="grid-content bg-purple">
  108. <el-form-item :label="'项目来源'">
  109. <el-input v-model="projectData.projectSourceDesc" readonly ></el-input>
  110. </el-form-item>
  111. </div></el-col>
  112. <el-col :span="5"><div class="grid-content bg-purple">
  113. <el-form-item :label="'优先级'">
  114. <el-input v-model="projectData.priorityDesc" readonly></el-input>
  115. </el-form-item>
  116. </div></el-col>
  117. <el-col :span="4"><div class="grid-content bg-purple">
  118. <el-form-item :label="'需求日期'">
  119. <el-input v-model="projectData.needDate" readonly ></el-input>
  120. </el-form-item>
  121. </div></el-col>
  122. </el-row>
  123. <el-row :gutter="20">
  124. <el-col :span="5">
  125. <div class="grid-content bg-purple">
  126. <el-form-item :label="'项目名称'">
  127. <el-input v-model="projectData.projectName" readonly style="" ></el-input>
  128. </el-form-item>
  129. </div>
  130. </el-col>
  131. <el-col :span="5"><div class="grid-content bg-purple">
  132. <el-form-item :label="'项目描述'">
  133. <el-input v-model="projectData.projectDesc" readonly style="" ></el-input>
  134. </el-form-item>
  135. </div></el-col>
  136. <el-col :span="5"><div class="grid-content bg-purple">
  137. <el-form-item :label="'最终客户'">
  138. <el-input v-model="projectData.finalCustomerName" readonly style="" ></el-input>
  139. </el-form-item>
  140. </div></el-col>
  141. <el-col :span="5"><div class="grid-content bg-purple">
  142. <el-form-item :label="'客户项目编号'">
  143. <el-input v-model="projectData.customerProjectNo" readonly style="" ></el-input>
  144. </el-form-item>
  145. </div></el-col>
  146. <el-col :span="4"><div class="grid-content bg-purple">
  147. <el-form-item :label="'产品分类/Product Set'">
  148. <el-input v-model="projectData.productSet" readonly style="" ></el-input>
  149. </el-form-item>
  150. </div></el-col>
  151. </el-row>
  152. <el-row :gutter="20">
  153. <el-col :span="8"><div class="grid-content bg-purple">
  154. <el-form-item :label="'项目经理'">
  155. <el-input v-model="projectData.projectManagerName" readonly style="" ></el-input>
  156. </el-form-item>
  157. </div></el-col>
  158. <el-col :span="8"><div class="grid-content bg-purple">
  159. <el-form-item :label="'项目负责人'">
  160. <el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
  161. </el-form-item>
  162. </div></el-col>
  163. <el-col :span="8"><div class="grid-content bg-purple">
  164. <el-form-item :label="'项目权限'">
  165. <el-input v-model="projectData.userRoleName" readonly style="" ></el-input>
  166. </el-form-item>
  167. </div></el-col>
  168. </el-row>
  169. <el-row :gutter="20">
  170. <el-col :span="24"><div class="grid-content bg-purple">
  171. <el-form-item :label="'客户应用/要求'">
  172. <el-input v-model="projectData.customerRemark" readonly style="" ></el-input>
  173. </el-form-item>
  174. </div></el-col>
  175. </el-row>
  176. <el-row :gutter="20">
  177. <el-col :span="24"><div class="grid-content bg-purple">
  178. <el-form-item :label="'其他特殊要求'">
  179. <el-input v-model="projectData.remark" readonly style="" ></el-input>
  180. </el-form-item>
  181. </div></el-col>
  182. </el-row>
  183. </el-form>
  184. </el-tab-pane>
  185. <el-tab-pane label="客户信息" v-if="isAuth('101002001:customer')" name="customer">
  186. <customer-info :project="currentRow"></customer-info>
  187. </el-tab-pane>
  188. <el-tab-pane label="项目联系人" v-if="isAuth('101002001:contact')" name="customer_contact">
  189. <el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
  190. <el-form :inline="true" label-position="top" style="margin-top: 0px">
  191. <el-button type="primary" @click="contactChooseModal()">编辑</el-button>
  192. <download-excel
  193. :fields="fields2()"
  194. :data="exportData2"
  195. type="xls"
  196. :name="exportName2"
  197. :header="exportHeader2"
  198. :footer="exportFooter2"
  199. :fetch="createExportData2"
  200. :before-generate="startDownload2"
  201. :before-finish="finishDownload2"
  202. worksheet="导出信息"
  203. class="el-button el-button--primary el-button--medium">
  204. {{ '导出' }}
  205. </download-excel>
  206. </el-form>
  207. </el-form>
  208. <el-table
  209. :data="contactList"
  210. height="240"
  211. border
  212. v-loading="dataListLoading"
  213. style="width: 100%; ">
  214. <el-table-column
  215. v-for="(item,index) in columnList2" :key="index"
  216. :sortable="item.columnSortable"
  217. :prop="item.columnProp"
  218. :header-align="item.headerAlign"
  219. :show-overflow-tooltip="item.showOverflowTooltip"
  220. :align="item.align"
  221. :fixed="item.fixed==''?false:item.fixed"
  222. :min-width="item.columnWidth"
  223. :label="item.columnLabel">
  224. <template slot-scope="scope">
  225. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  226. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  227. </template>
  228. </el-table-column>
  229. </el-table>
  230. </el-tab-pane>
  231. <el-tab-pane label="附件信息" v-if="isAuth('101002001:file')" name="down">
  232. <oss-components height="25vh" label="项目号" :columns="ossColumns" :order-ref1="currentRow.site" :order-ref2="currentRow.projectId"></oss-components>
  233. </el-tab-pane>
  234. <el-tab-pane label="项目物料" v-if="isAuth('101002001:part')" name="part">
  235. <projectPart ref="projectPart"></projectPart>
  236. </el-tab-pane>
  237. <el-tab-pane label="询价信息" v-if="isAuth('101002001:quotation')" name="quotation">
  238. <project-quotation ref="projectQuotation" ></project-quotation>
  239. </el-tab-pane>
  240. <el-tab-pane label="报价信息" v-if="isAuth('101002001:quote')" name="quotationHeader">
  241. <!-- <quote :is-menu="false" :project-no="currentRow.projectId" height="22vh"></quote>-->
  242. <project-part-quote :is-export="true" height="26vh" :part="currentRow"></project-part-quote>
  243. </el-tab-pane>
  244. <el-tab-pane label="打样信息" v-if="isAuth('101002001:sample')" name="sample">
  245. <sample ref="sample"></sample>
  246. </el-tab-pane>
  247. <el-tab-pane label="测试记录" v-if="isAuth('101002001:test')" name="test">
  248. <test ref="test"></test>
  249. </el-tab-pane>
  250. <el-tab-pane label="刀模申请" v-if="isAuth('101002001:tool')" name="toolApply">
  251. <toolApply ref="toolApply"></toolApply>
  252. </el-tab-pane>
  253. <el-tab-pane label="技术参数卡" v-if="isAuth('101002001:technical')" name="technicalSpecification">
  254. <technicalSpecification ref="technicalSpecification"></technicalSpecification>
  255. </el-tab-pane>
  256. <el-tab-pane label="变更记录" v-if="isAuth('101002001:change')" name="changeRecord">
  257. <change-record :data-list="changeRecordList" :height="240" :columns="columnChangeRecord"></change-record>
  258. </el-tab-pane>
  259. </el-tabs>
  260. <!-- <el-dialog-->
  261. <!-- width="530px"-->
  262. <!-- title="项目联系人"-->
  263. <!-- :close-on-click-modal="false"-->
  264. <!-- :visible.sync="contactChooseFlag">-->
  265. <!-- <el-transfer v-model="contactChooseList1" :props="{-->
  266. <!-- key: 'contactId',-->
  267. <!-- label: 'contactName'-->
  268. <!-- }" :data="contactChooseList2" :titles="['未选择', '已选择']"></el-transfer>-->
  269. <!-- <span slot="footer" class="dialog-footer">-->
  270. <!-- <div style="margin-top: 5px">-->
  271. <!-- <el-button type="primary" @click="saveProjectContactList()">确定</el-button>-->
  272. <!-- <el-button @click="contactChooseFlag = false" type="primary">取消</el-button>-->
  273. <!-- </div>-->
  274. <!-- </span>-->
  275. <!-- </el-dialog>-->
  276. <!-- 客户联系人-> 快速新增 -->
  277. <el-dialog title="项目联系人" :close-on-click-modal="false" v-drag :visible.sync="contactChooseFlag" width="700px">
  278. <div style="font-size: 12px">
  279. <el-form :inline="true" label-position="top" :model="contactData">
  280. <el-form-item :label="'联系人名称'">
  281. <el-input v-model="contactData.contactName" clearable style="width: 150px"></el-input>
  282. </el-form-item>
  283. <el-form-item :label="' '">
  284. <el-button type="primary" @click="queryCustomerContact">查询</el-button>
  285. </el-form-item>
  286. </el-form>
  287. </div>
  288. <el-container>
  289. <el-main style="width: 200px;padding: 1px">
  290. <span style="font-size: 12px" >可选联系人</span>
  291. <el-table
  292. height="300px"
  293. :data="contactChooseList1"
  294. border
  295. ref="contactTable1"
  296. @row-click="contactClickRow1"
  297. @selection-change="selectionContact1"
  298. highlight-current-row
  299. style="width: 100%">
  300. <el-table-column
  301. type="selection"
  302. header-align="center"
  303. align="center"
  304. width="50">
  305. </el-table-column>
  306. <el-table-column
  307. prop="contactName"
  308. header-align="center"
  309. align="center"
  310. min-width="200"
  311. label="联系人名称">
  312. </el-table-column>
  313. </el-table>
  314. </el-main>
  315. <el-main style="width: 10px;padding: 1px">
  316. <div style="margin-top: 150px;margin-left: 18px">
  317. <el-button type="primary" @click="addContact">添加>></el-button>
  318. </div>
  319. <div style="margin-top: 15px;margin-left: 18px">
  320. <el-button type="primary" @click="deleteContact">删除<<</el-button>
  321. </div>
  322. </el-main>
  323. <el-main style="width: 200px;padding: 1px">
  324. <span style="font-size: 12px" >已有联系人</span>
  325. <el-table
  326. height="300px"
  327. :data="contactChooseList2"
  328. border
  329. ref="contactTable2"
  330. @row-click="contactClickRow2"
  331. @selection-change="selectionContact2"
  332. highlight-current-row
  333. style="width: 100%">
  334. <el-table-column
  335. type="selection"
  336. header-align="center"
  337. align="center"
  338. width="50">
  339. </el-table-column>
  340. <el-table-column
  341. prop="contactName"
  342. header-align="center"
  343. align="center"
  344. min-width="200"
  345. label="联系人名称">
  346. </el-table-column>
  347. </el-table>
  348. </el-main>
  349. </el-container>
  350. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  351. <el-button type="primary" @click="contactChooseFlag = false">关闭</el-button>
  352. </el-footer>
  353. </el-dialog>
  354. <!-- 上传文件的modal -->
  355. <projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile>
  356. <add-or-update v-if="addOrUpdateVisible" v-model="addOrUpdate" ref="addOrUpdate" @refreshDataList="search2" v-drag></add-or-update>
  357. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  358. <filter-search :visible.sync="filterVisible" @search="projectInfoSearchByAnyField"></filter-search>
  359. </div>
  360. </template>
  361. <script>
  362. import {
  363. customerInformationSearchForCheck, // 客户信息列表查询`
  364. } from '@/api/customer/customerInformation.js'
  365. import AddOrUpdate from './com_projectInfo-add-or-update'
  366. import {
  367. getTableDefaultListLanguage,
  368. getTableUserListLanguage,
  369. } from "@/api/table.js"
  370. import Chooselist from '@/views/modules/common/Chooselist'
  371. import {projectInfoSearch,
  372. deleteProjectFile,
  373. getFileContentList,
  374. downLoadProjectFile,
  375. getCustomerContactData,
  376. getContactChooseData,
  377. getContactChooseData2,
  378. saveProjectContactList,
  379. deleteProjectInfo,
  380. getProjectUserRole,
  381. addContact,
  382. deleteContact,
  383. queryCustomerContact
  384. } from "@/api/project/project.js"
  385. import {
  386. getChangeRecordByPartNo, // 查询变更记录
  387. } from '@/api/part/partInformation.js'
  388. import projectUploadFile from "./com_project_upload_file";/*上传文件的組件*/
  389. import projectPart from "./com_project_info_part.vue";/*組件*/
  390. import sample from "./com_project_sample";/*組件*/
  391. import test from "./com_project_test";/*組件*/
  392. import technicalSpecification from "./com_project_technicalSpecification";
  393. import DictDataSelect from "../../sys/dict-data-select.vue";
  394. import ChangeRecord from "./com_project_change_record.vue";
  395. import OssComponents from "../../oss/ossComponents.vue";
  396. import toolApply from "./com_project_toolApplyCation.vue";
  397. import { Divider } from 'element-ui';
  398. import CustomerInfo from "../../quotation/sellForQuotation/customerInfo.vue";
  399. import Quote from "../../quote/index.vue";
  400. import ProjectQuotation from "./com_project_puotation.vue";
  401. import ProjectPartQuote from "../projectPart/projectPartQuote.vue";
  402. import {isAuth} from "../../../../utils";
  403. import FilterSearch from "../../../common/filterSearch.vue";
  404. import {siteList} from "../../../../api/base/site";
  405. import {getProjectInfoPartList, projectInfoSearchByAnyField} from "../../../../api/project/project";
  406. import {queryOss} from "../../../../api/oss/oss";
  407. import {quotationInformationSearch} from "../../../../api/quotation/quotationInformation";
  408. import {queryQuoteGroupDetailByInquiry} from "../../../../api/quote/quoteGroupDetail";
  409. import {proofingInformationSearch} from "../../../../api/proofing/proofingInformation";
  410. import {testInformationList} from "../../../../api/test/testInformation";
  411. import {searchProjectToolApplyDetail} from "../../../../api/tool/toolApply";
  412. import {technicalSpecificationListSearch} from "../../../../api/sampleManagement/technicalSpecificationList";
  413. /*組件*/
  414. export default {
  415. components: {
  416. FilterSearch,
  417. ProjectPartQuote,
  418. ProjectQuotation,
  419. Quote,
  420. CustomerInfo,
  421. OssComponents,
  422. ChangeRecord,
  423. DictDataSelect,
  424. Chooselist,
  425. AddOrUpdate,
  426. projectUploadFile,
  427. projectPart,
  428. sample,
  429. test,
  430. technicalSpecification,
  431. toolApply,
  432. ElDivider: Divider,
  433. },
  434. name: "null",
  435. data() {
  436. return {
  437. // addOrUpdate
  438. addOrUpdate:'0',
  439. //项目已选联系人
  440. contactChooseList1:[],
  441. //客户可选联系人
  442. contactChooseList2:[],
  443. contactList: [],
  444. fileContentList: [],
  445. activeName: 'info',
  446. addOrUpdateVisible:false,
  447. filterVisible:false,
  448. isFilterSearch: false,
  449. filterSearchData: {},
  450. searchData:{
  451. page: 1,
  452. limit: 100,
  453. site:this.$store.state.user.site,
  454. projectId:'',
  455. projectName:'',
  456. projectType:'',
  457. projectOwnerName:'',
  458. customerProjectNo:'',
  459. priority:'',
  460. customerId:'',
  461. customerName:'',
  462. userName:this.$store.state.user.name,
  463. },
  464. contactChooseFlag:false,
  465. currentRow:'',
  466. height: 200,
  467. dataList1:[],
  468. dataListLoading: false,
  469. // 导出 start
  470. exportData: [],
  471. exportName: "项目清单" + this.dayjs().format('YYYYMMDDHHmmss'),
  472. exportHeader: ["项目清单"],
  473. exportFooter: [],
  474. exportList:[],
  475. // 导出 start
  476. exportData2: [],
  477. exportName2: "项目客户联系人" + this.dayjs().format('YYYYMMDDHHmmss'),
  478. exportHeader2: ["项目客户联系人"],
  479. exportFooter2: [],
  480. exportList2:[],
  481. tagNo:'',
  482. tagNo2:'',
  483. pageIndex: 1,
  484. pageSize: 100,
  485. totalPage: 0,
  486. // 导出 end
  487. columnList1: [
  488. {
  489. userId: this.$store.state.user.name,
  490. functionId: 101002001,
  491. serialNumber: '101002001Table1ProjectId',
  492. tableId: "101002001Table1",
  493. tableName: "项目信息主表",
  494. columnProp: "projectId",
  495. headerAlign: "center",
  496. align: "left",
  497. columnLabel: "项目号",
  498. columnHidden: false,
  499. columnImage: false,
  500. columnSortable: false,
  501. sortLv: 0,
  502. status: true,
  503. fixed: '',
  504. columnWidth: 120
  505. },
  506. {
  507. userId: this.$store.state.user.name,
  508. functionId: 101002001,
  509. serialNumber: '101002001Table1ProjectType',
  510. tableId: "101002001Table1",
  511. tableName: "项目信息主表",
  512. columnProp: "projectType",
  513. headerAlign: "center",
  514. align: "center",
  515. columnLabel: "项目类型",
  516. columnHidden: false,
  517. columnImage: false,
  518. columnSortable: false,
  519. sortLv: 0,
  520. status: true,
  521. fixed: '',
  522. columnWidth: 100
  523. },
  524. {
  525. userId: this.$store.state.user.name,
  526. functionId: 101002001,
  527. serialNumber: '101002001Table1ProjectName',
  528. tableId: "101002001Table1",
  529. tableName: "项目信息主表",
  530. columnProp: "projectName",
  531. headerAlign: "center",
  532. align: "left",
  533. columnLabel: "项目名称",
  534. columnHidden: false,
  535. columnImage: false,
  536. columnSortable: false,
  537. sortLv: 0,
  538. status: true,
  539. fixed: '',
  540. columnWidth: 200
  541. },
  542. {
  543. userId: this.$store.state.user.name,
  544. functionId: 101002001,
  545. serialNumber: '101002001Table1CustomerProjectNo',
  546. tableId: "101002001Table1",
  547. tableName: "项目信息主表",
  548. columnProp: "customerProjectNo",
  549. headerAlign: "center",
  550. align: "left",
  551. columnLabel: "客户项目编码",
  552. columnHidden: false,
  553. columnImage: false,
  554. columnSortable: false,
  555. sortLv: 4,
  556. status: true,
  557. fixed: '',
  558. columnWidth: 120
  559. },
  560. {
  561. userId: this.$store.state.user.name,
  562. functionId: 101002001,
  563. serialNumber: '101002001Table1Priority',
  564. tableId: "101002001Table1",
  565. tableName: "项目信息主表",
  566. columnProp: "priorityDesc",
  567. headerAlign: "center",
  568. align: "left",
  569. columnLabel: "优先级",
  570. columnHidden: false,
  571. columnImage: false,
  572. columnSortable: false,
  573. sortLv: 0,
  574. status: true,
  575. fixed: '',
  576. columnWidth: 100
  577. },
  578. {
  579. userId: this.$store.state.user.name,
  580. functionId: 101002001,
  581. serialNumber: '101002001Table1ProjectOwnerName',
  582. tableId: "101002001Table1",
  583. tableName: "项目信息主表",
  584. columnProp: "projectOwnerName",
  585. headerAlign: "center",
  586. align: "left",
  587. columnLabel: "项目负责人",
  588. columnHidden: false,
  589. columnImage: false,
  590. columnSortable: false,
  591. sortLv: 0,
  592. status: true,
  593. fixed: '',
  594. columnWidth: 100
  595. },
  596. {
  597. userId: this.$store.state.user.name,
  598. functionId: 101002001,
  599. serialNumber: '101002001Table1ProjectSource',
  600. tableId: "101002001Table1",
  601. tableName: "项目信息主表",
  602. columnProp: "projectSourceDesc",
  603. headerAlign: "center",
  604. align: "center",
  605. columnLabel: "项目来源",
  606. columnHidden: false,
  607. columnImage: false,
  608. columnSortable: false,
  609. sortLv: 0,
  610. status: true,
  611. fixed: '',
  612. columnWidth: 100
  613. },
  614. {
  615. userId: this.$store.state.user.name,
  616. functionId: 101002001,
  617. serialNumber: '101002001Table1CustomerId',
  618. tableId: "101002001Table1",
  619. tableName: "项目信息主表",
  620. columnProp: "customerId",
  621. headerAlign: "center",
  622. align: "center",
  623. columnLabel: "客户代码",
  624. columnHidden: false,
  625. columnImage: false,
  626. columnSortable: false,
  627. sortLv: 0,
  628. status: true,
  629. fixed: '',
  630. columnWidth: 100
  631. },
  632. {
  633. userId: this.$store.state.user.name,
  634. functionId: 101002001,
  635. serialNumber: '101002001Table1CustomerName',
  636. tableId: "101002001Table1",
  637. tableName: "项目信息主表",
  638. columnProp: "customerName",
  639. headerAlign: "center",
  640. align: "left",
  641. columnLabel: "客户名称",
  642. columnHidden: false,
  643. columnImage: false,
  644. columnSortable: false,
  645. sortLv: 0,
  646. status: true,
  647. fixed: '',
  648. columnWidth: 150
  649. },
  650. {
  651. userId: this.$store.state.user.name,
  652. functionId: 101002001,
  653. serialNumber: '101002001Table1CreateDate',
  654. tableId: "101002001Table1",
  655. tableName: "项目信息主表",
  656. columnProp: "createDate",
  657. headerAlign: "center",
  658. align: "center",
  659. columnLabel: "创建时间",
  660. columnHidden: false,
  661. columnImage: false,
  662. columnSortable: false,
  663. sortLv: 0,
  664. status: true,
  665. fixed: '',
  666. columnWidth: 130
  667. },
  668. {
  669. userId: this.$store.state.user.name,
  670. functionId: 101002001,
  671. serialNumber: '101002001Table1CreateBy',
  672. tableId: "101002001Table1",
  673. tableName: "项目信息主表",
  674. columnProp: "createBy",
  675. headerAlign: "center",
  676. align: "left",
  677. columnLabel: "创建人",
  678. columnHidden: false,
  679. columnImage: false,
  680. columnSortable: false,
  681. sortLv: 0,
  682. status: true,
  683. fixed: '',
  684. columnWidth: 80
  685. },
  686. {
  687. userId: this.$store.state.user.name,
  688. functionId: 101002001,
  689. serialNumber: '101002001Table1UpdateDate',
  690. tableId: "101002001Table1",
  691. tableName: "项目信息主表",
  692. columnProp: "updateDate",
  693. headerAlign: "center",
  694. align: "center",
  695. columnLabel: "修改时间",
  696. columnHidden: false,
  697. columnImage: false,
  698. columnSortable: false,
  699. sortLv: 0,
  700. status: true,
  701. fixed: '',
  702. columnWidth: 130
  703. },
  704. {
  705. userId: this.$store.state.user.name,
  706. functionId: 101002001,
  707. serialNumber: '101002001Table1UpdateBy',
  708. tableId: "101002001Table1",
  709. tableName: "项目信息主表",
  710. columnProp: "updateBy",
  711. headerAlign: "center",
  712. align: "left",
  713. columnLabel: "修改人",
  714. columnHidden: false,
  715. columnImage: false,
  716. columnSortable: false,
  717. sortLv: 0,
  718. status: true,
  719. fixed: '',
  720. columnWidth: 80
  721. },
  722. ],
  723. columnList2: [
  724. // {
  725. // userId: this.$store.state.user.name,
  726. // functionId: 101002001,
  727. // serialNumber: '101002001Table2ContactName',
  728. // tableId: '101002001Table2',
  729. // tableName: '项目联系人表',
  730. // columnProp: 'contactId',
  731. // headerAlign: 'center',
  732. // align: 'center',
  733. // columnLabel: '联系人编码',
  734. // columnHidden: false,
  735. // columnImage: false,
  736. // columnSortable: false,
  737. // sortLv: 0,
  738. // status: true,
  739. // fixed: '',
  740. // columnWidth: 100
  741. // },
  742. {
  743. userId: this.$store.state.user.name,
  744. functionId: 101002001,
  745. serialNumber: '101002001Table2ContactName',
  746. tableId: '101002001Table2',
  747. tableName: '项目联系人表',
  748. columnProp: 'contactName',
  749. headerAlign: 'center',
  750. align: 'left',
  751. columnLabel: '联系人',
  752. columnHidden: false,
  753. columnImage: false,
  754. columnSortable: false,
  755. sortLv: 0,
  756. status: true,
  757. fixed: '',
  758. columnWidth: 100
  759. },
  760. {
  761. userId: this.$store.state.user.name,
  762. functionId: 101002001,
  763. serialNumber: '101002001Table2ContactPhoneNumber1',
  764. tableId: '101002001Table2',
  765. tableName: '项目联系人表',
  766. columnProp: 'contactPhoneNumber1',
  767. headerAlign: 'center',
  768. align: 'left',
  769. columnLabel: '联系电话',
  770. columnHidden: false,
  771. columnImage: false,
  772. columnSortable: false,
  773. sortLv: 0,
  774. status: true,
  775. fixed: '',
  776. columnWidth: 100
  777. },
  778. {
  779. userId: this.$store.state.user.name,
  780. functionId: 101002001,
  781. serialNumber: '101002001Table2ContactLandlineNumber',
  782. tableId: '101002001Table2',
  783. tableName: '项目联系人表',
  784. columnProp: 'contactLandlineNumber',
  785. headerAlign: 'center',
  786. align: 'left',
  787. columnLabel: '座机',
  788. columnHidden: false,
  789. columnImage: false,
  790. columnSortable: false,
  791. sortLv: 0,
  792. status: true,
  793. fixed: '',
  794. columnWidth: 100
  795. },
  796. {
  797. userId: this.$store.state.user.name,
  798. functionId: 101002001,
  799. serialNumber: '101002001Table2Position',
  800. tableId: '101002001Table2',
  801. tableName: '项目联系人表',
  802. columnProp: 'position',
  803. headerAlign: 'center',
  804. align: 'left',
  805. columnLabel: '公司职务',
  806. columnHidden: false,
  807. columnImage: false,
  808. columnSortable: false,
  809. sortLv: 0,
  810. status: true,
  811. fixed: '',
  812. columnWidth: 100
  813. },
  814. {
  815. userId: this.$store.state.user.name,
  816. functionId: 101002001,
  817. serialNumber: '101002001Table2Mailbox',
  818. tableId: '101002001Table2',
  819. tableName: '项目联系人表',
  820. columnProp: 'mailbox',
  821. headerAlign: 'center',
  822. align: 'left',
  823. columnLabel: '邮箱',
  824. columnHidden: false,
  825. columnImage: false,
  826. columnSortable: false,
  827. sortLv: 0,
  828. status: true,
  829. fixed: '',
  830. columnWidth: 100
  831. },
  832. {
  833. userId: this.$store.state.user.name,
  834. functionId: 101002001,
  835. serialNumber: '101002001Table2PrimaryContact',
  836. tableId: '101002001Table2',
  837. tableName: '项目联系人表',
  838. columnProp: 'primaryContact',
  839. headerAlign: 'center',
  840. align: 'center',
  841. columnLabel: '默认联系人',
  842. columnHidden: false,
  843. columnImage: false,
  844. columnSortable: false,
  845. sortLv: 0,
  846. status: true,
  847. fixed: '',
  848. columnWidth: 100
  849. },
  850. {
  851. userId: this.$store.state.user.name,
  852. functionId: 101002001,
  853. serialNumber: '101002001Table2ContactStatus',
  854. tableId: '101002001Table2',
  855. tableName: '项目联系人表',
  856. columnProp: 'contactStatus',
  857. headerAlign: 'center',
  858. align: 'center',
  859. columnLabel: '状态',
  860. columnHidden: false,
  861. columnImage: false,
  862. columnSortable: false,
  863. sortLv: 0,
  864. status: true,
  865. fixed: '',
  866. columnWidth: 60
  867. },
  868. {
  869. userId: this.$store.state.user.name,
  870. functionId: 101002001,
  871. serialNumber: '101002001Table2CreateDate',
  872. tableId: '101002001Table2',
  873. tableName: '项目联系人表',
  874. columnProp: 'createDate',
  875. headerAlign: 'center',
  876. align: 'center',
  877. columnLabel: '创建时间',
  878. columnHidden: false,
  879. columnImage: false,
  880. columnSortable: false,
  881. sortLv: 0,
  882. status: true,
  883. fixed: '',
  884. columnWidth: 120
  885. },
  886. {
  887. userId: this.$store.state.user.name,
  888. functionId: 101002001,
  889. serialNumber: '101002001Table2CreateBy',
  890. tableId: '101002001Table2',
  891. tableName: '项目联系人表',
  892. columnProp: 'createBy',
  893. headerAlign: 'center',
  894. align: 'center',
  895. columnLabel: '创建人',
  896. columnHidden: false,
  897. columnImage: false,
  898. columnSortable: false,
  899. sortLv: 0,
  900. status: true,
  901. fixed: '',
  902. columnWidth: 80
  903. },
  904. {
  905. userId: this.$store.state.user.name,
  906. functionId: 101002001,
  907. serialNumber: '101002001Table2UpdateDate',
  908. tableId: '101002001Table2',
  909. tableName: '项目联系人表',
  910. columnProp: 'updateDate',
  911. headerAlign: 'center',
  912. align: 'center',
  913. columnLabel: '更新时间',
  914. columnHidden: false,
  915. columnImage: false,
  916. columnSortable: false,
  917. sortLv: 0,
  918. status: true,
  919. fixed: '',
  920. columnWidth: 120
  921. },
  922. {
  923. userId: this.$store.state.user.name,
  924. functionId: 101002001,
  925. serialNumber: '101002001Table2UpdateBy',
  926. tableId: '101002001Table2',
  927. tableName: '项目联系人表',
  928. columnProp: 'updateBy',
  929. headerAlign: 'center',
  930. align: 'left',
  931. columnLabel: '更新人',
  932. columnHidden: false,
  933. columnImage: false,
  934. columnSortable: false,
  935. sortLv: 0,
  936. status: true,
  937. fixed: '',
  938. columnWidth: 80
  939. }
  940. ],
  941. projectData: {
  942. id: 0,
  943. site:this.$store.state.user.site,
  944. projectLevel:'',
  945. projectId:'',
  946. projectTypeDb:'',
  947. projectType:'',
  948. customerName:'',
  949. customerId:'',
  950. projectName:'',
  951. projectDesc:'',
  952. needDate:'',
  953. priority:'',
  954. projectSource:'',
  955. priorityDesc:'',
  956. projectSourceDesc:'',
  957. projectManagerName:'',
  958. projectOwnerName:'',
  959. customerRemark:'',
  960. remark:'',
  961. userRoleName:'',
  962. customerProjectNo:'',
  963. finalCustomerName:'',
  964. productSet:'',
  965. },
  966. customerData:{
  967. site: '',
  968. customerNo: '',
  969. customerDesc: '',
  970. customerDescription: '',
  971. customerIndustry: '',
  972. customerCurrency: '',
  973. turnoverOfYear: '',
  974. potentialRevenueOfYear: '',
  975. importantCustomer: '',
  976. customerStatus: '',
  977. companyName: '',
  978. jobDescription: '',
  979. remark: '',
  980. contactName: '',
  981. contactPhoneNumber1: '',
  982. primaryContact: '',
  983. contactStatus: '',
  984. addressName: ''
  985. },
  986. finalCustomerData:{
  987. site: '',
  988. customerNo: '',
  989. customerDesc: '',
  990. customerDescription: '',
  991. customerIndustry: '',
  992. customerCurrency: '',
  993. turnoverOfYear: '',
  994. potentialRevenueOfYear: '',
  995. importantCustomer: '',
  996. customerStatus: '',
  997. companyName: '',
  998. jobDescription: '',
  999. remark: '',
  1000. contactName: '',
  1001. contactPhoneNumber1: '',
  1002. primaryContact: '',
  1003. contactStatus: '',
  1004. addressName: ''
  1005. },
  1006. columnFileContentArray: [
  1007. {
  1008. columnProp: 'fileName',
  1009. headeralign: 'left',
  1010. align: 'left',
  1011. columnLabel: '文件名称',
  1012. columnHidden: false,
  1013. columnImage: false,
  1014. columnSortable: false,
  1015. sortLv: 0,
  1016. status: true,
  1017. fixed: false
  1018. // }, {
  1019. // columnProp: 'createdBy',
  1020. // headeralign: 'left',
  1021. // align: 'left',
  1022. // columnLabel: '上传人',
  1023. // columnHidden: false,
  1024. // columnImage: false,
  1025. // columnSortable: true,
  1026. // sortLv: 0,
  1027. // status: true,
  1028. // fixed: false
  1029. }, {
  1030. columnProp: 'createDate',
  1031. headeralign: 'left',
  1032. align: 'left',
  1033. columnLabel: '上传时间',
  1034. columnHidden: false,
  1035. columnImage: false,
  1036. columnSortable: true,
  1037. sortLv: 0,
  1038. status: true,
  1039. fixed: false
  1040. }, {
  1041. columnProp: 'orderRef3',
  1042. headeralign: 'left',
  1043. align: 'left',
  1044. columnLabel: '类型',
  1045. columnHidden: false,
  1046. columnImage: false,
  1047. columnSortable: true,
  1048. sortLv: 0,
  1049. status: true,
  1050. fixed: false
  1051. },
  1052. ],
  1053. contactSelections1: [],
  1054. contactSelections2: [],
  1055. contactData: {
  1056. site: this.$store.state.user.site,
  1057. customerId: '',
  1058. projectId: '',
  1059. contactId: '',
  1060. contactName: '',
  1061. },
  1062. changeRecordList: [],
  1063. columnChangeRecord: [
  1064. {
  1065. columnProp: 'changeNo',
  1066. headerAlign: 'center',
  1067. align: 'center',
  1068. columnLabel: '申请编号',
  1069. columnHidden: false,
  1070. columnImage: false,
  1071. status: true,
  1072. fixed: '',
  1073. columnWidth: 120
  1074. },
  1075. {
  1076. columnProp: 'applicantName',
  1077. headerAlign: 'center',
  1078. align: 'center',
  1079. columnLabel: '申请人',
  1080. columnHidden: false,
  1081. columnImage: false,
  1082. status: true,
  1083. fixed: '',
  1084. columnWidth: 120
  1085. },
  1086. {
  1087. columnProp: 'applicationDepartmentName',
  1088. headerAlign: 'center',
  1089. align: 'center',
  1090. columnLabel: '申请部门',
  1091. columnHidden: false,
  1092. columnImage: false,
  1093. status: true,
  1094. fixed: '',
  1095. columnWidth: 120
  1096. },
  1097. {
  1098. columnProp: 'changeStatus',
  1099. headerAlign: 'center',
  1100. align: 'center',
  1101. columnLabel: '变更单状态',
  1102. columnHidden: false,
  1103. columnImage: false,
  1104. status: true,
  1105. fixed: '',
  1106. columnWidth: 100
  1107. },
  1108. {
  1109. columnProp: 'ecnStage',
  1110. headerAlign: 'center',
  1111. align: 'center',
  1112. columnLabel: 'ECN阶段',
  1113. columnHidden: false,
  1114. columnImage: false,
  1115. status: true,
  1116. fixed: '',
  1117. columnWidth: 100
  1118. },
  1119. {
  1120. columnProp: 'changeType',
  1121. headerAlign: 'center',
  1122. align: 'center',
  1123. columnLabel: '变更类别',
  1124. columnHidden: false,
  1125. columnImage: false,
  1126. status: true,
  1127. fixed: '',
  1128. columnWidth: 100
  1129. },
  1130. {
  1131. columnProp: 'ecnType',
  1132. headerAlign: 'center',
  1133. align: 'center',
  1134. columnLabel: 'ECN种类',
  1135. columnHidden: false,
  1136. columnImage: false,
  1137. status: true,
  1138. fixed: '',
  1139. columnWidth: 100
  1140. },
  1141. {
  1142. columnProp: 'applyDate',
  1143. headerAlign: 'center',
  1144. align: 'center',
  1145. columnLabel: '申请日期',
  1146. columnHidden: false,
  1147. columnImage: false,
  1148. status: true,
  1149. fixed: '',
  1150. columnWidth: 100
  1151. },
  1152. {
  1153. columnProp: 'changePhaseInDate',
  1154. headerAlign: 'center',
  1155. align: 'center',
  1156. columnLabel: '变更生效日期',
  1157. columnHidden: false,
  1158. columnImage: false,
  1159. status: true,
  1160. fixed: '',
  1161. columnWidth: 100
  1162. },
  1163. {
  1164. columnProp: 'xxx',
  1165. headerAlign: 'center',
  1166. align: 'center',
  1167. columnLabel: 'ECN执行日期',
  1168. columnHidden: false,
  1169. columnImage: false,
  1170. status: true,
  1171. fixed: '',
  1172. columnWidth: 100
  1173. },
  1174. {
  1175. columnProp: 'nodeName',
  1176. headerAlign: 'center',
  1177. align: 'center',
  1178. columnLabel: '当前节点',
  1179. columnHidden: false,
  1180. columnImage: false,
  1181. status: true,
  1182. fixed: '',
  1183. columnWidth: 120
  1184. },
  1185. {
  1186. columnProp: 'createBy2',
  1187. headerAlign: 'center',
  1188. align: 'center',
  1189. columnLabel: '当前节点审批人',
  1190. columnHidden: false,
  1191. columnImage: false,
  1192. status: true,
  1193. fixed: '',
  1194. columnWidth: 100
  1195. },
  1196. ],
  1197. ossColumns:[
  1198. {
  1199. userId: this.$store.state.user.name,
  1200. functionId: 103001,
  1201. serialNumber: '103001Table2FileName',
  1202. tableId: '103001Table2',
  1203. tableName: '文件信息表',
  1204. columnProp: 'fileName',
  1205. headerAlign: 'center',
  1206. align: 'center',
  1207. columnLabel: '文件名称',
  1208. columnHidden: false,
  1209. columnImage: false,
  1210. columnSortable: false,
  1211. sortLv: 0,
  1212. status: true,
  1213. fixed: '',
  1214. columnWidth: 140
  1215. },
  1216. {
  1217. userId: this.$store.state.user.name,
  1218. functionId: 103001,
  1219. serialNumber: '103001Table2FileRemark',
  1220. tableId: '103001Table2',
  1221. tableName: '文件信息表',
  1222. columnProp: 'fileRemark',
  1223. headerAlign: 'center',
  1224. align: 'center',
  1225. columnLabel: '备注',
  1226. columnHidden: false,
  1227. columnImage: false,
  1228. columnSortable: false,
  1229. sortLv: 0,
  1230. status: true,
  1231. fixed: '',
  1232. columnWidth: 240
  1233. },
  1234. // {
  1235. // userId: this.$store.state.user.name,
  1236. // functionId: 103001,
  1237. // serialNumber: '103001Table2OrderRef3',
  1238. // tableId: '103001Table2',
  1239. // tableName: '文件信息表',
  1240. // columnProp: 'orderRef3',
  1241. // headerAlign: 'center',
  1242. // align: 'center',
  1243. // columnLabel: '文件描述',
  1244. // columnHidden: false,
  1245. // columnImage: false,
  1246. // columnSortable: false,
  1247. // sortLv: 0,
  1248. // status: true,
  1249. // fixed: '',
  1250. // columnWidth: 120
  1251. // },
  1252. {
  1253. userId: this.$store.state.user.name,
  1254. functionId: 103001,
  1255. serialNumber: '103001Table2CreateDate',
  1256. tableId: '103001Table2',
  1257. tableName: '文件信息表',
  1258. columnProp: 'createDate',
  1259. headerAlign: 'center',
  1260. align: 'center',
  1261. columnLabel: '上传时间',
  1262. columnHidden: false,
  1263. columnImage: false,
  1264. columnSortable: false,
  1265. sortLv: 0,
  1266. status: true,
  1267. fixed: '',
  1268. columnWidth: 140
  1269. },
  1270. {
  1271. userId: this.$store.state.user.name,
  1272. functionId: 103001,
  1273. serialNumber: '103001Table2CreatedBy',
  1274. tableId: '103001Table2',
  1275. tableName: '文件信息表',
  1276. columnProp: 'createBy',
  1277. headerAlign: 'center',
  1278. align: 'center',
  1279. columnLabel: '上传人',
  1280. columnHidden: false,
  1281. columnImage: false,
  1282. columnSortable: false,
  1283. sortLv: 0,
  1284. status: true,
  1285. fixed: '',
  1286. columnWidth: 140
  1287. }
  1288. ],
  1289. }
  1290. },
  1291. mounted() {
  1292. this.$nextTick(() => {
  1293. this.height = window.innerHeight - 520;
  1294. })
  1295. },
  1296. methods: {
  1297. isAuth,
  1298. // 获取基础数据列表S
  1299. getBaseList (val, type) {
  1300. this.tagNo = val
  1301. this.tagNo2 = type
  1302. this.$nextTick(() => {
  1303. let strVal = ''
  1304. if (val === 1010) {
  1305. if(type==1) {
  1306. strVal = this.searchData.projectType
  1307. }
  1308. }
  1309. this.$refs.baseList.init(val, strVal)
  1310. })
  1311. },
  1312. /* 列表方法的回调 */
  1313. getBaseData (val) {
  1314. if (this.tagNo === 1010) {
  1315. if(this.tagNo2==1) {
  1316. this.searchData.projectType = val.Base_desc
  1317. }
  1318. }
  1319. },
  1320. // 新增 / 修改
  1321. addOrUpdateHandle (id) {
  1322. this.addOrUpdateVisible = true
  1323. this.addOrUpdate = id;
  1324. this.$nextTick(() => {
  1325. this.$refs.addOrUpdate.init();
  1326. if (id && id !== 'save' && id !== 'update'){
  1327. this.$refs.addOrUpdate.updateDataForm(id);
  1328. }
  1329. })
  1330. },
  1331. UpdateHandle (row) {
  1332. let inData={
  1333. site:row.site,
  1334. username:this.$store.state.user.name,
  1335. userId:this.$store.state.user.id,
  1336. projectId:row.projectId
  1337. }
  1338. getProjectUserRole(inData).then(({data}) => {
  1339. if(data.row.superFlag==='Y'||data.row.updateFlag==='Y') {
  1340. this.addOrUpdateVisible = true
  1341. this.addOrUpdate = 'update';
  1342. this.$nextTick(() => {
  1343. this.$refs.addOrUpdate.init(row.id)
  1344. })
  1345. }else {
  1346. this.$alert('没有权限修改这个项目信息!', '错误', {
  1347. confirmButtonText: '确定'
  1348. })
  1349. }
  1350. })
  1351. },
  1352. //导出excel
  1353. async createExportData() {
  1354. this.searchData.limit = -1
  1355. this.searchData.page = 1
  1356. await projectInfoSearch(this.searchData).then(({data}) => {
  1357. this.exportList= data.page.list;
  1358. })
  1359. return this.exportList;
  1360. },
  1361. startDownload() {
  1362. },
  1363. finishDownload() {
  1364. },
  1365. fields() {
  1366. let json = "{"
  1367. this.columnList1.forEach((item, index) => {
  1368. if (index == this.columnList1.length - 1) {
  1369. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1370. } else {
  1371. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1372. }
  1373. })
  1374. json += "}"
  1375. let s = eval("(" + json + ")")
  1376. return s
  1377. },
  1378. //导出excel
  1379. async createExportData2() {
  1380. return this.contactList;
  1381. },
  1382. startDownload2() {
  1383. // this.exportData = this.dataList
  1384. },
  1385. finishDownload2() {
  1386. },
  1387. fields2() {
  1388. let json = "{"
  1389. this.columnList2.forEach((item, index) => {
  1390. if (index == this.columnList2.length - 1) {
  1391. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
  1392. } else {
  1393. json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
  1394. }
  1395. })
  1396. json += "}"
  1397. let s = eval("(" + json + ")")
  1398. return s
  1399. },
  1400. // 导出 end
  1401. // 获取数据列表
  1402. search2 (projectId) {
  1403. this.searchData.projectId = projectId
  1404. this.search()
  1405. },
  1406. search () {
  1407. this.searchData.limit = this.pageSize
  1408. this.searchData.page = this.pageIndex
  1409. this.searchData.userId = this.$store.state.user.id
  1410. projectInfoSearch(this.searchData).then(({data}) => {
  1411. if (data.code == 0) {
  1412. this.dataList1 = data.page.list
  1413. this.pageIndex = data.page.currPage
  1414. this.pageSize = data.page.pageSize
  1415. this.totalPage = data.page.totalCount
  1416. if(this.dataList1.length>0){
  1417. this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
  1418. this.changeData(this.dataList1[0])
  1419. }
  1420. }
  1421. this.dataListLoading = false
  1422. this.isFilterSearch = false
  1423. })
  1424. },
  1425. //单击切换订单
  1426. changeData(row) {
  1427. this.currentRow = JSON.parse(JSON.stringify(row));
  1428. this.projectData=row;
  1429. let inData= {
  1430. site:row.site,
  1431. customerNo:row.customerId,
  1432. page: 1,
  1433. limit: 10,
  1434. }
  1435. this.refreshCurrentTabTable ();
  1436. customerInformationSearchForCheck(inData).then(({data}) => {
  1437. if (data.code == 0) {
  1438. if(data.page.list.length>0){
  1439. this.customerData=data.page.list[0]
  1440. }
  1441. }
  1442. })
  1443. let inData2= {
  1444. site:row.site,
  1445. customerNo:row.finalCustomerId,
  1446. page: 1,
  1447. limit: 10,
  1448. }
  1449. customerInformationSearchForCheck(inData2).then(({data}) => {
  1450. if (data.code == 0) {
  1451. if(data.page.list.length>0){
  1452. this.finalCustomerData=data.page.list[0]
  1453. }
  1454. }
  1455. })
  1456. },
  1457. addUploadFileModal(){
  1458. let currentData = {
  1459. site: this.currentRow.site,
  1460. createBy: this.$store.state.user.name,
  1461. projectId: this.currentRow.projectId,
  1462. projectName: this.currentRow.projectName,
  1463. remark: '',
  1464. };
  1465. //打开组件 去做新增业务
  1466. this.$nextTick(() => {
  1467. this.$refs.projectUploadFile.init(currentData);
  1468. })
  1469. },
  1470. deleteFile(row){
  1471. this.$confirm('确定要删除此文件?', '提示', {
  1472. confirmButtonText: '确定',
  1473. cancelButtonText: '取消',
  1474. type: 'warning'
  1475. }).then(() => {
  1476. deleteProjectFile(row).then(({data}) => {
  1477. if (data && data.code == 0) {
  1478. this.getFileContentData();
  1479. this.$message({
  1480. message: '操作成功',
  1481. type: 'success',
  1482. duration: 1500,
  1483. onClose: () => {
  1484. }
  1485. })
  1486. } else {
  1487. this.$alert(data.msg, '错误', {
  1488. confirmButtonText: '确定'
  1489. })
  1490. }
  1491. })
  1492. }).catch(() => {
  1493. })
  1494. },
  1495. // 刷新页签的table数据
  1496. refreshCurrentTabTable () {
  1497. if (this.activeName == 'down') {
  1498. // this.getFileContentData();
  1499. }
  1500. if (this.activeName == 'customer_contact') {
  1501. this.getCustomerContactData();
  1502. }
  1503. if (this.activeName == 'part') {
  1504. this.refreshPartTable();
  1505. }
  1506. if (this.activeName == 'quotation') {
  1507. this.refreshQuotationTable();
  1508. }
  1509. if (this.activeName == 'quotationHeader') {
  1510. this.refreshQuotationHeaderTable();
  1511. }
  1512. if (this.activeName == 'sample') {
  1513. this.refreshSampleTable();
  1514. }
  1515. if (this.activeName == 'test') {
  1516. this.refreshTestTable();
  1517. }
  1518. if (this.activeName == 'toolApply') {
  1519. this.refreshToolApplyTable();
  1520. }
  1521. if (this.activeName == 'technicalSpecification') {
  1522. this.refreshTechnicalSpecificationTable();
  1523. }
  1524. if (this.activeName === 'changeRecord') {
  1525. this.getChangeRecordList()
  1526. }
  1527. },
  1528. // 获取变更记录
  1529. getChangeRecordList () {
  1530. let tempData = {
  1531. site: this.$store.state.user.site,
  1532. projectId: this.currentRow.projectId,
  1533. menuId: '108002'
  1534. }
  1535. getChangeRecordByPartNo(tempData).then(({data}) => {
  1536. if (data && data.code === 0) {
  1537. this.changeRecordList = data.rows
  1538. } else {
  1539. this.changeRecordList = []
  1540. }
  1541. })
  1542. },
  1543. refreshPartTable(){
  1544. let inData = {
  1545. site: this.currentRow.site,
  1546. projectId: this.currentRow.projectId,
  1547. username: this.$store.state.user.name,
  1548. customerId: this.currentRow.customerId
  1549. }
  1550. this.$refs.projectPart.init(inData)
  1551. },
  1552. refreshTechnicalSpecificationTable(){
  1553. let inData={
  1554. site: this.currentRow.site,
  1555. projectId: this.currentRow.projectId,
  1556. userName:this.$store.state.user.name,
  1557. page: 1,
  1558. limit: 1000
  1559. }
  1560. this.$refs.technicalSpecification.init(inData)
  1561. },
  1562. refreshQuotationHeaderTable(){
  1563. let inData={
  1564. site: this.currentRow.site,
  1565. projectId: this.currentRow.projectId,
  1566. createBy:this.$store.state.user.name,
  1567. no: 1,
  1568. size: 1000
  1569. }
  1570. this.$refs.quotationHeader.init(inData)
  1571. },
  1572. refreshQuotationTable(){
  1573. let inData={
  1574. site: this.currentRow.site,
  1575. projectId: this.currentRow.projectId,
  1576. createBy:this.$store.state.user.name,
  1577. menuId:102001,
  1578. page: 1,
  1579. limit: 1000
  1580. }
  1581. this.$refs.projectQuotation.init(inData)
  1582. },
  1583. refreshSampleTable(){
  1584. let inData={
  1585. site: this.currentRow.site,
  1586. projectId: this.currentRow.projectId,
  1587. createBy:this.$store.state.user.name,
  1588. menuId:103001,
  1589. page: 1,
  1590. limit: 1000
  1591. }
  1592. this.$refs.sample.init(inData)
  1593. },
  1594. refreshTestTable(){
  1595. let inData={
  1596. site: this.currentRow.site,
  1597. projectId: this.currentRow.projectId,
  1598. createBy:this.$store.state.user.name,
  1599. menuId:107001,
  1600. page: 1,
  1601. limit: 1000
  1602. }
  1603. this.$refs.test.init(inData)
  1604. },
  1605. refreshToolApplyTable(){
  1606. let inData={
  1607. site: this.currentRow.site,
  1608. orderRef1: this.currentRow.projectId,
  1609. username:this.$store.state.user.name,
  1610. }
  1611. this.$refs.toolApply.init(inData)
  1612. },
  1613. //刷新派设备文档的列表
  1614. getFileContentData() {
  1615. let currentData = {orderRef2: this.currentRow.projectId};
  1616. getFileContentList(currentData).then(({data}) => {
  1617. //区分请求成功和失败的状况
  1618. if (data && data.code == 200) {
  1619. this.fileContentList = data.rows;
  1620. } else {
  1621. this.fileContentList = [];
  1622. }
  1623. });
  1624. },
  1625. // 下载
  1626. downloadFile(row){
  1627. // axios.get('/proxyApi/pms/eamProject/downLoadProjectFile/' + row.id, {
  1628. // responseType: 'blob',
  1629. // headers: {
  1630. // 'Content-Type': 'application/json',
  1631. // 'token': Vue.cookie.get('token')
  1632. // }
  1633. // })
  1634. let inData={
  1635. site:this.currentRow.site,
  1636. username:this.$store.state.user.name,
  1637. userId:this.$store.state.user.id,
  1638. projectId:this.currentRow.projectId
  1639. }
  1640. getProjectUserRole(inData).then(({data}) => {
  1641. if(data.row.superFlag==='Y'||data.row.downFlag==='Y') {
  1642. downLoadProjectFile(row)
  1643. .then(({data}) => {
  1644. // 不限制文件下载类型
  1645. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  1646. // 下载文件名称
  1647. const fileName = row.fileName
  1648. // a标签下载
  1649. const linkNode = document.createElement('a')
  1650. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  1651. linkNode.style.display = 'none'
  1652. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  1653. console.log(linkNode)
  1654. // if(val == 'Y'){
  1655. // this.pdfVisible = true
  1656. // this.pdfUrl = linkNode.href
  1657. // }else {
  1658. document.body.appendChild(linkNode)
  1659. linkNode.click() // 模拟在按钮上的一次鼠标单击
  1660. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  1661. document.body.removeChild(linkNode)
  1662. // }
  1663. })
  1664. }else {
  1665. this.$alert('没有权限下载这个项目的文件!', '错误', {
  1666. confirmButtonText: '确定'
  1667. })
  1668. }
  1669. })
  1670. },
  1671. // 每页数
  1672. sizeChangeHandle (val) {
  1673. this.pageSize = val
  1674. this.pageIndex = 1
  1675. if ( this.isFilterSearch === false){
  1676. this.search()
  1677. } else {
  1678. this.projectInfoSearchByAnyField(this.filterSearchData)
  1679. }
  1680. },
  1681. // 当前页
  1682. currentChangeHandle (val) {
  1683. this.pageIndex = val
  1684. if ( this.isFilterSearch === false){
  1685. this.search()
  1686. } else {
  1687. this.projectInfoSearchByAnyField(this.filterSearchData)
  1688. }
  1689. },
  1690. // 动态列开始 获取 用户保存的 格式列
  1691. async getTableUserColumn(tableId, columnId) {
  1692. let queryTableUser = {
  1693. userId: this.$store.state.user.name,
  1694. functionId: this.$route.meta.menuId,
  1695. tableId: tableId,
  1696. status: true,
  1697. languageCode: this.$i18n.locale
  1698. }
  1699. await getTableUserListLanguage(queryTableUser).then(({data}) => {
  1700. if (data.rows.length > 0) {
  1701. //this.columnList = []
  1702. switch (columnId) {
  1703. case 1:
  1704. this.columnList1 = data.rows
  1705. this.checkField();
  1706. break;
  1707. // case 2:
  1708. // this.columnList1 = data.rows
  1709. // break;
  1710. // case 3:
  1711. // this.columnList2 = data.rows
  1712. // break;
  1713. // case 4:
  1714. // this.columnList3 = data.rows
  1715. // break;
  1716. }
  1717. } else {
  1718. this.getColumnList(tableId, columnId)
  1719. }
  1720. })
  1721. },
  1722. // 获取 tableDefault 列
  1723. async getColumnList(tableId, columnId) {
  1724. let queryTable= {
  1725. functionId: this.$route.meta.menuId,
  1726. tableId: tableId,
  1727. languageCode: this.$i18n.locale
  1728. }
  1729. await getTableDefaultListLanguage(queryTable).then(({data}) => {
  1730. if (!data.rows.length == 0) {
  1731. switch (columnId) {
  1732. case 1:
  1733. this.columnList1 = data.rows
  1734. this.checkField();
  1735. break;
  1736. // case 2:
  1737. // this.columnList1 = data.rows
  1738. // break;
  1739. // case 3:
  1740. // this.columnList2 = data.rows
  1741. // break;
  1742. // case 4:
  1743. // this.columnList3 = data.rows
  1744. // break;
  1745. }
  1746. } else {
  1747. // this.showDefault = true.
  1748. }
  1749. })
  1750. },
  1751. //动态列结束
  1752. // 列表表格选择替换
  1753. tabClick (tab, event) {
  1754. // 刷新列表数据
  1755. this.refreshCurrentTabTable()
  1756. },
  1757. getCustomerContactData () {
  1758. let inData = {
  1759. site:this.currentRow.site,
  1760. customerId:this.currentRow.customerId,
  1761. projectId:this.currentRow.projectId,
  1762. }
  1763. getCustomerContactData(inData).then(({data}) => {
  1764. //区分请求成功和失败的状况
  1765. if (data && data.code == 0) {
  1766. this.contactList = data.rows;
  1767. } else {
  1768. this.contactList = [];
  1769. }
  1770. });
  1771. },
  1772. // contactChooseModal () {
  1773. // if (this.currentRow == null || this.currentRow === '') {
  1774. // this.$alert('请选择项目!', '错误', {
  1775. // confirmButtonText: '确定'
  1776. // })
  1777. // return false
  1778. // }
  1779. // let inData = {
  1780. // site:this.currentRow.site,
  1781. // customerId:this.currentRow.customerId,
  1782. // projectId:this.currentRow.projectId,
  1783. // }
  1784. // getContactChooseData(inData).then(({data}) => {
  1785. // //区分请求成功和失败的状况
  1786. // if (data && data.code == 0) {
  1787. // this.contactChooseList1 = data.rows1;
  1788. // this.contactChooseList2 = data.rows2;
  1789. //
  1790. // } else {
  1791. // this.contactChooseList1 = [];
  1792. // this.contactChooseList2 = [];
  1793. // }
  1794. // });
  1795. // this.contactChooseFlag=true;
  1796. // },
  1797. contactChooseModal () {
  1798. if (this.currentRow == null || this.currentRow === '') {
  1799. this.$alert('请选择项目!', '错误', {
  1800. confirmButtonText: '确定'
  1801. })
  1802. return false
  1803. }
  1804. let inData = {
  1805. site: this.currentRow.site,
  1806. customerId: this.currentRow.customerId,
  1807. projectId: this.currentRow.projectId
  1808. }
  1809. this.contactSelections1 = null
  1810. this.contactSelections2 = null
  1811. this.contactData.contactName = ''
  1812. getContactChooseData2(inData).then(({data}) => {
  1813. //区分请求成功和失败的状况
  1814. if (data && data.code === 0) {
  1815. this.contactChooseList1 = data.rows1
  1816. this.contactChooseList2 = data.rows2
  1817. }
  1818. })
  1819. this.contactChooseFlag = true
  1820. },
  1821. // 查询物料项目
  1822. queryCustomerContact () {
  1823. this.contactData.projectId = this.currentRow.projectId
  1824. this.contactData.customerId = this.currentRow.customerId
  1825. queryCustomerContact(this.contactData).then(({data}) => {
  1826. if (data && data.code === 0) {
  1827. this.contactChooseList1 = data.rows
  1828. } else {
  1829. this.contactChooseList1 = []
  1830. }
  1831. })
  1832. },
  1833. // 可选联系人
  1834. contactClickRow1 (row) {
  1835. this.$refs.contactTable1.toggleRowSelection(row)
  1836. },
  1837. // 已有联系人
  1838. contactClickRow2 (row) {
  1839. this.$refs.contactTable2.toggleRowSelection(row)
  1840. },
  1841. selectionContact1 (val) {
  1842. this.contactSelections1 = val
  1843. },
  1844. selectionContact2 (val) {
  1845. this.contactSelections2 = val
  1846. },
  1847. // 客户联系人新增
  1848. addContact () {
  1849. if (this.contactSelections1 == null || this.contactSelections1.length === 0) {
  1850. this.$message.warning('请选择可选联系人!')
  1851. return
  1852. }
  1853. let inData = {
  1854. site: this.currentRow.site,
  1855. customerId: this.currentRow.customerId,
  1856. projectId: this.currentRow.projectId,
  1857. contactList2: this.contactSelections1
  1858. }
  1859. addContact(inData).then(({data}) => {
  1860. if (data && data.code === 0) {
  1861. getContactChooseData2(inData).then(({data}) => {
  1862. //区分请求成功和失败的状况
  1863. if (data && data.code === 0) {
  1864. this.contactChooseList1 = data.rows1
  1865. this.contactChooseList2 = data.rows2
  1866. }
  1867. })
  1868. this.getCustomerContactData()
  1869. this.contactSelections1 = []
  1870. } else {
  1871. this.$alert(data.msg, '错误', {
  1872. confirmButtonText: '确定'
  1873. })
  1874. }
  1875. })
  1876. },
  1877. // 客户联系人删除
  1878. deleteContact () {
  1879. if (this.contactSelections2 == null || this.contactSelections2.length === 0) {
  1880. this.$message.warning('请选择已有联系人!')
  1881. return
  1882. }
  1883. let inData = {
  1884. site: this.currentRow.site,
  1885. customerId: this.currentRow.customerId,
  1886. projectId: this.currentRow.projectId,
  1887. contactList2: this.contactSelections2
  1888. }
  1889. deleteContact(inData).then(({data}) => {
  1890. if (data && data.code === 0) {
  1891. getContactChooseData2(inData).then(({data}) => {
  1892. //区分请求成功和失败的状况
  1893. if (data && data.code === 0) {
  1894. this.contactChooseList1 = data.rows1
  1895. this.contactChooseList2 = data.rows2
  1896. }
  1897. })
  1898. this.getCustomerContactData()
  1899. this.contactSelections2 = []
  1900. } else {
  1901. this.$alert(data.msg, '错误', {
  1902. confirmButtonText: '确定'
  1903. })
  1904. }
  1905. })
  1906. },
  1907. saveProjectContactList(){
  1908. let data={
  1909. site:this.currentRow.site,
  1910. customerId:this.currentRow.customerId,
  1911. projectId:this.currentRow.projectId,
  1912. contactList:this.contactChooseList1
  1913. }
  1914. saveProjectContactList(data).then(({data}) => {
  1915. if (data && data.code === 0) {
  1916. this.$message.success( '操作成功')
  1917. this.contactChooseFlag = false
  1918. this.refreshCurrentTabTable()
  1919. } else {
  1920. this.$message.error(data.msg)
  1921. }
  1922. })
  1923. },
  1924. deleteProjectInfo(row){
  1925. let inData={
  1926. site:row.site,
  1927. username:this.$store.state.user.name,
  1928. userId:this.$store.state.user.id,
  1929. projectId:row.projectId
  1930. }
  1931. getProjectUserRole(inData).then(({data}) => {
  1932. if(data.row.superFlag==='Y'||data.row.deleteFlag==='Y') {
  1933. this.$confirm(`确定删除当前记录?`, '提示', {
  1934. confirmButtonText: '确定',
  1935. cancelButtonText: '取消',
  1936. type: 'warning'
  1937. }).then(() => {
  1938. // 校验附件信息
  1939. const ossCheck = new Promise((resolve, reject) => {
  1940. let ossParams = {
  1941. orderRef1: row.site,
  1942. orderRef2: row.projectId
  1943. }
  1944. queryOss(ossParams).then(({data}) => {
  1945. if (data && data.code === 0) {
  1946. if (data.rows.length===0) {
  1947. resolve(true);
  1948. }else {
  1949. reject(new Error('该项目已存在附件,不允许删除!'))
  1950. this.$alert('该项目已存在附件,不允许删除!', '提示', {
  1951. confirmButtonText: '确定'
  1952. })
  1953. }
  1954. } else {
  1955. this.$message.warning(data.msg);
  1956. }
  1957. }).catch((error) => {
  1958. this.$message.error(error);
  1959. })
  1960. })
  1961. // 校验项目物料
  1962. const partCheck = new Promise((resolve, reject) => {
  1963. let partParams = {
  1964. site: row.site,
  1965. projectId: row.projectId,
  1966. searchType: 'Y',
  1967. username: this.$store.state.user.name,
  1968. customerId: row.customerId,
  1969. limit: 10,
  1970. limit2: 20,
  1971. page: 1,
  1972. page2: 1
  1973. }
  1974. getProjectInfoPartList(partParams).then(({data}) => {
  1975. if (data && data.code === 0) {
  1976. if (data.page.list.length===0){
  1977. resolve(true);
  1978. } else {
  1979. reject(new Error('该项目已绑定物料信息,不允许删除!'))
  1980. this.$alert('该项目已绑定物料信息,不允许删除!', '提示', {
  1981. confirmButtonText: '确定'
  1982. })
  1983. }
  1984. }
  1985. })
  1986. })
  1987. // 校验询价信息
  1988. const quotationCheck = new Promise((resolve, reject) => {
  1989. let quotationParams = {
  1990. site: row.site,
  1991. projectId: row.projectId,
  1992. createBy: this.$store.state.user.name,
  1993. menuId: '102001',
  1994. limit: 10,
  1995. page: 1
  1996. }
  1997. quotationInformationSearch(quotationParams).then(({data}) => {
  1998. //区分请求成功和失败的状况
  1999. if (data && data.code === 0) {
  2000. if(data.page.list.length===0){
  2001. resolve(true);
  2002. }else {
  2003. reject(new Error('该项目已存在询价信息,不允许删除!'))
  2004. this.$alert('该项目已存在询价信息,不允许删除!', '提示', {
  2005. confirmButtonText: '确定'
  2006. })
  2007. }
  2008. } else {
  2009. this.$message.warning(data.msg);
  2010. }
  2011. });
  2012. })
  2013. // 校验项目报价信息
  2014. const quoteCheck = new Promise((resolve, reject) => {
  2015. let quoteParams = {
  2016. site: row.site,
  2017. projectNo: row.projectId
  2018. }
  2019. queryQuoteGroupDetailByInquiry(quoteParams).then(({data})=>{
  2020. if (data && data.code === 0){
  2021. if (data.rows.length===0){
  2022. resolve(true);
  2023. }else {
  2024. reject(new Error('该项目已存在报价信息,不允许删除!'))
  2025. this.$alert('该项目已存在报价信息,不允许删除!', '提示', {
  2026. confirmButtonText: '确定'
  2027. })
  2028. }
  2029. }else {
  2030. this.$message.warning(data.msg);
  2031. }
  2032. })
  2033. })
  2034. // 校验项目打样信息
  2035. const proofingCheck = new Promise((resolve, reject) => {
  2036. let proofingParams = {
  2037. site: row.site,
  2038. projectId: row.projectId,
  2039. createBy: this.$store.state.user.name,
  2040. menuId: '103001',
  2041. limit: 10,
  2042. page: 1
  2043. }
  2044. proofingInformationSearch(proofingParams).then(({data}) => {
  2045. if (data && data.code === 0) {
  2046. if (data.page.list.length===0){
  2047. resolve(true);
  2048. }else {
  2049. reject(new Error('该项目已存在打样信息,不允许删除!'))
  2050. this.$alert('该项目已存在打样信息,不允许删除!', '提示', {
  2051. confirmButtonText: '确定'
  2052. })
  2053. }
  2054. } else {
  2055. this.$message.warning(data.msg)
  2056. }
  2057. })
  2058. })
  2059. // 校验项目测试记录
  2060. const testCheck = new Promise((resolve, reject) => {
  2061. let testParams = {
  2062. site: row.site,
  2063. projectId: row.projectId,
  2064. createBy: this.$store.state.user.name,
  2065. menuId: '107001',
  2066. limit: 10,
  2067. page: 1
  2068. }
  2069. testInformationList(testParams).then(({data}) => {
  2070. if (data && data.code === 0) {
  2071. if (data.rows.length===0){
  2072. resolve(true);
  2073. } else {
  2074. reject(new Error('该项目已存在测试记录,不允许删除!'))
  2075. this.$alert('该项目已存在测试记录,不允许删除!', '提示', {
  2076. confirmButtonText: '确定'
  2077. })
  2078. }
  2079. } else {
  2080. this.$message.warning(data.msg);
  2081. }
  2082. });
  2083. })
  2084. // 检验刀模申请
  2085. const toolCheck = new Promise((resolve, reject) => {
  2086. let toolParams = {
  2087. orderRef1: row.projectId,
  2088. site: row.site,
  2089. username: this.$store.state.user.name,
  2090. }
  2091. searchProjectToolApplyDetail(toolParams).then(({data}) => {
  2092. if (data && data.code === 0) {
  2093. if (data.rows.length===0){
  2094. resolve(true);
  2095. } else {
  2096. reject(new Error('该项目已存在刀模申请,不允许删除!'))
  2097. this.$alert('该项目已存在刀模申请,不允许删除!', '提示', {
  2098. confirmButtonText: '确定'
  2099. })
  2100. }
  2101. } else {
  2102. this.$message.warning(data.msg)
  2103. }
  2104. })
  2105. })
  2106. // 校验技术参数卡
  2107. const technicalSpecificationCheck = new Promise((resolve, reject) => {
  2108. let technicalSpecificationParams = {
  2109. site: row.site,
  2110. userName: this.$store.state.user.name,
  2111. projectId: row.projectId,
  2112. page: 1,
  2113. limit: 10
  2114. }
  2115. technicalSpecificationListSearch(technicalSpecificationParams).then(({data}) => {
  2116. if (data && data.code === 0) {
  2117. if (data.page.list.length===0){
  2118. resolve(true);
  2119. } else {
  2120. this.$alert('该项目已绑定技术参数卡,不允许删除!', '提示', {
  2121. confirmButtonText: '确定'
  2122. })
  2123. reject(new Error('该项目已绑定技术参数卡,不允许删除!'))
  2124. }
  2125. } else {
  2126. this.$message.warning(data.msg);
  2127. }
  2128. });
  2129. })
  2130. // 校验项目变更记录
  2131. const changeCheck = new Promise((resolve, reject) => {
  2132. let changeParams = {
  2133. site: row.site,
  2134. projectId: row.projectId,
  2135. menuId: '108002'
  2136. }
  2137. getChangeRecordByPartNo(changeParams).then(({data}) => {
  2138. if (data && data.code === 0) {
  2139. if (data.rows.length===0){
  2140. resolve(true);
  2141. } else {
  2142. this.$alert('该项目已存在变更记录,不允许删除!', '提示', {
  2143. confirmButtonText: '确定'
  2144. })
  2145. reject(new Error('该项目已存在变更记录,不允许删除!'))
  2146. }
  2147. } else {
  2148. this.$message.warning(data.msg)
  2149. }
  2150. })
  2151. })
  2152. return Promise.all([
  2153. ossCheck,
  2154. partCheck,
  2155. quotationCheck,
  2156. quoteCheck,
  2157. proofingCheck,
  2158. testCheck,
  2159. toolCheck,
  2160. technicalSpecificationCheck,
  2161. changeCheck
  2162. ]);
  2163. }).then(()=>{
  2164. deleteProjectInfo(row).then(({data}) => {
  2165. if (data && data.code === 0) {
  2166. this.$message.success( '操作成功')
  2167. this.contactChooseFlag = false
  2168. this.search()
  2169. } else {
  2170. this.$message.error(data.msg)
  2171. }
  2172. })
  2173. })
  2174. }else {
  2175. this.$alert('没有权限删除这个项目信息!', '错误', {
  2176. confirmButtonText: '确定'
  2177. })
  2178. }
  2179. })
  2180. },
  2181. checkField(){
  2182. if(!this.accessField('10202001')){
  2183. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerId');
  2184. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'customerName');
  2185. }
  2186. if(!this.accessField('10202002')){
  2187. this.columnList1=this.columnList1.filter(item => item.columnProp !== 'projectSource');
  2188. }
  2189. },
  2190. toChangeMenu(changeNo){
  2191. if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404'){
  2192. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  2193. }else {
  2194. this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo:changeNo},})
  2195. }
  2196. },
  2197. projectInfoSearchByAnyField(params){
  2198. params.no = this.pageIndex
  2199. params.size = this.pageSize
  2200. params.site = this.$store.state.user.site
  2201. params.userName = this.$store.state.user.name
  2202. params.userId = this.$store.state.user.id.toString()
  2203. projectInfoSearchByAnyField(params).then(({data})=>{
  2204. if (data && data.code === 0){
  2205. this.dataList1 = data.page.list
  2206. this.totalPage = data.page.totalCount
  2207. }else {
  2208. this.$message.warning(data.msg)
  2209. }
  2210. }).catch((error)=>{
  2211. this.$message.error(error)
  2212. })
  2213. this.filterSearchData = params
  2214. this.filterVisible = false
  2215. this.isFilterSearch = true
  2216. },
  2217. },
  2218. activated() {
  2219. if (this.$route.params.projectId){
  2220. this.searchData.projectId = this.$route.params.projectId
  2221. this.search();
  2222. }
  2223. // this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
  2224. },
  2225. }
  2226. </script>
  2227. <style scoped lang="scss">
  2228. /deep/ .customer-tab .el-tabs__content {
  2229. padding: 5px !important;
  2230. }
  2231. .el-transfer-panel {
  2232. border: 2px solid #17b3a3;
  2233. border-radius: 4px;
  2234. overflow: hidden;
  2235. background: #fff;
  2236. display: inline-block;
  2237. vertical-align: middle;
  2238. width: 200px;
  2239. max-height: 100%;
  2240. -webkit-box-sizing: border-box;
  2241. box-sizing: border-box;
  2242. position: relative;
  2243. }
  2244. .el-transfer-panel .el-transfer-panel__header {
  2245. height: 40px;
  2246. line-height: 40px;
  2247. background: #17b3a3;
  2248. margin: 0;
  2249. padding-left: 15px;
  2250. border-bottom: 1px solid #17b3a3;
  2251. -webkit-box-sizing: border-box;
  2252. box-sizing: border-box;
  2253. color: #000;
  2254. }
  2255. .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label {
  2256. font-size: 14px;
  2257. color: #303133;
  2258. font-weight: 400;
  2259. }
  2260. </style>