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.

2401 lines
81 KiB

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