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.

3441 lines
133 KiB

2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
2 years ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
2 years ago
12 months ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item :label="'BU'">
  6. <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 80px">
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buNo"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="PLM物料编码">
  16. <el-input v-model="searchData.testPartNo" clearable style="width: 120px"/>
  17. </el-form-item>
  18. <el-form-item label="IFS物料编码">
  19. <el-input v-model="searchData.partNo" clearable style="width: 120px"/>
  20. </el-form-item>
  21. <el-form-item label="物料名称">
  22. <el-input v-model="searchData.partDesc" clearable style="width: 300px"/>
  23. </el-form-item>
  24. <el-form-item label="客户编码">
  25. <el-input v-model="searchData.customerId" clearable style="width: 120px"/>
  26. </el-form-item>
  27. <el-form-item label="客户名称">
  28. <el-input v-model="searchData.customerDesc" clearable style="width: 150px"/>
  29. </el-form-item>
  30. </el-form>
  31. <el-form :inline="true" label-position="top" :model="searchData">
  32. <el-form-item :label="'状态'">
  33. <el-select v-model="searchData.status" clearable style="width: 80px">
  34. <el-option label="草稿" value="cg"></el-option>
  35. <el-option label="审批中" value="spz"></el-option>
  36. <el-option label="已升版" value="death"></el-option>
  37. <el-option label="已完成" value="已完成"></el-option>
  38. <el-option label="Dead" value="dead"></el-option>
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item label="项目号">
  42. <el-input v-model="searchData.projectId" clearable style="width: 120px"/>
  43. </el-form-item>
  44. <el-form-item label="项目名称">
  45. <el-input v-model="searchData.projectDesc" clearable style="width: 215px"/>
  46. </el-form-item>
  47. <el-form-item label="技术参数卡编码">
  48. <el-input v-model="searchData.oriCodeNo" clearable style="width: 150px"/>
  49. </el-form-item>
  50. <el-form-item label=" ">
  51. <el-button plain type="primary" :loading="searchLoading" @click="getDataList">查询</el-button>
  52. <el-button type="primary" :loading="saveDataLoading" @click="changeModel">变更申请</el-button>
  53. <download-excel
  54. :fields="fields()"
  55. :data="exportData"
  56. type="xls"
  57. :name="exportName"
  58. :header="exportHeader"
  59. :footer="exportFooter"
  60. :fetch="createExportData"
  61. :before-generate="startDownload"
  62. :before-finish="finishDownload"
  63. worksheet="导出信息"
  64. class="el-button el-button--primary el-button--medium">
  65. {{ "导出" }}
  66. </download-excel>
  67. <el-button @click="filterVisible = true">搜索</el-button>
  68. </el-form-item>
  69. </el-form>
  70. <!-- 数据列表 -->
  71. <el-table
  72. :height="height"
  73. :data="dataList"
  74. border
  75. @selection-change="selectionData"
  76. style="width: 100%;">
  77. <el-table-column
  78. type="selection"
  79. header-align="center"
  80. align="center"
  81. width="50">
  82. </el-table-column>
  83. <el-table-column
  84. v-for="(item,index) in columnList" :key="index"
  85. :sortable="item.columnSortable"
  86. :prop="item.columnProp"
  87. :header-align="item.headerAlign"
  88. :show-overflow-tooltip="item.showOverflowTooltip"
  89. :align="item.align"
  90. :fixed="item.fixed === ''?false:item.fixed"
  91. :min-width="item.columnWidth"
  92. :label="item.columnLabel">
  93. <template slot-scope="scope">
  94. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  95. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. <selectDiv ref="selectDiv"></selectDiv>
  100. <!-- 分页插件 -->
  101. <el-pagination style="margin-top: 0px"
  102. @size-change="sizeChangeHandle"
  103. @current-change="currentChangeHandle"
  104. :current-page="pageIndex"
  105. :page-sizes="[20, 50, 100, 200, 500]"
  106. :page-size="pageSize"
  107. :total="totalPage"
  108. layout="total, sizes, prev, pager, next, jumper">
  109. </el-pagination>
  110. <!-- 变更申请模态框 -->
  111. <el-dialog :title="changeTitle" :close-on-click-modal="false" top="8vh" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
  112. <el-tabs tab-position="left" type="border-card" v-model="activeName" @tab-click="refreshCurrentTabTable" style="width: 100%;height: 720px;">
  113. <el-tab-pane label="基本信息" name="basicInformation">
  114. <div style="height: 705px">
  115. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  116. <el-form-item prop="applicantId" :rules="rules.applicantId">
  117. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人/Applicant</a></span>
  118. <el-input v-model="modalData.applicantId" @blur="applicantBlur(103)" style="width: 120px"></el-input>
  119. <el-input v-model="modalData.applicantName" disabled style="width: 293px"></el-input>
  120. </el-form-item>
  121. <el-form-item label="申请部门/Department">
  122. <el-input v-model="modalData.applicationDepartmentId" readonly style="width: 120px"></el-input>
  123. <el-input v-model="modalData.applicationDepartmentName" disabled style="width: 293px"></el-input>
  124. </el-form-item>
  125. </el-form>
  126. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  127. <el-form-item label="申请日期/Apply Date" prop="applyDate" :rules="rules.applyDate">
  128. <el-date-picker
  129. style="width: 205px"
  130. v-model="modalData.applyDate"
  131. type="date"
  132. value-format="yyyy-MM-dd"
  133. placeholder="请选择日期"
  134. :editable=false>
  135. </el-date-picker>
  136. </el-form-item>
  137. <!-- <el-form-item label="ECN变更影响" prop="changeImpact" :rules="rules.changeImpact">-->
  138. <!-- <dict-data-select v-if="modalFlag" v-model="modalData.changeImpact" style="width: 205px" dict-type="change_change_Impact"></dict-data-select>-->
  139. <!-- </el-form-item>-->
  140. <el-form-item label="变更影响描述/Description">
  141. <el-input v-model="modalData.changeImpactDesc" style="width: 629px"></el-input>
  142. </el-form-item>
  143. </el-form>
  144. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  145. <el-form-item label="ECN阶段/Stage" prop="ecnStage" :rules="rules.ecnStage">
  146. <dict-data-select v-if="modalFlag" v-model="modalData.ecnStage" style="width: 95px" dict-type="change_ecn_stage"></dict-data-select>
  147. </el-form-item>
  148. <el-form-item label="变更类别/Change Category" prop="changeType" :rules="rules.changeType">
  149. <dict-data-select v-if="modalFlag" v-model="modalData.changeType" style="width: 160px" dict-type="change_change_type"></dict-data-select>
  150. </el-form-item>
  151. <el-form-item label="ECN种类/ECN Category" prop="ecnType" :rules="rules.ecnType">
  152. <dict-data-select v-if="modalFlag" v-model="modalData.ecnType" style="width: 160px" dict-type="change_ecn_type"></dict-data-select>
  153. </el-form-item>
  154. <el-form-item label=" " style="margin-left: -10px">
  155. <el-button type="primary" @click="chooseEcnTypeModal" style="width: 70px">ECN种类</el-button>
  156. </el-form-item>
  157. <el-form-item label="变更生效日期/Change Effictive Date" prop="changePhaseInDate" :rules="rules.changePhaseInDate" style="margin-left: -10px">
  158. <el-date-picker
  159. style="width: 205px"
  160. v-model="modalData.changePhaseInDate"
  161. type="date"
  162. value-format="yyyy-MM-dd"
  163. placeholder="请选择日期"
  164. :editable=false>
  165. </el-date-picker>
  166. </el-form-item>
  167. <el-form-item label="是否DF产品/DF(Y/N)" prop="dfIsProduct" :rules="rules.dfIsProduct">
  168. <dict-data-select v-if="modalFlag" v-model="modalData.dfIsProduct" style="width: 108px" dict-type="change_df_is_product"></dict-data-select>
  169. </el-form-item>
  170. </el-form>
  171. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  172. <el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
  173. <span style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师/TP Engineer</a></span>
  174. <el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" style="width: 120px"></el-input>
  175. <el-input v-model="modalData.tpEngineerName" disabled style="width: 293px"></el-input>
  176. </el-form-item>
  177. <el-form-item label=" " prop="industrialEngineerId" :rules="[{required: modalData.dfIsProduct === 'Yes',message: ' ',trigger: ['blur','change']}]">
  178. <span style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a herf="#">关务人员/Customs</a></span>
  179. <el-input v-model="modalData.industrialEngineerId" @blur="industrialEngineerBlur(2006)" style="width: 120px"></el-input>
  180. <el-input v-model="modalData.industrialEngineerName" disabled style="width: 293px"></el-input>
  181. </el-form-item>
  182. <!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
  183. <!-- <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>-->
  184. <!-- </el-form-item>-->
  185. </el-form>
  186. <el-form :inline="true" label-position="top" :model="modalData">
  187. <el-form-item label=" ">
  188. <span style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a herf="#">质检人员/CQC</a></span>
  189. <el-input v-model="modalData.cqcOperatorId" @blur="cqcOperatorBlur(2007)" style="width: 120px"></el-input>
  190. <el-input v-model="modalData.cqcOperatorName" disabled style="width: 293px"></el-input>
  191. </el-form-item>
  192. <el-form-item label=" ">
  193. <span style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a herf="#">首件检测/FAI</a></span>
  194. <el-input v-model="modalData.faiOperatorId" @blur="faiOperatorBlur(2008)" style="width: 120px"></el-input>
  195. <el-input v-model="modalData.faiOperatorName" disabled style="width: 293px"></el-input>
  196. </el-form-item>
  197. </el-form>
  198. <el-form :inline="true" label-position="top" :model="modalData">
  199. <el-form-item label="DelegateAccess">
  200. <span style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  201. <el-input type="textarea" v-model="delegateAccessName" readonly :rows="2" resize='none' style="width: 848px"></el-input>
  202. </el-form-item>
  203. </el-form>
  204. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 30px">
  205. <el-form-item label="变更要求描述/Requirements Desc." prop="changeRequestDesc" :rules="rules.changeRequestDesc">
  206. <el-input type="textarea" v-model="modalData.changeRequestDesc" :rows="3" resize='none' show-word-limit style="width: 636px;height: 30px"></el-input>
  207. </el-form-item>
  208. <!-- <el-form-item label="是否重新报价" prop="isReQuote" :rules="rules.isReQuote">-->
  209. <!-- <dict-data-select v-model="modalData.isReQuote" style="width: 205px" dict-type="change_is_re_quote"></dict-data-select>-->
  210. <!-- <el-button type="primary" icon="el-icon-upload" @click="uploadFileModal" style="margin-top: 12px;width: 105px">文件上传</el-button>-->
  211. <!-- </el-form-item>-->
  212. <el-form-item label="印刷方式/Print Type" prop="printing" :rules="rules.printing">
  213. <dict-data-select v-if="modalFlag" v-model="modalData.printing" style="width: 198px" dict-type="change_printing"></dict-data-select>
  214. <el-button type="primary" icon="el-icon-upload" @click="uploadFileModal" style="margin-top: 15px;width: 105px">文件上传</el-button>
  215. </el-form-item>
  216. </el-form>
  217. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 50px">-->
  218. <!-- <el-form-item label="原产品是否UL认证要求" prop="ulCertificationRequirements" :rules="rules.ulCertificationRequirements">-->
  219. <!-- <dict-data-select v-model="modalData.ulCertificationRequirements" style="width: 423px" dict-type="change_ul_certification_requirements"></dict-data-select>-->
  220. <!-- </el-form-item>-->
  221. <!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="ulContinueToMeetDemand" :rules="rules.ulContinueToMeetDemand">-->
  222. <!-- <dict-data-select v-model="modalData.ulContinueToMeetDemand" style="width: 423px" dict-type="change_ul_continue_to_meet_demand"></dict-data-select>-->
  223. <!-- </el-form-item>-->
  224. <!-- </el-form>-->
  225. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">-->
  226. <!-- <el-form-item label="原产品是否GP要求" prop="gpCertificationRequirements" :rules="rules.gpCertificationRequirements">-->
  227. <!-- <dict-data-select v-model="modalData.gpCertificationRequirements" style="width: 423px" dict-type="change_gp_certification_requirements"></dict-data-select>-->
  228. <!-- </el-form-item>-->
  229. <!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="gpContinueToMeetDemand" :rules="rules.gpContinueToMeetDemand">-->
  230. <!-- <dict-data-select v-model="modalData.gpContinueToMeetDemand" style="width: 423px" dict-type="change_gp_continue_to_meet_demand"></dict-data-select>-->
  231. <!-- </el-form-item>-->
  232. <!-- </el-form>-->
  233. <el-form :inline="true" label-position="top" style="margin-top: 50px">
  234. <el-button type="primary" @click="addChangeDetail">新增</el-button>
  235. <div class="rq">
  236. <el-table
  237. :data="chooseDataList"
  238. height="273px"
  239. border
  240. style="width:100%">
  241. <!-- <el-table-column-->
  242. <!-- v-for="(item,index) in columnChooseDataList" :key="index"-->
  243. <!-- :sortable="item.columnSortable"-->
  244. <!-- :prop="item.columnProp"-->
  245. <!-- :header-align="item.headerAlign"-->
  246. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  247. <!-- :align="item.align"-->
  248. <!-- :fixed="item.fixed == ''?false:item.fixed"-->
  249. <!-- :min-width="item.columnWidth"-->
  250. <!-- :label="item.columnLabel">-->
  251. <!-- <template slot-scope="scope">-->
  252. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  253. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  254. <!-- </template>-->
  255. <!-- </el-table-column>-->
  256. <el-table-column label="PLM物料编码" header-align="center">
  257. <el-table-column
  258. prop="testPartNo"
  259. header-align="center"
  260. align="left"
  261. min-width="120"
  262. label="PLM Part No.">
  263. </el-table-column>
  264. </el-table-column>
  265. <el-table-column label="IFS物料编码" header-align="center">
  266. <el-table-column
  267. prop="partNo"
  268. header-align="center"
  269. align="left"
  270. min-width="120"
  271. label="IFS Part No.">
  272. </el-table-column>
  273. </el-table-column>
  274. <el-table-column label="物料名称" header-align="center">
  275. <el-table-column
  276. prop="partDesc"
  277. header-align="center"
  278. align="left"
  279. min-width="180"
  280. label="Part Desc.">
  281. </el-table-column>
  282. </el-table-column>
  283. <el-table-column label="图纸编码" header-align="center">
  284. <el-table-column
  285. prop="drawingNo"
  286. header-align="center"
  287. align="center"
  288. min-width="100"
  289. label="Drawing No.">
  290. </el-table-column>
  291. </el-table-column>
  292. <el-table-column label="图稿编码" header-align="center">
  293. <el-table-column
  294. prop="draftNo"
  295. header-align="center"
  296. align="center"
  297. min-width="100"
  298. label="Proof No.">
  299. </el-table-column>
  300. </el-table-column>
  301. <el-table-column label="IFS料号" header-align="center">
  302. <el-table-column
  303. prop=""
  304. header-align="center"
  305. align="center"
  306. min-width="170"
  307. label="New IFS Part No.">
  308. <template slot-scope="scope">
  309. <el-input @input="(val)=>partInput(scope.row, val)" :ref="`newPartNo${scope.$index}`" v-model="scope.row.newPartNo" @keyup.enter.native="focusNextInput(scope.$index, 'newPartNo')" style="width:77%"></el-input>
  310. <el-button type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
  311. </template>
  312. </el-table-column>
  313. </el-table-column>
  314. <el-table-column label="新图纸编码" header-align="center">
  315. <el-table-column
  316. prop=""
  317. header-align="center"
  318. align="center"
  319. min-width="110"
  320. label="New Drawing No.">
  321. <template slot-scope="scope">
  322. <el-input :ref="`newDrawingNo${scope.$index}`" v-model="scope.row.newDrawingNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDrawingNo')" style="width:98%"></el-input>
  323. </template>
  324. </el-table-column>
  325. </el-table-column>
  326. <el-table-column label="新图稿编码" header-align="center">
  327. <el-table-column
  328. prop=""
  329. header-align="center"
  330. align="center"
  331. min-width="100"
  332. label="New Proof No.">
  333. <template slot-scope="scope">
  334. <el-input :ref="`newDraftNo${scope.$index}`" v-model="scope.row.newDraftNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDraftNo')" style="width:98%"></el-input>
  335. </template>
  336. </el-table-column>
  337. </el-table-column>
  338. <el-table-column
  339. fixed="right"
  340. header-align="center"
  341. align="center"
  342. width="60"
  343. label="操作">
  344. <template slot-scope="scope">
  345. <el-link style="cursor: pointer" @click="deleteChooseDataModal(scope.row)">删除</el-link>
  346. </template>
  347. </el-table-column>
  348. </el-table>
  349. </div>
  350. </el-form>
  351. </div>
  352. </el-tab-pane>
  353. <el-tab-pane label="库存成本影响" name="inventoryCostImpact">
  354. <div style="height: 705px">
  355. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: -5px;">
  356. <el-form-item style="margin-top: 7px;width: 155px">
  357. <el-checkbox v-model="costImpactData.productionProductFlag" true-label="Y">在制品<br>On-line product</el-checkbox>
  358. </el-form-item>
  359. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  360. <el-input class="inlineNumber numInput" v-model="costImpactData.productionProductNumber" :disabled="costImpactData.productionProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  361. </el-form-item>
  362. <el-form-item label="处理意见/Disposition">
  363. <!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 200px" dict-type="change_production_product_opinions"></dict-data-select>-->
  364. <el-input v-if="modalFlag" v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 200px"></el-input>
  365. </el-form-item>
  366. <el-form-item label="报废金额/Scrap Amount">
  367. <el-input class="inlineNumber numInput" v-model="costImpactData.productionProductScrapAmount" :disabled="costImpactData.productionProductFlag !== 'Y'" @input="handleInput(costImpactData.productionProductScrapAmount,1)" type="number" style="width: 140px"></el-input>
  368. </el-form-item>
  369. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  370. <!-- <el-input v-model="costImpactData.productionProductRemark" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  371. <!-- </el-form-item>-->
  372. <el-form-item>
  373. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 3)"><a herf="#">执行人/Executor</a></span>
  374. <el-input v-model="costImpactData.productionProductExecutorName" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 130px"></el-input>
  375. </el-form-item>
  376. </el-form>
  377. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  378. <el-form-item style="margin-top: 7px;width: 155px">
  379. <el-checkbox v-model="costImpactData.inventoryProductFlag" true-label="Y">成品库存<br>FG Stock</el-checkbox>
  380. </el-form-item>
  381. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  382. <el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductNumber" :disabled="costImpactData.inventoryProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  383. </el-form-item>
  384. <el-form-item label="处理意见/Disposition">
  385. <!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 200px" dict-type="change_inventory_product_opinions"></dict-data-select>-->
  386. <el-input v-if="modalFlag" v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 200px"></el-input>
  387. </el-form-item>
  388. <el-form-item label="报废金额/Scrap Amount">
  389. <el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductScrapAmount" :disabled="costImpactData.inventoryProductFlag !== 'Y'" @input="handleInput(costImpactData.inventoryProductScrapAmount,2)" type="number" style="width: 140px"></el-input>
  390. </el-form-item>
  391. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  392. <!-- <el-input v-model="costImpactData.inventoryProductRemark" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  393. <!-- </el-form-item>-->
  394. <el-form-item>
  395. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 4)"><a herf="#">执行人/Executor</a></span>
  396. <el-input v-model="costImpactData.inventoryProductExecutorName" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 130px"></el-input>
  397. </el-form-item>
  398. </el-form>
  399. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  400. <el-form-item style="margin-top: 7px;width: 155px">
  401. <el-checkbox v-model="costImpactData.newOrderFlag" true-label="Y">新订单<br>New Order</el-checkbox>
  402. </el-form-item>
  403. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  404. <el-input class="inlineNumber numInput" v-model="costImpactData.newOrderNumber" :disabled="costImpactData.newOrderFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  405. </el-form-item>
  406. </el-form>
  407. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  408. <el-form-item style="margin-top: 7px;width: 155px">
  409. <el-checkbox v-model="costImpactData.affectedFlag" true-label="Y">影响的原材料及其库存量<br>Raw material influencing and stock</el-checkbox>
  410. </el-form-item>
  411. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  412. <el-input class="inlineNumber numInput" v-model="costImpactData.affectedNumber" :disabled="costImpactData.affectedFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  413. </el-form-item>
  414. <el-form-item label="处理意见/Disposition">
  415. <!-- <dict-data-select v-if="modalFlag" v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 200px" dict-type="change_affected_opinions"></dict-data-select>-->
  416. <el-input v-if="modalFlag" v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 200px"></el-input>
  417. </el-form-item>
  418. <el-form-item label="报废金额/Scrap Amount">
  419. <el-input class="inlineNumber numInput" v-model="costImpactData.affectedScrapAmount" :disabled="costImpactData.affectedFlag !== 'Y'" @input="handleInput(costImpactData.affectedScrapAmount,3)" type="number" style="width: 140px"></el-input>
  420. </el-form-item>
  421. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  422. <!-- <el-input v-model="costImpactData.affectedRemark" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 300px"></el-input>-->
  423. <!-- </el-form-item>-->
  424. <el-form-item>
  425. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 5)"><a herf="#">执行人/Executor</a></span>
  426. <el-input v-model="costImpactData.affectedExecutorName" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 130px"></el-input>
  427. </el-form-item>
  428. </el-form>
  429. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  430. <el-form-item label="ECN变更总成本/Total ECN Cost">
  431. <el-input class="inlineNumber numInput" v-model="totalCost" readonly type="number" style="width: 205px"></el-input>
  432. </el-form-item>
  433. <el-form-item label="备注/Remark">
  434. <el-input v-model="costImpactData.remark" style="width: 611px"></el-input>
  435. </el-form-item>
  436. </el-form>
  437. </div>
  438. </el-tab-pane>
  439. <el-tab-pane label="TP&执行信息" name="actionInformation">
  440. <div style="height: 705px">
  441. <el-button type="primary" @click="chooseFeasibilityAssessmentModel">选择评估信息</el-button>
  442. <div class="rq">
  443. <el-table
  444. :data="chooseItemList2"
  445. height="230px"
  446. border
  447. style="width: 100%">
  448. <el-table-column
  449. v-for="(item,index) in columnChooseItemList2" :key="index"
  450. :sortable="item.columnSortable"
  451. :prop="item.columnProp"
  452. :header-align="item.headerAlign"
  453. :show-overflow-tooltip="item.showOverflowTooltip"
  454. :align="item.align"
  455. :fixed="item.fixed == ''?false:item.fixed"
  456. :min-width="item.columnWidth"
  457. :label="item.columnLabel">
  458. <template slot-scope="scope">
  459. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  460. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  461. </template>
  462. </el-table-column>
  463. <el-table-column
  464. prop=""
  465. header-align="center"
  466. align="center"
  467. min-width="60"
  468. label="可选值">
  469. <template slot-scope="scope">
  470. <el-select v-model="scope.row.chooseValue" placeholder="请选择">
  471. <el-option v-for="item in scope.row.availableValueList" :key="item.availableValue" :label="item.availableValue" :value="item.availableValue"></el-option>
  472. </el-select>
  473. </template>
  474. </el-table-column>
  475. <el-table-column
  476. prop=""
  477. header-align="center"
  478. align="center"
  479. min-width="100"
  480. label="备注">
  481. <template slot-scope="scope">
  482. <el-input v-model="scope.row.itemRemark" style="width:98%"></el-input>
  483. </template>
  484. </el-table-column>
  485. </el-table>
  486. </div>
  487. <div style="text-align: center;font-size: 11px;margin-top: 5px">
  488. <span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
  489. </div>
  490. <el-form :inline="true" label-position="top" :model="executionInfoData">
  491. <el-form-item label="原菲林编号/Original Film No.">
  492. <el-input v-model="executionInfoData.originalFilmNo" style="width: 226px"></el-input>
  493. </el-form-item>
  494. <el-form-item label="原碑刀编号/Original Cutter No.">
  495. <el-input v-model="executionInfoData.originalDieCuttingRuleNo" style="width: 226px"></el-input>
  496. </el-form-item>
  497. <el-form-item label="原网板/印版编号/Original Plate No.">
  498. <el-input v-model="executionInfoData.originalStencilNo" style="width: 226px"></el-input>
  499. </el-form-item>
  500. <el-form-item label="ECN执行日期/Exec Date">
  501. <el-date-picker style="width: 135px" v-model="executionInfoData.executionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :editable=false></el-date-picker>
  502. </el-form-item>
  503. </el-form>
  504. <el-form :inline="true" label-position="top" :model="executionInfoData" style="margin-top: -5px;">
  505. <el-form-item label="新菲林编号/New Film No.">
  506. <el-input v-model="executionInfoData.newFilmNo" style="width: 226px"></el-input>
  507. </el-form-item>
  508. <el-form-item label="新碑刀编号/New Cutter No.">
  509. <el-input v-model="executionInfoData.newDieCuttingRuleNo" style="width: 226px"></el-input>
  510. </el-form-item>
  511. <el-form-item label="新网板/印版编号/New Plate No.">
  512. <el-input v-model="executionInfoData.newStencilNo" style="width: 226px"></el-input>
  513. </el-form-item>
  514. </el-form>
  515. <div style="text-align: center ;font-size: 11px">
  516. <span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
  517. </div>
  518. <el-button type="primary" @click="chooseModel">选择执行信息</el-button>
  519. <div class="rq">
  520. <el-table
  521. :data="chooseItemList"
  522. height="285px"
  523. border
  524. style="width: 100%">
  525. <el-table-column
  526. v-for="(item,index) in columnChooseItemList" :key="index"
  527. :sortable="item.columnSortable"
  528. :prop="item.columnProp"
  529. :header-align="item.headerAlign"
  530. :show-overflow-tooltip="item.showOverflowTooltip"
  531. :align="item.align"
  532. :fixed="item.fixed == ''?false:item.fixed"
  533. :min-width="item.columnWidth"
  534. :label="item.columnLabel">
  535. <template slot-scope="scope">
  536. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  537. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  538. </template>
  539. </el-table-column>
  540. <el-table-column
  541. prop=""
  542. header-align="center"
  543. align="center"
  544. min-width="130"
  545. label="执行人">
  546. <template slot-scope="scope">
  547. <el-input @input="(val)=>executorInput(scope.row, val)" v-model="scope.row.executor" style="width:77%"></el-input>
  548. <el-button type="primary" @click="chooseExecutor(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
  549. </template>
  550. </el-table-column>
  551. <el-table-column
  552. prop=""
  553. header-align="center"
  554. align="center"
  555. min-width="150"
  556. label="备注">
  557. <template slot-scope="scope">
  558. <el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
  559. </template>
  560. </el-table-column>
  561. </el-table>
  562. </div>
  563. </div>
  564. </el-tab-pane>
  565. <el-tab-pane label="会签信息" name="countersignature">
  566. <div style="height: 705px">
  567. <el-form :inline="true" label-position="top" style="margin-top: -19px">
  568. <el-form-item label=" ">
  569. <el-button type="primary" @click="chooseCSModel">选择会签信息</el-button>
  570. </el-form-item>
  571. <el-form-item label="印刷方式/Print Type">
  572. <dict-data-select v-if="modalFlag" v-model="modalData.printing" disabled style="width: 198px" dict-type="change_printing"></dict-data-select>
  573. </el-form-item>
  574. </el-form>
  575. <div class="rq">
  576. <el-table
  577. :data="chooseCSItemList"
  578. height="675px"
  579. border
  580. style="width: 100%">
  581. <el-table-column
  582. v-for="(item,index) in columnChooseCSItemList" :key="index"
  583. :sortable="item.columnSortable"
  584. :prop="item.columnProp"
  585. :header-align="item.headerAlign"
  586. :show-overflow-tooltip="item.showOverflowTooltip"
  587. :align="item.align"
  588. :fixed="item.fixed == ''?false:item.fixed"
  589. :min-width="item.columnWidth"
  590. :label="item.columnLabel">
  591. <template slot-scope="scope">
  592. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  593. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  594. </template>
  595. </el-table-column>
  596. <el-table-column
  597. prop=""
  598. header-align="center"
  599. align="center"
  600. min-width="200"
  601. label="备注">
  602. <template slot-scope="scope">
  603. <el-input v-model="scope.row.itemRemark" style="height: 11px;width:98%"></el-input>
  604. </template>
  605. </el-table-column>
  606. </el-table>
  607. </div>
  608. </div>
  609. </el-tab-pane>
  610. </el-tabs>
  611. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  612. <el-button type="primary" :loading="saveDataLoading" @click="saveData(1)">应用</el-button>
  613. <el-button type="primary" :loading="saveDataLoading" @click="closeModalFlag">关闭</el-button>
  614. <el-button type="primary" :loading="saveDataLoading" @click="saveData(2)">保存并跳转</el-button>
  615. </el-footer>
  616. </el-dialog>
  617. <!-- ECN种类模态框 -->
  618. <el-dialog title="ECN种类" :close-on-click-modal="false" v-drag :visible.sync="EcnTypeModalFlag" width="900px">
  619. <el-form ref="dataForm" label-position="right">
  620. <el-row v-for="(item, index) in form" :key="index" style="padding-top: 10px;" :style="{borderTop:index === 0?'':'1px solid #ccc'}">
  621. <el-col :span="8">
  622. <el-form-item :prop="'input.'+index+'.value'">
  623. <el-checkbox v-model="item.flag" @change="(val)=>ecnTypeHeaderChange(val,index)" :indeterminate="item.list.filter(a => a.flag === 'Y').length !== 0 && item.list.filter(a => a.flag === 'Y').length !== item.list.length" true-label="Y">{{item.value}}</el-checkbox>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="16">
  627. <div v-for="i in item.list">
  628. <el-form-item :prop="'input.'+index+'.value'">
  629. <el-checkbox v-model="i.flag" @change="(val)=>ecnTypeDetailChange(val,index)" true-label="Y">{{i.value}}</el-checkbox>
  630. </el-form-item>
  631. </div>
  632. </el-col>
  633. </el-row>
  634. </el-form>
  635. <el-footer style="height:30px;text-align:center">
  636. <el-button type="primary" @click="saveEcnTypeData">保存</el-button>
  637. <el-button type="primary" @click="EcnTypeModalFlag = false">关闭</el-button>
  638. </el-footer>
  639. </el-dialog>
  640. <!-- ECN模板属性清单 -->
  641. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag" width="820px">
  642. <div class="rq">
  643. <el-form :inline="true" label-position="top" :model="chooseModelData">
  644. <el-form-item :label="'模板'">
  645. <el-select v-model="chooseModelData.codeNo" placeholder="请选择" style="width: 120px">
  646. <el-option
  647. v-for = "i in modelList"
  648. :key = "i.codeNo"
  649. :label = "i.codeDesc"
  650. :value = "i.codeNo">
  651. </el-option>
  652. </el-select>
  653. </el-form-item>
  654. <el-form-item label="属性编码">
  655. <el-input v-model="chooseModelData.itemNo" clearable style="width: 120px"></el-input>
  656. </el-form-item>
  657. <el-form-item label="属性名称">
  658. <el-input v-model="chooseModelData.itemDesc" clearable style="width: 120px"></el-input>
  659. </el-form-item>
  660. <el-form-item :label="' '">
  661. <el-button type="primary" @click="searchItemList()">查询</el-button>
  662. </el-form-item>
  663. </el-form>
  664. <el-table
  665. :height="300"
  666. :data="itemList"
  667. ref="itemTable"
  668. @row-click="itemClickRow"
  669. @selection-change="selectionItem"
  670. border
  671. style="width: 100%;">
  672. <el-table-column
  673. type="selection"
  674. header-align="center"
  675. align="center"
  676. width="50">
  677. </el-table-column>
  678. <el-table-column
  679. v-for="(item,index) in columnItemList" :key="index"
  680. :sortable="item.columnSortable"
  681. :prop="item.columnProp"
  682. :header-align="item.headerAlign"
  683. :show-overflow-tooltip="item.showOverflowTooltip"
  684. :align="item.align"
  685. :fixed="item.fixed==''?false:item.fixed"
  686. :min-width="item.columnWidth"
  687. :label="item.columnLabel">
  688. <template slot-scope="scope">
  689. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  690. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  691. </template>
  692. </el-table-column>
  693. </el-table>
  694. </div>
  695. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  696. <el-button type="primary" @click="confirmItem">确认</el-button>
  697. <el-button type="primary" @click="chooseModelFlag = false">关闭</el-button>
  698. </el-footer>
  699. </el-dialog>
  700. <!-- ECN模板属性清单 -->
  701. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag2" width="820px">
  702. <div class="rq">
  703. <el-form :inline="true" label-position="top" :model="chooseModelData2">
  704. <el-form-item :label="'模板'">
  705. <el-select v-model="chooseModelData2.codeNo" placeholder="请选择" style="width: 120px">
  706. <el-option
  707. v-for = "i in modelList2"
  708. :key = "i.codeNo"
  709. :label = "i.codeDesc"
  710. :value = "i.codeNo">
  711. </el-option>
  712. </el-select>
  713. </el-form-item>
  714. <el-form-item label="属性编码">
  715. <el-input v-model="chooseModelData2.itemNo" clearable style="width: 120px"></el-input>
  716. </el-form-item>
  717. <el-form-item label="属性名称">
  718. <el-input v-model="chooseModelData2.itemDesc" clearable style="width: 120px"></el-input>
  719. </el-form-item>
  720. <el-form-item :label="' '">
  721. <el-button type="primary" @click="searchItemList2">查询</el-button>
  722. </el-form-item>
  723. </el-form>
  724. <el-table
  725. :height="300"
  726. :data="itemList2"
  727. ref="itemTable2"
  728. @row-click="itemClickRow2"
  729. @selection-change="selectionItem2"
  730. border
  731. style="width: 100%;">
  732. <el-table-column
  733. type="selection"
  734. header-align="center"
  735. align="center"
  736. width="50">
  737. </el-table-column>
  738. <el-table-column
  739. v-for="(item,index) in columnItemList2" :key="index"
  740. :sortable="item.columnSortable"
  741. :prop="item.columnProp"
  742. :header-align="item.headerAlign"
  743. :show-overflow-tooltip="item.showOverflowTooltip"
  744. :align="item.align"
  745. :fixed="item.fixed==''?false:item.fixed"
  746. :min-width="item.columnWidth"
  747. :label="item.columnLabel">
  748. <template slot-scope="scope">
  749. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  750. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  751. </template>
  752. </el-table-column>
  753. </el-table>
  754. </div>
  755. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  756. <el-button type="primary" @click="confirmItem2">确认</el-button>
  757. <el-button type="primary" @click="chooseModelFlag2 = false">关闭</el-button>
  758. </el-footer>
  759. </el-dialog>
  760. <!-- 会签模板属性清单 -->
  761. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseCSModelFlag" width="820px">
  762. <div class="rq">
  763. <el-form :inline="true" label-position="top" :model="chooseCSModelData">
  764. <el-form-item :label="'模板'">
  765. <el-select value="roleName" v-model="chooseCSModelData.codeNo" placeholder="请选择" style="width: 120px">
  766. <el-option
  767. v-for = "i in modelCSList"
  768. :key = "i.codeNo"
  769. :label = "i.codeDesc"
  770. :value = "i.codeNo">
  771. </el-option>
  772. </el-select>
  773. </el-form-item>
  774. <el-form-item label="属性编码">
  775. <el-input v-model="chooseCSModelData.itemNo" clearable style="width: 120px"></el-input>
  776. </el-form-item>
  777. <el-form-item label="属性名称">
  778. <el-input v-model="chooseCSModelData.itemDesc" clearable style="width: 120px"></el-input>
  779. </el-form-item>
  780. <el-form-item :label="' '">
  781. <el-button type="primary" @click="searchCSItemList()">查询</el-button>
  782. </el-form-item>
  783. </el-form>
  784. <el-table
  785. :height="300"
  786. :data="itemCSList"
  787. ref="itemCSTable"
  788. @row-click="itemCSClickRow"
  789. @selection-change="selectionCSItem"
  790. border
  791. style="width: 100%;">
  792. <el-table-column
  793. type="selection"
  794. header-align="center"
  795. align="center"
  796. width="50">
  797. </el-table-column>
  798. <el-table-column
  799. v-for="(item,index) in columnCSItemList" :key="index"
  800. :sortable="item.columnSortable"
  801. :prop="item.columnProp"
  802. :header-align="item.headerAlign"
  803. :show-overflow-tooltip="item.showOverflowTooltip"
  804. :align="item.align"
  805. :fixed="item.fixed==''?false:item.fixed"
  806. :min-width="item.columnWidth"
  807. :label="item.columnLabel">
  808. <template slot-scope="scope">
  809. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  810. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  811. </template>
  812. </el-table-column>
  813. </el-table>
  814. </div>
  815. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  816. <el-button type="primary" @click="confirmCSItem">确认</el-button>
  817. <el-button type="primary" @click="chooseCSModelFlag = false">关闭</el-button>
  818. </el-footer>
  819. </el-dialog>
  820. <!-- 可选技术参数卡清单 -->
  821. <el-dialog title="技术参数卡清单" :close-on-click-modal="false" v-drag :visible.sync="addDetailModal" width="881px">
  822. <div class="rq">
  823. <el-form :inline="true" label-position="top" :model="searchData2">
  824. <el-form-item :label="'BU'">
  825. <el-select v-model="searchData2.buNo" placeholder="请选择" clearable style="width: 70px">
  826. <el-option
  827. v-for = "i in buList"
  828. :key = "i.buNo"
  829. :label = "i.buNo"
  830. :value = "i.buNo">
  831. </el-option>
  832. </el-select>
  833. </el-form-item>
  834. <el-form-item label="技术参数卡编码">
  835. <el-input v-model="searchData2.codeNo" clearable style="width: 120px"></el-input>
  836. </el-form-item>
  837. <el-form-item label="PLM物料编码">
  838. <el-input v-model="searchData2.testPartNo" clearable style="width: 120px"/>
  839. </el-form-item>
  840. <el-form-item label="IFS物料编码">
  841. <el-input v-model="searchData2.partNo" clearable style="width: 120px"/>
  842. </el-form-item>
  843. <el-form-item label="客户编码">
  844. <el-input v-model="searchData2.customerId" clearable style="width: 120px"/>
  845. </el-form-item>
  846. <el-form-item label="项目号">
  847. <el-input v-model="searchData2.projectId" clearable style="width: 120px"/>
  848. </el-form-item>
  849. <el-form-item :label="' '">
  850. <el-button type="primary" @click="addChangeDetail()">查询</el-button>
  851. </el-form-item>
  852. </el-form>
  853. <el-table
  854. :height="300"
  855. :data="dataList2"
  856. @selection-change="selectionData2"
  857. border
  858. style="width: 100%;">
  859. <el-table-column
  860. type="selection"
  861. header-align="center"
  862. align="center"
  863. width="50">
  864. </el-table-column>
  865. <el-table-column
  866. v-for="(item,index) in columnList2" :key="index"
  867. :sortable="item.columnSortable"
  868. :prop="item.columnProp"
  869. :header-align="item.headerAlign"
  870. :show-overflow-tooltip="item.showOverflowTooltip"
  871. :align="item.align"
  872. :fixed="item.fixed==''?false:item.fixed"
  873. :min-width="item.columnWidth"
  874. :label="item.columnLabel">
  875. <template slot-scope="scope">
  876. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  877. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  878. </template>
  879. </el-table-column>
  880. </el-table>
  881. </div>
  882. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  883. <el-button type="primary" @click="addDetail">确认</el-button>
  884. <el-button type="primary" @click="addDetailModal = false">关闭</el-button>
  885. </el-footer>
  886. </el-dialog>
  887. <!-- 物料模态框 -->
  888. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="940px">
  889. <div class="rq">
  890. <el-form :inline="true" label-position="top" :model="partData">
  891. <el-form-item :label="'IFS物料编码'">
  892. <el-input v-model="partData.finalPartNo" clearable style="width: 120px"></el-input>
  893. </el-form-item>
  894. <el-form-item :label="'PLM物料编码'">
  895. <el-input v-model="partData.testPartNo" clearable style="width: 120px"></el-input>
  896. </el-form-item>
  897. <el-form-item :label="'客户料号'">
  898. <el-input v-model="partData.customerPartNo" clearable style="width: 120px"></el-input>
  899. </el-form-item>
  900. <el-form-item :label="'物料名称'">
  901. <el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
  902. </el-form-item>
  903. <el-form-item :label="' '">
  904. <el-button type="primary" @click="queryPartList()">查询</el-button>
  905. </el-form-item>
  906. </el-form>
  907. <el-table
  908. :height="300"
  909. :data="partList"
  910. @row-dblclick="getRowData"
  911. border
  912. style="width: 100%;">
  913. <el-table-column
  914. v-for="(item,index) in partColumnList" :key="index"
  915. :sortable="item.columnSortable"
  916. :prop="item.columnProp"
  917. :header-align="item.headerAlign"
  918. :show-overflow-tooltip="item.showOverflowTooltip"
  919. :align="item.align"
  920. :fixed="item.fixed==''?false:item.fixed"
  921. :min-width="item.columnWidth"
  922. :label="item.columnLabel">
  923. <template slot-scope="scope">
  924. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  925. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  926. </template>
  927. </el-table-column>
  928. </el-table>
  929. <!-- 分页插件 -->
  930. <el-pagination
  931. style="margin-top: 5px"
  932. @size-change="sizeChangeHandle2"
  933. @current-change="currentChangeHandle2"
  934. :current-page="pageIndex2"
  935. :page-sizes="[20, 50, 100, 200, 500]"
  936. :page-size="pageSize2"
  937. :total="totalPage2"
  938. layout="total, sizes, prev, pager, next, jumper">
  939. </el-pagination>
  940. </div>
  941. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  942. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  943. </el-footer>
  944. </el-dialog>
  945. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag :visible.sync="delegateAccessVisible" width="40vw">
  946. <el-form :inline="true" label-position="top" :model="changeDelegateAccess">
  947. <el-form-item label="编码">
  948. <el-input v-model="changeDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  949. </el-form-item>
  950. <el-form-item label="名称">
  951. <el-input v-model="changeDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  952. </el-form-item>
  953. <el-form-item label=" ">
  954. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  955. </el-form-item>
  956. </el-form>
  957. <el-table
  958. v-if="delegateAccessVisible"
  959. :height="300"
  960. :data="baseDelegateAccessList"
  961. @selection-change="handleSelectionChange"
  962. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  963. ref="delegateAccesstTable"
  964. border row-key="delegateAccess"
  965. style="width: 100%;">
  966. <el-table-column
  967. type="selection"
  968. header-align="center"
  969. align="center"
  970. :reserve-selection="true"
  971. width="50">
  972. </el-table-column>
  973. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  974. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  975. </el-table>
  976. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  977. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  978. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  979. </el-footer>
  980. </el-dialog>
  981. <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
  982. <upload-file-list ref="changeRef" v-if="modalFlag" folder="change" title="工程变更文件上传" :label="'变更单号'" :file-list.sync="fileData.file" :no="modalData.changeNo" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
  983. <filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
  984. </div>
  985. </template>
  986. <script>
  987. import {
  988. technicalSpecificationSearch, // 获取技术参数卡列表
  989. technicalSpecificationSearch2, // 获取技术参数卡列表
  990. getDepartmentByUserName, // 根据用户编码获得用户部门
  991. changeRequestSave, // 新增变更申请
  992. changeRequestUpdate, // 新增变更申请
  993. changeRequestTempSave, // 新增变更单(临时)
  994. deleteChangeFiles, // 根据变更单号删除文件,
  995. costImpactSave, // 新增库存成本影响
  996. executionSave, // 新增执行信息
  997. getEcnTypeData, // 查询ECN种类数据
  998. getEcnModel, // 查询ECN的模板
  999. getItemList, // 查询模板属性
  1000. countersignatureSave, // 新增会签信息
  1001. getBuBySite, // 根据site查bu
  1002. choosePartNoList, // 根据视图查物料计划
  1003. deleteTempChangeInfo, // 删除临时变更数据
  1004. } from "@/api/changeManagement/changeManagement.js"
  1005. import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
  1006. import { searchDelegateAccessByUser} from "@/api/proofing/proofingInformation.js"
  1007. import ChooseList from '@/views/modules/common/Chooselist'
  1008. import DictDataSelect from '../sys/dict-data-select.vue'
  1009. import UploadFileList from "../common/uploadFileList.vue"
  1010. import FilterSearch from "../../common/filterSearch.vue";
  1011. import {routingAllInfoSearchAny} from "../../../api/part/routingManagement";
  1012. import {technicalSpecificationSearchAny} from "../../../api/changeManagement/changeManagement";
  1013. export default {
  1014. components: {
  1015. FilterSearch,
  1016. UploadFileList,
  1017. DictDataSelect,
  1018. ChooseList
  1019. },
  1020. watch: {
  1021. modalData: {
  1022. deep: true,
  1023. handler: function (newV, oldV) {
  1024. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  1025. this.modalData.tpEngineerName = ''
  1026. }
  1027. if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
  1028. this.modalData.industrialEngineerName = ''
  1029. }
  1030. if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
  1031. this.modalData.cqcOperatorName = ''
  1032. }
  1033. if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
  1034. this.modalData.faiOperatorName = ''
  1035. }
  1036. }
  1037. },
  1038. 'costImpactData.productionProductFlag': function(newVal) {
  1039. if (newVal !== 'Y') {
  1040. this.costImpactData.productionProductNumber = ''
  1041. this.costImpactData.productionProductOpinions = ''
  1042. this.costImpactData.productionProductScrapAmount = 0
  1043. this.costImpactData.productionProductExecutor = ''
  1044. this.costImpactData.productionProductExecutorName = ''
  1045. }
  1046. },
  1047. 'costImpactData.inventoryProductFlag': function(newVal) {
  1048. if (newVal !== 'Y') {
  1049. this.costImpactData.inventoryProductNumber = ''
  1050. this.costImpactData.inventoryProductOpinions = ''
  1051. this.costImpactData.inventoryProductScrapAmount = 0
  1052. this.costImpactData.inventoryProductExecutor = ''
  1053. this.costImpactData.inventoryProductExecutorName = ''
  1054. }
  1055. },
  1056. 'costImpactData.newOrderFlag': function(newVal) {
  1057. if (newVal !== 'Y') {
  1058. this.costImpactData.newOrderNumber = ''
  1059. }
  1060. },
  1061. 'costImpactData.affectedFlag': function(newVal) {
  1062. if (newVal !== 'Y') {
  1063. this.costImpactData.affectedNumber = ''
  1064. this.costImpactData.affectedOpinions = ''
  1065. this.costImpactData.affectedScrapAmount = 0
  1066. this.costImpactData.affectedExecutor = ''
  1067. this.costImpactData.affectedExecutorName = ''
  1068. }
  1069. },
  1070. },
  1071. data() {
  1072. return {
  1073. uploadDialog: false,
  1074. form: [],
  1075. buList: [],
  1076. // DelegateAccess 相关
  1077. selectionDelegateAccess: [],
  1078. selectionDelegateAccess2: [],
  1079. delegateAccessVisible: false,
  1080. baseDelegateAccessList: [],
  1081. changeDelegateAccess: {
  1082. delegateAccess: '',
  1083. delegateAccessName: '',
  1084. },
  1085. // 导出
  1086. exportData: [],
  1087. exportName: '工程变更申请' + this.dayjs().format('YYYYMMDDHHmmss'),
  1088. exportHeader: ['工程变更申请'],
  1089. exportFooter: [],
  1090. resultList: [],
  1091. // ======== 行高 ========
  1092. height: 200,
  1093. // ======== 分页 ========
  1094. pageIndex: 1,
  1095. pageSize: 50,
  1096. totalPage: 0,
  1097. pageIndex2: 1,
  1098. pageSize2: 20,
  1099. totalPage2: 0,
  1100. activeName: 'basicInformation',
  1101. tempPartRow: {},
  1102. tempExecutorRow: {},
  1103. changeTitle: '',
  1104. // 条件查询
  1105. searchData: {
  1106. site: this.$store.state.user.site,
  1107. partNo: '',
  1108. testPartNo: '',
  1109. partDesc: '',
  1110. customerId: '',
  1111. customerDesc: '',
  1112. projectId: '',
  1113. projectDesc: '',
  1114. codeNo: '',
  1115. oriCodeNo: '',
  1116. status: '',
  1117. buNo: '',
  1118. page: 1,
  1119. limit: 10
  1120. },
  1121. searchData2: {
  1122. site: this.$store.state.user.site,
  1123. partNo: '',
  1124. testPartNo: '',
  1125. partDesc: '',
  1126. customerId: '',
  1127. customerDesc: '',
  1128. projectId: '',
  1129. projectDesc: '',
  1130. codeNo: '',
  1131. buNo: '',
  1132. },
  1133. // ======== 数据对象 ========
  1134. modalData: {
  1135. site: this.$store.state.user.site,
  1136. changeNo: '',
  1137. applicantId: '',
  1138. applicantName: '',
  1139. applicationDepartmentId: '',
  1140. applicationDepartmentName: '',
  1141. applyDate: '',
  1142. changeImpact: '',
  1143. changeImpactDesc: '',
  1144. ecnStage: '',
  1145. changeType: '',
  1146. tpEngineerId: '',
  1147. tpEngineerName: '',
  1148. changePhaseInDate: '',
  1149. dfIsProduct: '',
  1150. printing: '',
  1151. manufacturingCostIsChange: '',
  1152. changeRequestDesc: '',
  1153. isReQuote: '',
  1154. ulCertificationRequirements: '',
  1155. ulContinueToMeetDemand: '',
  1156. gpCertificationRequirements: '',
  1157. gpContinueToMeetDemand: '',
  1158. createBy: '',
  1159. detailList: [],
  1160. ecnTypeData: [],
  1161. industrialEngineerId: '',
  1162. industrialEngineerName: '',
  1163. changeStatus: '',
  1164. ecnType: '',
  1165. cqcOperatorId: '',
  1166. cqcOperatorName: '',
  1167. faiOperatorId: '',
  1168. faiOperatorName: '',
  1169. showInQueryFlag: ''
  1170. },
  1171. costImpactData: {
  1172. site: this.$store.state.user.site,
  1173. changeNo: '',
  1174. productionProductFlag: '',
  1175. inventoryProductFlag: '',
  1176. newOrderFlag: '',
  1177. affectedFlag: '',
  1178. productionProductNumber: '',
  1179. productionProductOpinions: '',
  1180. productionProductScrapAmount: 0,
  1181. productionProductRemark: '',
  1182. productionProductExecutor: '',
  1183. productionProductExecutorName: '',
  1184. inventoryProductNumber: '',
  1185. inventoryProductOpinions: '',
  1186. inventoryProductScrapAmount: 0,
  1187. inventoryProductRemark: '',
  1188. inventoryProductExecutor: '',
  1189. inventoryProductExecutorName: '',
  1190. newOrderNumber: '',
  1191. affectedNumber: '',
  1192. affectedOpinions: '',
  1193. affectedScrapAmount: 0,
  1194. affectedRemark: '',
  1195. affectedExecutor: '',
  1196. affectedExecutorName: '',
  1197. changeTotalCost: '',
  1198. remark: '',
  1199. createBy: '',
  1200. updateBy: ''
  1201. },
  1202. executionInfoData: {
  1203. site: this.$store.state.user.site,
  1204. changeNo: '',
  1205. originalFilmNo: '',
  1206. newFilmNo: '',
  1207. originalDieCuttingRuleNo: '',
  1208. newDieCuttingRuleNo: '',
  1209. originalStencilNo: '',
  1210. newStencilNo: '',
  1211. executionDate: '',
  1212. createBy: '',
  1213. updateBy: '',
  1214. chooseItemList: [],
  1215. chooseItemList2: [],
  1216. },
  1217. countersignatureData: {
  1218. site: this.$store.state.user.site,
  1219. changeNo: '',
  1220. createBy: '',
  1221. updateBy: '',
  1222. chooseCSItemList: []
  1223. },
  1224. chooseModelData: {
  1225. site: this.$store.state.user.site,
  1226. functionType: 'ECN',
  1227. itemNo: '',
  1228. itemDesc: '',
  1229. codeNo: ''
  1230. },
  1231. chooseModelData2: {
  1232. site: this.$store.state.user.site,
  1233. functionType: 'ECN',
  1234. itemNo: '',
  1235. itemDesc: '',
  1236. codeNo: ''
  1237. },
  1238. chooseCSModelData: {
  1239. site: this.$store.state.user.site,
  1240. functionType: 'ECN',
  1241. itemNo: '',
  1242. itemDesc: '',
  1243. codeNo: ''
  1244. },
  1245. fileData: {
  1246. file: [],
  1247. orderRef1: '',
  1248. orderRef2: '',
  1249. fileRemark: '',
  1250. folder: ''
  1251. },
  1252. partData: {
  1253. site: '',
  1254. buNo: '',
  1255. finalPartNo: '',
  1256. testPartNo: '',
  1257. customerPartNo: '',
  1258. partDesc: '',
  1259. page: 1,
  1260. limit: 10
  1261. },
  1262. // ======== 数据列表 ========
  1263. dataList: [],
  1264. dataList2: [],
  1265. chooseDataList: [],
  1266. fileList: [],
  1267. modelList: [],
  1268. modelList2: [],
  1269. modelCSList: [],
  1270. itemList: [],
  1271. itemList2: [],
  1272. itemCSList: [],
  1273. chooseItemList: [],
  1274. chooseItemList2: [],
  1275. chooseCSItemList: [],
  1276. partList: [],
  1277. // ======== 列表表头 ========
  1278. columnList: [
  1279. {
  1280. userId: this.$store.state.user.name,
  1281. functionId: 108001,
  1282. serialNumber: '108001Table1BuNo',
  1283. tableId: '108001Table1',
  1284. tableName: '技术参数卡',
  1285. columnProp: 'buNo',
  1286. headerAlign: 'center',
  1287. align: 'center',
  1288. columnLabel: 'BU',
  1289. columnHidden: false,
  1290. columnImage: false,
  1291. status: true,
  1292. fixed: '',
  1293. columnWidth: 80
  1294. },
  1295. {
  1296. userId: this.$store.state.user.name,
  1297. functionId: 108001,
  1298. serialNumber: '108001Table1TestPartNo',
  1299. tableId: '108001Table1',
  1300. tableName: '技术参数卡',
  1301. columnProp: 'testPartNo',
  1302. headerAlign: 'center',
  1303. align: 'center',
  1304. columnLabel: 'PLM物料编码',
  1305. columnHidden: false,
  1306. columnImage: false,
  1307. status: true,
  1308. fixed: '',
  1309. columnWidth: 120
  1310. },
  1311. {
  1312. userId: this.$store.state.user.name,
  1313. functionId: 108001,
  1314. serialNumber: '108001Table1PartNo',
  1315. tableId: '108001Table1',
  1316. tableName: '技术参数卡',
  1317. columnProp: 'partNo',
  1318. headerAlign: 'center',
  1319. align: 'center',
  1320. columnLabel: 'IFS物料编码',
  1321. columnHidden: false,
  1322. columnImage: false,
  1323. status: true,
  1324. fixed: '',
  1325. columnWidth: 120
  1326. },
  1327. {
  1328. userId: this.$store.state.user.name,
  1329. functionId: 108001,
  1330. serialNumber: '108001Table1PartDesc',
  1331. tableId: '108001Table1',
  1332. tableName: '技术参数卡',
  1333. columnProp: 'partDesc',
  1334. headerAlign: 'center',
  1335. align: 'left',
  1336. columnLabel: '物料名称',
  1337. columnHidden: false,
  1338. columnImage: false,
  1339. status: true,
  1340. fixed: '',
  1341. columnWidth: 180
  1342. },
  1343. {
  1344. userId: this.$store.state.user.name,
  1345. functionId: 108001,
  1346. serialNumber: '108001Table1ProjectId',
  1347. tableId: '108001Table1',
  1348. tableName: '技术参数卡',
  1349. columnProp: 'projectId',
  1350. headerAlign: 'center',
  1351. align: 'center',
  1352. columnLabel: '项目号',
  1353. columnHidden: false,
  1354. columnImage: false,
  1355. status: true,
  1356. fixed: '',
  1357. columnWidth: 120
  1358. },
  1359. {
  1360. userId: this.$store.state.user.name,
  1361. functionId: 108001,
  1362. serialNumber: '108001Table1ProjectDesc',
  1363. tableId: '108001Table1',
  1364. tableName: '技术参数卡',
  1365. columnProp: 'projectDesc',
  1366. headerAlign: 'center',
  1367. align: 'left',
  1368. columnLabel: '项目名称',
  1369. columnHidden: false,
  1370. columnImage: false,
  1371. status: true,
  1372. fixed: '',
  1373. columnWidth: 180
  1374. },
  1375. {
  1376. userId: this.$store.state.user.name,
  1377. functionId: 108001,
  1378. serialNumber: '108001Table1CustomerId',
  1379. tableId: '108001Table1',
  1380. tableName: '技术参数卡',
  1381. columnProp: 'customerId',
  1382. headerAlign: 'center',
  1383. align: 'center',
  1384. columnLabel: '客户编码',
  1385. columnHidden: false,
  1386. columnImage: false,
  1387. status: true,
  1388. fixed: '',
  1389. columnWidth: 120
  1390. },
  1391. {
  1392. userId: this.$store.state.user.name,
  1393. functionId: 108001,
  1394. serialNumber: '108001Table1CustomerDesc',
  1395. tableId: '108001Table1',
  1396. tableName: '技术参数卡',
  1397. columnProp: 'customerDesc',
  1398. headerAlign: 'center',
  1399. align: 'left',
  1400. columnLabel: '客户名称',
  1401. columnHidden: false,
  1402. columnImage: false,
  1403. status: true,
  1404. fixed: '',
  1405. columnWidth: 180
  1406. },
  1407. {
  1408. userId: this.$store.state.user.name,
  1409. functionId: 108001,
  1410. serialNumber: '108001Table1CodeNo',
  1411. tableId: '108001Table1',
  1412. tableName: '技术参数卡',
  1413. columnProp: 'oriCodeNo',
  1414. headerAlign: 'center',
  1415. align: 'center',
  1416. columnLabel: '技术参数卡',
  1417. columnHidden: false,
  1418. columnImage: false,
  1419. status: true,
  1420. fixed: '',
  1421. columnWidth: 120
  1422. },
  1423. {
  1424. userId: this.$store.state.user.name,
  1425. functionId: 108001,
  1426. serialNumber: '108001Table1CodeNo',
  1427. tableId: '108001Table1',
  1428. tableName: '技术参数卡',
  1429. columnProp: 'ecnFlag',
  1430. headerAlign: 'center',
  1431. align: 'center',
  1432. columnLabel: '状态',
  1433. columnHidden: false,
  1434. columnImage: false,
  1435. status: true,
  1436. fixed: '',
  1437. columnWidth: 100
  1438. },
  1439. {
  1440. userId: this.$store.state.user.name,
  1441. functionId: 108001,
  1442. serialNumber: '108001Table1RevNo',
  1443. tableId: '108001Table1',
  1444. tableName: '技术参数卡',
  1445. columnProp: 'revNo',
  1446. headerAlign: 'center',
  1447. align: 'center',
  1448. columnLabel: '版本号',
  1449. columnHidden: false,
  1450. columnImage: false,
  1451. status: true,
  1452. fixed: '',
  1453. columnWidth: 80
  1454. },
  1455. ],
  1456. columnList2: [
  1457. {
  1458. columnProp: 'buNo',
  1459. headerAlign: 'center',
  1460. align: 'center',
  1461. columnLabel: 'BU',
  1462. columnHidden: false,
  1463. columnImage: false,
  1464. status: true,
  1465. fixed: '',
  1466. columnWidth: 70
  1467. },
  1468. {
  1469. columnProp: 'testPartNo',
  1470. headerAlign: 'center',
  1471. align: 'left',
  1472. columnLabel: 'PLM物料编码',
  1473. columnHidden: false,
  1474. columnImage: false,
  1475. status: true,
  1476. fixed: '',
  1477. columnWidth: 120
  1478. },
  1479. {
  1480. columnProp: 'partNo',
  1481. headerAlign: 'center',
  1482. align: 'left',
  1483. columnLabel: 'IFS物料编码',
  1484. columnHidden: false,
  1485. columnImage: false,
  1486. status: true,
  1487. fixed: '',
  1488. columnWidth: 120
  1489. },
  1490. {
  1491. columnProp: 'partDesc',
  1492. headerAlign: 'center',
  1493. align: 'left',
  1494. columnLabel: '物料名称',
  1495. columnHidden: false,
  1496. columnImage: false,
  1497. status: true,
  1498. fixed: '',
  1499. columnWidth: 200
  1500. },
  1501. {
  1502. columnProp: 'projectId',
  1503. headerAlign: 'center',
  1504. align: 'left',
  1505. columnLabel: '项目号',
  1506. columnHidden: false,
  1507. columnImage: false,
  1508. status: true,
  1509. fixed: '',
  1510. columnWidth: 120
  1511. },
  1512. {
  1513. columnProp: 'projectDesc',
  1514. headerAlign: 'center',
  1515. align: 'left',
  1516. columnLabel: '项目名称',
  1517. columnHidden: false,
  1518. columnImage: false,
  1519. status: true,
  1520. fixed: '',
  1521. columnWidth: 180
  1522. },
  1523. {
  1524. columnProp: 'customerId',
  1525. headerAlign: 'center',
  1526. align: 'left',
  1527. columnLabel: '客户编码',
  1528. columnHidden: false,
  1529. columnImage: false,
  1530. status: true,
  1531. fixed: '',
  1532. columnWidth: 120
  1533. },
  1534. {
  1535. columnProp: 'customerDesc',
  1536. headerAlign: 'center',
  1537. align: 'left',
  1538. columnLabel: '客户名称',
  1539. columnHidden: false,
  1540. columnImage: false,
  1541. status: true,
  1542. fixed: '',
  1543. columnWidth: 180
  1544. },
  1545. {
  1546. columnProp: 'codeNo',
  1547. headerAlign: 'center',
  1548. align: 'left',
  1549. columnLabel: '技术参数卡',
  1550. columnHidden: false,
  1551. columnImage: false,
  1552. status: true,
  1553. fixed: '',
  1554. columnWidth: 120
  1555. },
  1556. {
  1557. columnProp: 'ecnFlag',
  1558. headerAlign: 'center',
  1559. align: 'center',
  1560. columnLabel: '状态',
  1561. columnHidden: false,
  1562. columnImage: false,
  1563. status: true,
  1564. fixed: '',
  1565. columnWidth: 100
  1566. },
  1567. {
  1568. columnProp: 'revNo',
  1569. headerAlign: 'center',
  1570. align: 'center',
  1571. columnLabel: '版本号',
  1572. columnHidden: false,
  1573. columnImage: false,
  1574. status: true,
  1575. fixed: '',
  1576. columnWidth: 80
  1577. },
  1578. ],
  1579. columnChooseDataList: [
  1580. {
  1581. userId: this.$store.state.user.name,
  1582. functionId: 108001,
  1583. serialNumber: '108001Table2TestPartNo',
  1584. tableId: '108001Table2',
  1585. tableName: '所选变更列表',
  1586. columnProp: 'testPartNo',
  1587. headerAlign: 'center',
  1588. align: 'left',
  1589. columnLabel: 'PLM物料编码',
  1590. columnHidden: false,
  1591. columnImage: false,
  1592. status: true,
  1593. fixed: '',
  1594. columnWidth: 120
  1595. },
  1596. {
  1597. userId: this.$store.state.user.name,
  1598. functionId: 108001,
  1599. serialNumber: '108001Table2PartNo',
  1600. tableId: '108001Table2',
  1601. tableName: '所选变更列表',
  1602. columnProp: 'partNo',
  1603. headerAlign: 'center',
  1604. align: 'left',
  1605. columnLabel: 'IFS物料编码',
  1606. columnHidden: false,
  1607. columnImage: false,
  1608. status: true,
  1609. fixed: '',
  1610. columnWidth: 120
  1611. },
  1612. {
  1613. userId: this.$store.state.user.name,
  1614. functionId: 108001,
  1615. serialNumber: '108001Table2PartDesc',
  1616. tableId: '108001Table2',
  1617. tableName: '所选变更列表',
  1618. columnProp: 'partDesc',
  1619. headerAlign: 'center',
  1620. align: 'left',
  1621. columnLabel: '物料名称',
  1622. columnHidden: false,
  1623. columnImage: false,
  1624. status: true,
  1625. fixed: '',
  1626. columnWidth: 180
  1627. },
  1628. {
  1629. userId: this.$store.state.user.name,
  1630. functionId: 108001,
  1631. serialNumber: '108001Table2DrawingNo',
  1632. tableId: '108001Table2',
  1633. tableName: '所选变更列表',
  1634. columnProp: 'drawingNo',
  1635. headerAlign: 'center',
  1636. align: 'center',
  1637. columnLabel: '图纸编码',
  1638. columnHidden: false,
  1639. columnImage: false,
  1640. status: true,
  1641. fixed: '',
  1642. columnWidth: 90
  1643. },
  1644. {
  1645. userId: this.$store.state.user.name,
  1646. functionId: 108001,
  1647. serialNumber: '108001Table2DraftNo',
  1648. tableId: '108001Table2',
  1649. tableName: '所选变更列表',
  1650. columnProp: 'draftNo',
  1651. headerAlign: 'center',
  1652. align: 'center',
  1653. columnLabel: '图稿编码',
  1654. columnHidden: false,
  1655. columnImage: false,
  1656. status: true,
  1657. fixed: '',
  1658. columnWidth: 90
  1659. },
  1660. ],
  1661. columnChooseItemList: [
  1662. {
  1663. userId: this.$store.state.user.name,
  1664. functionId: 108001,
  1665. serialNumber: '108001Table3ItemNo',
  1666. tableId: '108001Table3',
  1667. tableName: '执行属性表',
  1668. columnProp: 'itemNo',
  1669. headerAlign: 'center',
  1670. align: 'center',
  1671. columnLabel: '属性编码',
  1672. columnHidden: false,
  1673. columnImage: false,
  1674. status: true,
  1675. fixed: '',
  1676. columnWidth: 80
  1677. },
  1678. {
  1679. userId: this.$store.state.user.name,
  1680. functionId: 108001,
  1681. serialNumber: '108001Table3ItemDesc',
  1682. tableId: '108001Table3',
  1683. tableName: '执行属性表',
  1684. columnProp: 'itemDesc',
  1685. headerAlign: 'center',
  1686. align: 'center',
  1687. columnLabel: '属性名称',
  1688. columnHidden: false,
  1689. columnImage: false,
  1690. status: true,
  1691. fixed: '',
  1692. columnWidth: 150
  1693. },
  1694. // {
  1695. // userId: this.$store.state.user.name,
  1696. // functionId: 108001,
  1697. // serialNumber: '108001Table3ExecuteFlag',
  1698. // tableId: '108001Table3',
  1699. // tableName: '执行属性表',
  1700. // columnProp: 'executeFlag',
  1701. // headerAlign: 'center',
  1702. // align: 'center',
  1703. // columnLabel: '是否执行',
  1704. // columnHidden: false,
  1705. // columnImage: false,
  1706. // status: true,
  1707. // fixed: '',
  1708. // columnWidth: 80
  1709. // },
  1710. // {
  1711. // userId: this.$store.state.user.name,
  1712. // functionId: 108001,
  1713. // serialNumber: '108001Table3Executor',
  1714. // tableId: '108001Table3',
  1715. // tableName: '执行属性表',
  1716. // columnProp: 'executor',
  1717. // headerAlign: 'center',
  1718. // align: 'center',
  1719. // columnLabel: '执行人',
  1720. // columnHidden: false,
  1721. // columnImage: false,
  1722. // status: true,
  1723. // fixed: '',
  1724. // columnWidth: 100
  1725. // },
  1726. {
  1727. userId: this.$store.state.user.name,
  1728. functionId: 108001,
  1729. serialNumber: '108001Table3ExecuteDate',
  1730. tableId: '108001Table3',
  1731. tableName: '执行属性表',
  1732. columnProp: 'itemExecutionDate',
  1733. headerAlign: 'center',
  1734. align: 'center',
  1735. columnLabel: '执行时间',
  1736. columnHidden: false,
  1737. columnImage: false,
  1738. status: true,
  1739. fixed: '',
  1740. columnWidth: 130
  1741. }
  1742. ],
  1743. columnChooseItemList2: [
  1744. {
  1745. userId: this.$store.state.user.name,
  1746. functionId: 108001,
  1747. serialNumber: '108001Table7ItemNo',
  1748. tableId: '108001Table7',
  1749. tableName: '可行性评估属性表',
  1750. columnProp: 'itemNo',
  1751. headerAlign: 'center',
  1752. align: 'center',
  1753. columnLabel: '属性编码',
  1754. columnHidden: false,
  1755. columnImage: false,
  1756. status: true,
  1757. fixed: '',
  1758. columnWidth: 80
  1759. },
  1760. {
  1761. userId: this.$store.state.user.name,
  1762. functionId: 108001,
  1763. serialNumber: '108001Table7ItemDesc',
  1764. tableId: '108001Table7',
  1765. tableName: '可行性评估属性表',
  1766. columnProp: 'itemDesc',
  1767. headerAlign: 'center',
  1768. align: 'center',
  1769. columnLabel: '属性名称',
  1770. columnHidden: false,
  1771. columnImage: false,
  1772. status: true,
  1773. fixed: '',
  1774. columnWidth: 150
  1775. },
  1776. // {
  1777. // userId: this.$store.state.user.name,
  1778. // functionId: 108001,
  1779. // serialNumber: '108001Table7ExecuteFlag',
  1780. // tableId: '108001Table7',
  1781. // tableName: '可行性评估属性表',
  1782. // columnProp: 'executeFlag',
  1783. // headerAlign: 'center',
  1784. // align: 'center',
  1785. // columnLabel: '是否执行',
  1786. // columnHidden: false,
  1787. // columnImage: false,
  1788. // status: true,
  1789. // fixed: '',
  1790. // columnWidth: 80
  1791. // },
  1792. // {
  1793. // userId: this.$store.state.user.name,
  1794. // functionId: 108001,
  1795. // serialNumber: '108001Table7Executor',
  1796. // tableId: '108001Table7',
  1797. // tableName: '可行性评估属性表',
  1798. // columnProp: 'executor',
  1799. // headerAlign: 'center',
  1800. // align: 'center',
  1801. // columnLabel: '执行人',
  1802. // columnHidden: false,
  1803. // columnImage: false,
  1804. // status: true,
  1805. // fixed: '',
  1806. // columnWidth: 100
  1807. // },{
  1808. // userId: this.$store.state.user.name,
  1809. // functionId: 108001,
  1810. // serialNumber: '108001Table7ExecuteDate',
  1811. // tableId: '108001Table7',
  1812. // tableName: '可行性评估属性表',
  1813. // columnProp: 'itemExecutionDate',
  1814. // headerAlign: 'center',
  1815. // align: 'center',
  1816. // columnLabel: '执行时间',
  1817. // columnHidden: false,
  1818. // columnImage: false,
  1819. // status: true,
  1820. // fixed: '',
  1821. // columnWidth: 150
  1822. // },
  1823. ],
  1824. columnChooseCSItemList: [
  1825. {
  1826. userId: this.$store.state.user.name,
  1827. functionId: 108001,
  1828. serialNumber: '108001Table6ItemNo',
  1829. tableId: '108001Table6',
  1830. tableName: '执行属性表',
  1831. columnProp: 'itemNo',
  1832. headerAlign: 'center',
  1833. align: 'left',
  1834. columnLabel: '属性编码',
  1835. columnHidden: false,
  1836. columnImage: false,
  1837. status: true,
  1838. fixed: '',
  1839. columnWidth: 100
  1840. },
  1841. {
  1842. userId: this.$store.state.user.name,
  1843. functionId: 108001,
  1844. serialNumber: '108001Table6ItemDesc',
  1845. tableId: '108001Table6',
  1846. tableName: '执行属性表',
  1847. columnProp: 'itemDesc',
  1848. headerAlign: 'center',
  1849. align: 'left',
  1850. columnLabel: '属性名称',
  1851. columnHidden: false,
  1852. columnImage: false,
  1853. status: true,
  1854. fixed: '',
  1855. columnWidth: 200
  1856. },
  1857. // {
  1858. // userId: this.$store.state.user.name,
  1859. // functionId: 108001,
  1860. // serialNumber: '108001Table6ExecuteFlag',
  1861. // tableId: '108001Table6',
  1862. // tableName: '执行属性表',
  1863. // columnProp: 'executeFlag',
  1864. // headerAlign: 'center',
  1865. // align: 'center',
  1866. // columnLabel: '是否执行',
  1867. // columnHidden: false,
  1868. // columnImage: false,
  1869. // status: true,
  1870. // fixed: '',
  1871. // columnWidth: 80
  1872. // },
  1873. // {
  1874. // userId: this.$store.state.user.name,
  1875. // functionId: 108001,
  1876. // serialNumber: '108001Table6Executor',
  1877. // tableId: '108001Table6',
  1878. // tableName: '执行属性表',
  1879. // columnProp: 'executor',
  1880. // headerAlign: 'center',
  1881. // align: 'center',
  1882. // columnLabel: '执行人',
  1883. // columnHidden: false,
  1884. // columnImage: false,
  1885. // status: true,
  1886. // fixed: '',
  1887. // columnWidth: 100
  1888. // },{
  1889. // userId: this.$store.state.user.name,
  1890. // functionId: 108001,
  1891. // serialNumber: '108001Table6ExecuteDate',
  1892. // tableId: '108001Table6',
  1893. // tableName: '执行属性表',
  1894. // columnProp: 'itemExecutionDate',
  1895. // headerAlign: 'center',
  1896. // align: 'center',
  1897. // columnLabel: '执行时间',
  1898. // columnHidden: false,
  1899. // columnImage: false,
  1900. // status: true,
  1901. // fixed: '',
  1902. // columnWidth: 150
  1903. // },
  1904. ],
  1905. columnItemList: [
  1906. {
  1907. columnProp: 'itemNo',
  1908. headerAlign: 'center',
  1909. align: 'center',
  1910. columnLabel: '属性编码',
  1911. columnHidden: false,
  1912. columnImage: false,
  1913. status: true,
  1914. fixed: '',
  1915. columnWidth: 80
  1916. },
  1917. {
  1918. columnProp: 'itemDesc',
  1919. headerAlign: 'center',
  1920. align: 'center',
  1921. columnLabel: '属性名称',
  1922. columnHidden: false,
  1923. columnImage: false,
  1924. status: true,
  1925. fixed: '',
  1926. columnWidth: 150
  1927. },
  1928. ],
  1929. columnItemList2: [
  1930. {
  1931. columnProp: 'itemNo',
  1932. headerAlign: 'center',
  1933. align: 'center',
  1934. columnLabel: '属性编码',
  1935. columnHidden: false,
  1936. columnImage: false,
  1937. status: true,
  1938. fixed: '',
  1939. columnWidth: 80
  1940. },
  1941. {
  1942. columnProp: 'itemDesc',
  1943. headerAlign: 'center',
  1944. align: 'center',
  1945. columnLabel: '属性名称',
  1946. columnHidden: false,
  1947. columnImage: false,
  1948. status: true,
  1949. fixed: '',
  1950. columnWidth: 150
  1951. },
  1952. ],
  1953. columnCSItemList: [
  1954. {
  1955. userId: this.$store.state.user.name,
  1956. functionId: 108001,
  1957. serialNumber: '108001Table5ItemNo',
  1958. tableId: '108001Table5',
  1959. tableName: '执行属性表',
  1960. columnProp: 'itemNo',
  1961. headerAlign: 'center',
  1962. align: 'center',
  1963. columnLabel: '属性编码',
  1964. columnHidden: false,
  1965. columnImage: false,
  1966. status: true,
  1967. fixed: '',
  1968. columnWidth: 80
  1969. },
  1970. {
  1971. userId: this.$store.state.user.name,
  1972. functionId: 108001,
  1973. serialNumber: '108001Table5ItemDesc',
  1974. tableId: '108001Table5',
  1975. tableName: '执行属性表',
  1976. columnProp: 'itemDesc',
  1977. headerAlign: 'center',
  1978. align: 'center',
  1979. columnLabel: '属性名称',
  1980. columnHidden: false,
  1981. columnImage: false,
  1982. status: true,
  1983. fixed: '',
  1984. columnWidth: 150
  1985. },
  1986. ],
  1987. partColumnList: [
  1988. {
  1989. columnProp: 'testPartNo',
  1990. headerAlign: "center",
  1991. align: "left",
  1992. columnLabel: 'PLM物料编码',
  1993. columnHidden: false,
  1994. columnImage: false,
  1995. columnSortable: false,
  1996. sortLv: 0,
  1997. status: true,
  1998. fixed: '',
  1999. columnWidth: 120
  2000. },
  2001. {
  2002. columnProp: 'finalPartNo',
  2003. headerAlign: "center",
  2004. align: "left",
  2005. columnLabel: 'IFS物料编码',
  2006. columnHidden: false,
  2007. columnImage: false,
  2008. columnSortable: false,
  2009. sortLv: 0,
  2010. status: true,
  2011. fixed: '',
  2012. columnWidth: 120
  2013. },
  2014. {
  2015. columnProp: 'customerPartNo',
  2016. headerAlign: "center",
  2017. align: "left",
  2018. columnLabel: '客户料号',
  2019. columnHidden: false,
  2020. columnImage: false,
  2021. columnSortable: false,
  2022. sortLv: 0,
  2023. status: true,
  2024. fixed: '',
  2025. columnWidth: 120
  2026. },
  2027. {
  2028. columnProp: 'partDesc',
  2029. headerAlign: "center",
  2030. align: "left",
  2031. columnLabel: '物料名称',
  2032. columnHidden: false,
  2033. columnImage: false,
  2034. status: true,
  2035. fixed: '',
  2036. columnWidth: 200
  2037. },
  2038. ],
  2039. // ======== 必填规则 ========
  2040. rules: {
  2041. applicantId: [
  2042. {
  2043. required: true,
  2044. message: ' ',
  2045. trigger: ['blur','change']
  2046. }
  2047. ],
  2048. applyDate: [
  2049. {
  2050. required: true,
  2051. message: ' ',
  2052. trigger: ['blur','change']
  2053. }
  2054. ],
  2055. changeImpact: [
  2056. {
  2057. required: true,
  2058. message: ' ',
  2059. trigger: ['blur','change']
  2060. }
  2061. ],
  2062. ecnStage: [
  2063. {
  2064. required: true,
  2065. message: ' ',
  2066. trigger: ['blur','change']
  2067. }
  2068. ],
  2069. changeType: [
  2070. {
  2071. required: true,
  2072. message: ' ',
  2073. trigger: ['blur','change']
  2074. }
  2075. ],
  2076. tpEngineerId: [
  2077. {
  2078. required: true,
  2079. message: ' ',
  2080. trigger: ['blur','change']
  2081. }
  2082. ],
  2083. changePhaseInDate: [
  2084. {
  2085. required: true,
  2086. message: ' ',
  2087. trigger: ['blur','change']
  2088. }
  2089. ],
  2090. dfIsProduct: [
  2091. {
  2092. required: true,
  2093. message: ' ',
  2094. trigger: ['blur','change']
  2095. }
  2096. ],
  2097. printing: [
  2098. {
  2099. required: true,
  2100. message: ' ',
  2101. trigger: ['blur','change']
  2102. }
  2103. ],
  2104. manufacturingCostIsChange: [
  2105. {
  2106. required: true,
  2107. message: ' ',
  2108. trigger: ['blur','change']
  2109. }
  2110. ],
  2111. changeRequestDesc: [
  2112. {
  2113. required: true,
  2114. message: ' ',
  2115. trigger: ['blur','change']
  2116. }
  2117. ],
  2118. isReQuote: [
  2119. {
  2120. required: true,
  2121. message: ' ',
  2122. trigger: ['blur','change']
  2123. }
  2124. ],
  2125. ulCertificationRequirements: [
  2126. {
  2127. required: true,
  2128. message: ' ',
  2129. trigger: ['blur','change']
  2130. }
  2131. ],
  2132. ulContinueToMeetDemand: [
  2133. {
  2134. required: true,
  2135. message: ' ',
  2136. trigger: ['blur','change']
  2137. }
  2138. ],
  2139. gpCertificationRequirements: [
  2140. {
  2141. required: true,
  2142. message: ' ',
  2143. trigger: ['blur','change']
  2144. }
  2145. ],
  2146. gpContinueToMeetDemand: [
  2147. {
  2148. required: true,
  2149. message: ' ',
  2150. trigger: ['blur','change']
  2151. }
  2152. ],
  2153. ecnType: [
  2154. {
  2155. required: true,
  2156. message: ' ',
  2157. trigger: ['blur','change']
  2158. }
  2159. ],
  2160. },
  2161. // ======== 复选数据集 ========
  2162. dataSelections: [],
  2163. dataSelections2: [],
  2164. itemSelections: [],
  2165. itemSelections2: [],
  2166. itemCSSelections: [],
  2167. // ======== 模态框开关控制 ========
  2168. modalFlag: false,
  2169. modalDisableFlag: false,
  2170. EcnTypeModalFlag: false,
  2171. chooseModelFlag: false,
  2172. chooseModelFlag2: false,
  2173. chooseCSModelFlag: false,
  2174. addDetailModal: false,
  2175. partModelFlag: false,
  2176. saveDataLoading: false,
  2177. searchLoading: false,
  2178. filterVisible: false,
  2179. isFilterSearch: false,
  2180. filterSearchData: {},
  2181. }
  2182. },
  2183. created () {
  2184. this.getDataList()
  2185. this.getEcnModel()
  2186. this.getEcnModel2()
  2187. this.getEcnCSModel()
  2188. this.getBuBySite()
  2189. },
  2190. mounted() {
  2191. this.$nextTick(() => {
  2192. this.height = window.innerHeight - 211
  2193. })
  2194. },
  2195. computed:{
  2196. delegateAccessName: {
  2197. get() {
  2198. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  2199. },
  2200. set(val) {
  2201. }
  2202. },
  2203. totalCost: {
  2204. get () {
  2205. let total = 0
  2206. if (this.costImpactData.productionProductFlag === 'Y') {
  2207. total += +this.costImpactData.productionProductScrapAmount
  2208. }
  2209. if (this.costImpactData.inventoryProductFlag === 'Y') {
  2210. total += +this.costImpactData.inventoryProductScrapAmount
  2211. }
  2212. if (this.costImpactData.affectedFlag === 'Y') {
  2213. total += +this.costImpactData.affectedScrapAmount
  2214. }
  2215. return total
  2216. }
  2217. }
  2218. },
  2219. methods: {
  2220. // 获取用户的bu
  2221. getBuBySite () {
  2222. let tempData = {
  2223. site: this.$store.state.user.site,
  2224. }
  2225. getBuBySite(tempData).then(({data}) => {
  2226. if (data.code === 0) {
  2227. this.buList = data.rows
  2228. }
  2229. })
  2230. },
  2231. // ======= 正则校验 =======
  2232. handleInput (value, type) {
  2233. // 大于等于0,且只能输入16位小数
  2234. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  2235. if (val === null || val === undefined || val === '') {
  2236. val = 0
  2237. }
  2238. if (type === 1) {
  2239. this.costImpactData.productionProductScrapAmount = val
  2240. } else if (type === 2) {
  2241. this.costImpactData.inventoryProductScrapAmount = val
  2242. } else if (type === 3) {
  2243. this.costImpactData.affectedScrapAmount = val
  2244. }
  2245. },
  2246. partInput (row, val) {
  2247. row.newPartNo = val.toUpperCase()
  2248. },
  2249. executorInput (row, val) {
  2250. //row.executor = val.toUpperCase()
  2251. },
  2252. choosePartNo (row) {
  2253. this.partData.site = row.site
  2254. this.partData.buNo = row.buNo
  2255. this.tempPartRow = row
  2256. this.queryPartList()
  2257. //this.getBaseList(133)
  2258. },
  2259. // 查询物料
  2260. queryPartList () {
  2261. this.partData.limit = this.pageSize2
  2262. this.partData.page = this.pageIndex2
  2263. choosePartNoList(this.partData).then(({data}) => {
  2264. if (data && data.code === 0) {
  2265. this.partList = data.page.list
  2266. this.pageIndex2 = data.page.currPage
  2267. this.pageSize2 = data.page.pageSize
  2268. this.totalPage2 = data.page.totalCount
  2269. this.partModelFlag = true
  2270. } else {
  2271. this.partList = []
  2272. }
  2273. })
  2274. },
  2275. // 双击选中物料
  2276. getRowData (row) {
  2277. this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
  2278. this.partModelFlag = false
  2279. },
  2280. // 每页数
  2281. sizeChangeHandle2 (val) {
  2282. this.pageSize2 = val
  2283. this.pageIndex2 = 1
  2284. this.queryPartList()
  2285. },
  2286. // 当前页
  2287. currentChangeHandle2 (val) {
  2288. this.pageIndex2 = val
  2289. this.queryPartList()
  2290. },
  2291. chooseExecutor (row) {
  2292. this.tempExecutorRow = row
  2293. this.getBaseList(2010)
  2294. },
  2295. ecnTypeHeaderChange (val,index) {
  2296. if (val === 'Y') {
  2297. for (let i = 0; i < this.form[index].list.length; i++) {
  2298. this.form[index].list[i].flag = 'Y'
  2299. }
  2300. } else {
  2301. for (let i = 0; i < this.form[index].list.length; i++) {
  2302. this.form[index].list[i].flag = 'N'
  2303. }
  2304. }
  2305. },
  2306. ecnTypeDetailChange (val,index) {
  2307. if (this.form[index].list.every(x => x.flag === 'Y')) {
  2308. this.form[index].flag = 'Y'
  2309. }else {
  2310. this.form[index].flag = 'N'
  2311. }
  2312. },
  2313. selectFlag (row) {
  2314. if (row.ecnFlag === '变更中') {
  2315. return false
  2316. } else {
  2317. return true
  2318. }
  2319. },
  2320. //每页数
  2321. sizeChangeHandle (val) {
  2322. this.pageSize = val
  2323. this.pageIndex = 1
  2324. if ( this.isFilterSearch === false){
  2325. this.getDataList()
  2326. } else {
  2327. this.queryByAnyField(this.filterSearchData)
  2328. }
  2329. },
  2330. // 当前页
  2331. currentChangeHandle (val) {
  2332. this.pageIndex = val
  2333. if ( this.isFilterSearch === false){
  2334. this.getDataList()
  2335. } else {
  2336. this.queryByAnyField(this.filterSearchData)
  2337. }
  2338. },
  2339. // 获取数据列表
  2340. getDataList () {
  2341. this.searchData.limit = this.pageSize
  2342. this.searchData.page = this.pageIndex
  2343. this.searchLoading = true
  2344. technicalSpecificationSearch(this.searchData).then(({data}) => {
  2345. if (data.code === 0) {
  2346. this.dataList = data.page.list
  2347. this.pageIndex = data.page.currPage
  2348. this.pageSize = data.page.pageSize
  2349. this.totalPage = data.page.totalCount
  2350. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  2351. this.searchLoading = false
  2352. } else {
  2353. this.searchLoading = false
  2354. }
  2355. }).catch(()=>{
  2356. this.searchLoading = false
  2357. })
  2358. this.isFilterSearch = false
  2359. },
  2360. // 复选物料信息
  2361. selectionData (val) {
  2362. this.dataSelections = val
  2363. this.$refs.selectDiv.setLengthselected(this.dataSelections.length)
  2364. },
  2365. // 复选物料信息
  2366. selectionData2 (val) {
  2367. this.dataSelections2 = val
  2368. },
  2369. // 页签切换
  2370. refreshCurrentTabTable () {
  2371. },
  2372. // 变更申请模态框
  2373. changeModel () {
  2374. if (this.dataSelections.length === 0) {
  2375. this.$message.warning('请选择要变更的技术参数卡!')
  2376. return
  2377. }
  2378. if (!this.dataSelections.every(item => item.buNo === this.dataSelections[0].buNo)) {
  2379. this.$message.warning('请选择相同BU的技术参数卡!')
  2380. return
  2381. }
  2382. // 获取申请单号
  2383. let tempData = {
  2384. site: this.$store.state.user.site,
  2385. buNo: this.dataSelections[0].buNo,
  2386. transType: 'change_no',
  2387. detailList: this.dataSelections
  2388. }
  2389. this.saveDataLoading = true
  2390. changeRequestTempSave(tempData).then(({data}) => {
  2391. if (data.code === 0) {
  2392. this.modalData = {
  2393. site: this.$store.state.user.site,
  2394. changeNo: data.rows.changeNo,
  2395. applicantId: this.$store.state.user.name,
  2396. applicantName: this.$store.state.user.userDisplay,
  2397. applicationDepartmentId: '',
  2398. applicationDepartmentName: '',
  2399. applyDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  2400. changeImpact: '',
  2401. changeImpactDesc: '',
  2402. ecnStage: '',
  2403. changeType: '',
  2404. tpEngineerId: '',
  2405. tpEngineerName: '',
  2406. changePhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  2407. dfIsProduct: '',
  2408. printing: '',
  2409. manufacturingCostIsChange: '',
  2410. changeRequestDesc: '',
  2411. isReQuote: '',
  2412. ulCertificationRequirements: '',
  2413. ulContinueToMeetDemand: '',
  2414. gpCertificationRequirements: '',
  2415. gpContinueToMeetDemand: '',
  2416. createBy: this.$store.state.user.name,
  2417. detailList: [],
  2418. ecnTypeData: [],
  2419. industrialEngineerId: '',
  2420. industrialEngineerName: '',
  2421. changeStatus: '草稿',
  2422. ecnType: '',
  2423. cqcOperatorId: '',
  2424. cqcOperatorName: '',
  2425. faiOperatorId: '',
  2426. faiOperatorName: ''
  2427. }
  2428. this.changeTitle = '变更申请-' + this.modalData.changeNo
  2429. this.costImpactData = {
  2430. site: this.$store.state.user.site,
  2431. changeNo: data.rows.changeNo,
  2432. productionProductFlag: '',
  2433. inventoryProductFlag: '',
  2434. newOrderFlag: '',
  2435. affectedFlag: '',
  2436. productionProductNumber: '',
  2437. productionProductOpinions: '',
  2438. productionProductScrapAmount: 0,
  2439. productionProductRemark: '',
  2440. productionProductExecutor: '',
  2441. productionProductExecutorName: '',
  2442. inventoryProductNumber: '',
  2443. inventoryProductOpinions: '',
  2444. inventoryProductScrapAmount: 0,
  2445. inventoryProductRemark: '',
  2446. inventoryProductExecutor: '',
  2447. inventoryProductExecutorName: '',
  2448. newOrderNumber: '',
  2449. affectedNumber: '',
  2450. affectedOpinions: '',
  2451. affectedScrapAmount: 0,
  2452. affectedRemark: '',
  2453. affectedExecutor: '',
  2454. affectedExecutorName: '',
  2455. changeTotalCost: '',
  2456. remark: '',
  2457. createBy: this.$store.state.user.name,
  2458. }
  2459. this.executionInfoData = {
  2460. site: this.$store.state.user.site,
  2461. changeNo: data.rows.changeNo,
  2462. originalFilmNo: '',
  2463. newFilmNo: '',
  2464. originalDieCuttingRuleNo: '',
  2465. newDieCuttingRuleNo: '',
  2466. originalStencilNo: '',
  2467. newStencilNo: '',
  2468. executionDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  2469. createBy: this.$store.state.user.name,
  2470. chooseItemList: [],
  2471. chooseItemList2: []
  2472. }
  2473. this.countersignatureData = {
  2474. site: this.$store.state.user.site,
  2475. changeNo: data.rows.changeNo,
  2476. createBy: this.$store.state.user.name,
  2477. chooseCSItemList: []
  2478. }
  2479. this.chooseItemList = []
  2480. this.chooseItemList2 = []
  2481. this.chooseCSItemList = []
  2482. this.getDepartmentByUserName()
  2483. this.getEcnTypeData() // 获取ECN种类
  2484. this.chooseDataList = data.rows.chooseDataList
  2485. this.activeName = 'basicInformation'
  2486. this.modalFlag = true
  2487. this.modalDisableFlag = false
  2488. } else {
  2489. this.$alert(data.msg, '错误', {
  2490. confirmButtonText: '确定'
  2491. })
  2492. }
  2493. this.saveDataLoading = false
  2494. }).catch(()=>{
  2495. this.saveDataLoading = false
  2496. })
  2497. },
  2498. // 删除变更申请模态框
  2499. closeModalFlag () {
  2500. // 删除临时变更单数据
  2501. this.saveDataLoading = true
  2502. deleteTempChangeInfo(this.modalData).then(({data}) => {
  2503. if (data && data.code === 0) {
  2504. this.getDataList()
  2505. this.modalFlag = false
  2506. } else {
  2507. this.$alert(data.msg, '错误', {
  2508. confirmButtonText: '确定'
  2509. })
  2510. }
  2511. this.saveDataLoading = false
  2512. }).catch(()=>{
  2513. this.saveDataLoading = false
  2514. })
  2515. },
  2516. // 跳转变更申请
  2517. toMenu () {
  2518. if (this.$router.resolve(`/changeManagement-changeRecord`).resolved.name === '404') {
  2519. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定'})
  2520. } else {
  2521. this.$router.push({name:`changeManagement-changeRecord`,params:{changeNo: this.modalData.changeNo}})
  2522. }
  2523. },
  2524. // 新增变更申请
  2525. saveData (type) {
  2526. // 基本信息校验
  2527. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  2528. this.$message.warning('请选择申请人员!')
  2529. return
  2530. }
  2531. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  2532. this.$message.warning('请选择申请日期!')
  2533. return
  2534. }
  2535. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  2536. this.$message.warning('请选择ECN阶段!')
  2537. return
  2538. }
  2539. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  2540. this.$message.warning('请选择变更类别!')
  2541. return
  2542. }
  2543. if (this.modalData.ecnType === '' || this.modalData.ecnType == null) {
  2544. this.$message.warning('请选择ECN种类!')
  2545. return
  2546. }
  2547. if (this.form.length === 0) {
  2548. this.$message.warning('请选择ECN种类!')
  2549. return
  2550. }
  2551. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  2552. this.$message.warning('请选择审批人员!')
  2553. return
  2554. }
  2555. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  2556. this.$message.warning('请选择变更生效日期!')
  2557. return
  2558. }
  2559. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  2560. this.$message.warning('请选择是否DF产品!')
  2561. return
  2562. }
  2563. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  2564. this.$message.warning('请选择I/E!')
  2565. return
  2566. }
  2567. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  2568. this.$message.warning('请填写变更要求描述!')
  2569. return
  2570. }
  2571. if (this.modalData.printing === '' || this.modalData.printing == null) {
  2572. this.$message.warning('请选择印刷方式!')
  2573. return
  2574. }
  2575. if (this.chooseDataList.length === 0) {
  2576. this.$message.warning('请添加需要变更的技术参数卡!')
  2577. return
  2578. }
  2579. if (!this.chooseDataList.every(item => item.buNo === this.chooseDataList[0].buNo)) {
  2580. this.$message.warning('请选择相同BU的技术参数卡!')
  2581. return
  2582. }
  2583. // 库存成本影响校验
  2584. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  2585. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  2586. this.$message.warning('请填写在生产品数量!')
  2587. return
  2588. }
  2589. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  2590. this.$message.warning('请填写在生产品处理意见!')
  2591. return
  2592. }
  2593. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  2594. this.$message.warning('请填写在生产品执行人!')
  2595. return
  2596. }
  2597. }
  2598. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  2599. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  2600. this.$message.warning('请填写成品库存数量!')
  2601. return
  2602. }
  2603. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  2604. this.$message.warning('请填写成品库存处理意见!')
  2605. return
  2606. }
  2607. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  2608. this.$message.warning('请填写成品库存执行人!')
  2609. return
  2610. }
  2611. }
  2612. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  2613. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  2614. this.$message.warning('请填写新订单数量!')
  2615. return
  2616. }
  2617. }
  2618. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  2619. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  2620. this.$message.warning('请填写影响的原材料及其库存量数量!')
  2621. return
  2622. }
  2623. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  2624. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  2625. return
  2626. }
  2627. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  2628. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  2629. return
  2630. }
  2631. }
  2632. this.saveDataLoading = true
  2633. this.costImpactData.changeTotalCost = this.totalCost
  2634. this.executionInfoData.chooseItemList = this.chooseItemList
  2635. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  2636. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2637. this.modalData.showInQueryFlag = 'Y'
  2638. this.modalData.detailList = this.chooseDataList // 明细
  2639. this.modalData.ecnTypeData = this.form // ECN种类
  2640. this.modalData.costImpactData = this.costImpactData // 库存成本影响
  2641. this.modalData.executionInfoData = this.executionInfoData // TP执行信息
  2642. this.modalData.countersignatureData = this.countersignatureData // 会签信息
  2643. this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
  2644. changeRequestUpdate(this.modalData).then(({data}) => {
  2645. if (data && data.code === 0) {
  2646. this.modalData = data.rows.modalData
  2647. this.changeTitle = '变更申请-' + this.modalData.changeNo
  2648. this.form = data.rows.form
  2649. this.chooseDataList = data.rows.chooseDataList
  2650. this.costImpactData = data.rows.costImpactData
  2651. this.executionInfoData = data.rows.executionInfoData
  2652. this.executionInfoData.createBy = this.$store.state.user.name
  2653. this.chooseItemList = data.rows.chooseItemList
  2654. this.chooseItemList2 = data.rows.chooseItemList2
  2655. this.chooseCSItemList = data.rows.chooseCSItemList
  2656. this.getDataList()
  2657. this.$message({
  2658. message: '操作成功',
  2659. type: 'success',
  2660. duration: 1500,
  2661. onClose: () => {}
  2662. })
  2663. if (type === 2) { // 保存并跳转
  2664. this.modalFlag = false
  2665. this.toMenu()
  2666. }
  2667. } else {
  2668. this.$alert(data.msg, '错误', {
  2669. confirmButtonText: '确定'
  2670. })
  2671. }
  2672. this.saveDataLoading = false
  2673. }).catch(()=>{
  2674. this.saveDataLoading = false
  2675. })
  2676. },
  2677. // 删除所选技术参数卡
  2678. deleteChooseDataModal (row) {
  2679. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  2680. confirmButtonText: '确定',
  2681. cancelButtonText: '取消',
  2682. type: 'warning'
  2683. }).then(() => {
  2684. this.chooseDataList = this.chooseDataList.filter(a => {
  2685. return a.codeNo !== row.codeNo
  2686. })
  2687. })
  2688. },
  2689. // 根据人员编码查人员部门
  2690. getDepartmentByUserName () {
  2691. let tempData = {
  2692. site: this.$store.state.user.site,
  2693. username: this.modalData.applicantId
  2694. }
  2695. getDepartmentByUserName(tempData).then(({data}) => {
  2696. if (data.code === 0) {
  2697. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  2698. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  2699. }
  2700. })
  2701. },
  2702. // 回车换行
  2703. focusNextInput (index, type) {
  2704. let aaa = ''
  2705. if (this.chooseDataList.length - 1 === index) {
  2706. aaa = `${type}0`
  2707. } else {
  2708. aaa = `${type}${index + 1}`
  2709. }
  2710. this.$nextTick(() => {
  2711. this.$refs[aaa].focus()
  2712. })
  2713. },
  2714. // 上传文件
  2715. uploadFileModal () {
  2716. this.uploadDialog = true
  2717. },
  2718. // 选择ECN种类模态框
  2719. chooseEcnTypeModal () {
  2720. this.EcnTypeModalFlag = true
  2721. },
  2722. // 查询ECN种类数据
  2723. getEcnTypeData () {
  2724. let tempData = {
  2725. site: this.$store.state.user.site
  2726. }
  2727. getEcnTypeData(tempData).then(({data}) => {
  2728. if (data.code === 0) {
  2729. this.form = data.rows
  2730. }
  2731. })
  2732. },
  2733. // 保存ECN种类
  2734. saveEcnTypeData () {
  2735. this.$message({
  2736. message: '操作成功',
  2737. type: 'success',
  2738. duration: 1500,
  2739. onClose: () => {}
  2740. })
  2741. this.EcnTypeModalFlag = false
  2742. },
  2743. // 选择模板属性
  2744. chooseModel () {
  2745. this.chooseModelData = {
  2746. site: this.$store.state.user.site,
  2747. itemNo: '',
  2748. itemDesc: '',
  2749. functionType: 'ECN',
  2750. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  2751. }
  2752. // 先清空缓存选中
  2753. // this.$nextTick(() => this.$refs.itemTable.clearSelection())
  2754. getItemList(this.chooseModelData).then(({data}) => {
  2755. if (data && data.code === 0) {
  2756. this.itemList = data.rows
  2757. this.itemList.forEach(val => {
  2758. // 回显选中
  2759. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2760. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  2761. }
  2762. })
  2763. } else {
  2764. this.$alert(data.msg, '错误', {
  2765. confirmButtonText: '确定'
  2766. })
  2767. }
  2768. })
  2769. this.chooseModelFlag = true
  2770. },
  2771. // 选择模板属性
  2772. chooseFeasibilityAssessmentModel () {
  2773. this.chooseModelData2 = {
  2774. site: this.$store.state.user.site,
  2775. itemNo: '',
  2776. itemDesc: '',
  2777. functionType: 'ECN',
  2778. codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : ''
  2779. }
  2780. // 先清空缓存选中
  2781. //this.$nextTick(() => this.$refs.itemTable2.clearSelection())
  2782. getItemList(this.chooseModelData2).then(({data}) => {
  2783. if (data && data.code === 0) {
  2784. this.itemList2 = data.rows
  2785. this.itemList2.forEach(val => {
  2786. // 回显选中
  2787. if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) {
  2788. this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true))
  2789. }
  2790. })
  2791. } else {
  2792. this.$alert(data.msg, '错误', {
  2793. confirmButtonText: '确定'
  2794. })
  2795. }
  2796. })
  2797. this.chooseModelFlag2 = true
  2798. },
  2799. // 查询属性
  2800. searchItemList () {
  2801. getItemList(this.chooseModelData).then(({data}) => {
  2802. if (data.code === 0) {
  2803. this.itemList = data.rows
  2804. }
  2805. })
  2806. },
  2807. // 查询属性
  2808. searchItemList2 () {
  2809. getItemList(this.chooseModelData2).then(({data}) => {
  2810. if (data.code === 0) {
  2811. this.itemList2 = data.rows
  2812. }
  2813. })
  2814. },
  2815. // 单机选择
  2816. itemClickRow (row) {
  2817. this.$refs.itemTable.toggleRowSelection(row)
  2818. },
  2819. // 复选属性
  2820. selectionItem (val) {
  2821. this.itemSelections = val
  2822. },
  2823. // 单机选择
  2824. itemClickRow2 (row) {
  2825. this.$refs.itemTable2.toggleRowSelection(row)
  2826. },
  2827. // 复选属性
  2828. selectionItem2 (val) {
  2829. this.itemSelections2 = val
  2830. },
  2831. // 确认多选属性
  2832. confirmItem () {
  2833. if (this.itemSelections.length === 0) {
  2834. this.$message.warning("请勾选属性!")
  2835. return
  2836. }
  2837. // 临时集合
  2838. let temp = []
  2839. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  2840. this.chooseItemList.forEach(itemA => {
  2841. if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  2842. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  2843. temp.push(itemA)
  2844. }
  2845. })
  2846. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  2847. this.itemSelections.forEach(itemB => {
  2848. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  2849. // 如果b中的对象名字不在结果中,则添加到结果中
  2850. temp.push(itemB)
  2851. }
  2852. })
  2853. this.chooseItemList = temp
  2854. this.chooseModelFlag = false
  2855. },
  2856. // 确认多选属性
  2857. confirmItem2 () {
  2858. if (this.itemSelections2.length === 0) {
  2859. this.$message.warning("请勾选属性!")
  2860. return
  2861. }
  2862. // 临时集合
  2863. let temp = []
  2864. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  2865. this.chooseItemList2.forEach(itemA => {
  2866. if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) {
  2867. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  2868. temp.push(itemA)
  2869. }
  2870. })
  2871. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  2872. this.itemSelections2.forEach(itemB => {
  2873. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  2874. // 如果b中的对象名字不在结果中,则添加到结果中
  2875. temp.push(itemB)
  2876. }
  2877. })
  2878. this.chooseItemList2 = temp.map(item => {
  2879. if (item.availableValueList.length > 0) {
  2880. item.chooseValue = item.availableValueList[0].availableValue
  2881. }
  2882. return item
  2883. })
  2884. this.chooseModelFlag2 = false
  2885. },
  2886. // 查询ECN的模板
  2887. getEcnModel () {
  2888. let tempData = {
  2889. site: this.$store.state.user.site,
  2890. functionType: 'ECN',
  2891. codeNo: 'E001'
  2892. }
  2893. getEcnModel(tempData).then(({data}) => {
  2894. if (data.code === 0) {
  2895. this.modelList = data.rows
  2896. }
  2897. })
  2898. },
  2899. // 查询ECN的评估模板
  2900. getEcnModel2 () {
  2901. let tempData = {
  2902. site: this.$store.state.user.site,
  2903. functionType: 'ECN',
  2904. codeNo: 'E002'
  2905. }
  2906. getEcnModel(tempData).then(({data}) => {
  2907. if (data.code === 0) {
  2908. this.modelList2 = data.rows
  2909. }
  2910. })
  2911. },
  2912. // 查询会签的模板
  2913. getEcnCSModel () {
  2914. let tempData = {
  2915. site: this.$store.state.user.site,
  2916. functionType: 'ECN',
  2917. codeNo: 'E003'
  2918. }
  2919. getEcnModel(tempData).then(({data}) => {
  2920. if (data.code === 0) {
  2921. this.modelCSList = data.rows
  2922. }
  2923. })
  2924. },
  2925. // 选择会签模板属性
  2926. chooseCSModel () {
  2927. this.chooseCSModelData = {
  2928. site: this.$store.state.user.site,
  2929. itemNo: '',
  2930. itemDesc: '',
  2931. functionType: 'ECN',
  2932. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  2933. }
  2934. // 先清空缓存选中
  2935. // this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  2936. // 查询所有属性
  2937. getItemList(this.chooseCSModelData).then(({data}) => {
  2938. if (data && data.code === 0) {
  2939. this.itemCSList = data.rows
  2940. this.itemCSList.forEach(val => {
  2941. // 回显选中的部门
  2942. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2943. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  2944. }
  2945. })
  2946. } else {
  2947. this.$alert(data.msg, '错误', {
  2948. confirmButtonText: '确定'
  2949. })
  2950. }
  2951. })
  2952. this.chooseCSModelFlag = true
  2953. },
  2954. // 查询CS属性
  2955. searchCSItemList () {
  2956. getItemList(this.chooseCSModelData).then(({data}) => {
  2957. if (data.code === 0) {
  2958. this.itemCSList = data.rows
  2959. }
  2960. })
  2961. },
  2962. // 单击选择
  2963. itemCSClickRow (row) {
  2964. this.$refs.itemCSTable.toggleRowSelection(row)
  2965. },
  2966. // 复选CS属性
  2967. selectionCSItem (val) {
  2968. this.itemCSSelections = val
  2969. },
  2970. // 确认多选CS属性
  2971. confirmCSItem () {
  2972. if (this.itemCSSelections.length === 0) {
  2973. this.$message.warning("请勾选属性!")
  2974. return
  2975. }
  2976. // 临时集合
  2977. let temp = []
  2978. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  2979. this.chooseCSItemList.forEach(itemA => {
  2980. if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  2981. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  2982. temp.push(itemA)
  2983. }
  2984. })
  2985. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  2986. this.itemCSSelections.forEach(itemB => {
  2987. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  2988. // 如果b中的对象名字不在结果中,则添加到结果中
  2989. temp.push(itemB)
  2990. }
  2991. })
  2992. this.chooseCSItemList = temp
  2993. this.chooseCSModelFlag = false
  2994. },
  2995. // 新增技术参数卡
  2996. addChangeDetail () {
  2997. technicalSpecificationSearch2(this.searchData2).then(({data}) => {
  2998. if (data.code === 0) {
  2999. this.dataList2 = data.rows
  3000. const shouldExclude = (item) => {
  3001. return this.chooseDataList.some(cdItem =>
  3002. cdItem.site === item.site && cdItem.codeNo === item.codeNo
  3003. )
  3004. }
  3005. this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
  3006. this.addDetailModal = true
  3007. } else {
  3008. this.dataList2 = []
  3009. }
  3010. })
  3011. },
  3012. // 确认选择技术参数卡
  3013. addDetail () {
  3014. if (this.dataSelections2.length === 0) {
  3015. this.$message.warning("请勾选技术参数卡!")
  3016. return
  3017. }
  3018. this.dataSelections2.forEach(item => {
  3019. // 确保没有重复的元素
  3020. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
  3021. this.chooseDataList.push(item)
  3022. }
  3023. })
  3024. console.log(this.dataSelections2)
  3025. console.log(this.chooseDataList)
  3026. this.addDetailModal = false
  3027. this.dataSelections2 = []
  3028. },
  3029. // 获取基础数据列表S
  3030. getBaseList (val, type) {
  3031. this.tagNo = val
  3032. this.tagNo1 = type
  3033. this.$nextTick(() => {
  3034. let strVal = ''
  3035. let conSql = ''
  3036. if (val === 103) {
  3037. if (type === 1) {
  3038. strVal = this.modalData.applicantId
  3039. } else if (type === 3) {
  3040. if (this.costImpactData.productionProductFlag !== 'Y') {
  3041. return
  3042. } else {
  3043. strVal = this.costImpactData.productionProductExecutor
  3044. }
  3045. } else if (type === 4) {
  3046. if (this.costImpactData.inventoryProductFlag !== 'Y') {
  3047. return
  3048. } else {
  3049. strVal = this.costImpactData.inventoryProductExecutor
  3050. }
  3051. } else if (type === 5) {
  3052. if (this.costImpactData.affectedFlag !== 'Y') {
  3053. return
  3054. } else {
  3055. strVal = this.costImpactData.affectedExecutor
  3056. }
  3057. }
  3058. // else if (type === 7) {
  3059. // strVal = this.tempExecutorRow.executor
  3060. // }
  3061. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3062. }
  3063. if (val === 133) {
  3064. strVal = this.tempPartRow.newPartNo
  3065. }
  3066. if (val === 2005) {
  3067. strVal = this.modalData.tpEngineerId
  3068. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3069. }
  3070. if (val === 2006) {
  3071. strVal = this.modalData.industrialEngineerId
  3072. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3073. }
  3074. if (val === 2007) {
  3075. strVal = this.modalData.cqcOperatorId
  3076. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3077. }
  3078. if (val === 2008) {
  3079. strVal = this.modalData.faiOperatorId
  3080. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3081. }
  3082. if (val === 2010) {
  3083. strVal = this.tempExecutorRow.executor
  3084. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3085. }
  3086. this.$refs.baseList.init(val, strVal, conSql)
  3087. })
  3088. },
  3089. // 列表方法的回调
  3090. getBaseData (val) {
  3091. if (this.tagNo === 103) {
  3092. if (this.tagNo1 === 1) {
  3093. this.modalData.applicantId = val.username
  3094. this.modalData.applicantName = val.user_display
  3095. this.getDepartmentByUserName()
  3096. } else if (this.tagNo1 === 3) {
  3097. this.costImpactData.productionProductExecutor = val.username
  3098. this.costImpactData.productionProductExecutorName = val.user_display
  3099. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  3100. } else if (this.tagNo1 === 4) {
  3101. this.costImpactData.inventoryProductExecutor = val.username
  3102. this.costImpactData.inventoryProductExecutorName = val.user_display
  3103. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  3104. } else if (this.tagNo1 === 5) {
  3105. this.costImpactData.affectedExecutor = val.username
  3106. this.costImpactData.affectedExecutorName = val.user_display
  3107. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  3108. }
  3109. // else if (this.tagNo1 === 7) {
  3110. // this.$set(this.tempExecutorRow,'executor',val.username)
  3111. // }
  3112. }
  3113. if (this.tagNo === 133) {
  3114. //this.tempPartRow.newPartNo = val.part_no
  3115. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  3116. }
  3117. if (this.tagNo === 2005) {
  3118. this.modalData.tpEngineerId = val.username
  3119. this.modalData.tpEngineerName = val.user_display
  3120. }
  3121. if (this.tagNo === 2006) {
  3122. this.modalData.industrialEngineerId = val.username
  3123. this.modalData.industrialEngineerName = val.user_display
  3124. }
  3125. if (this.tagNo === 2007) {
  3126. this.modalData.cqcOperatorId = val.username
  3127. this.modalData.cqcOperatorName = val.user_display
  3128. }
  3129. if (this.tagNo === 2008) {
  3130. this.modalData.faiOperatorId = val.username
  3131. this.modalData.faiOperatorName = val.user_display
  3132. }
  3133. if (this.tagNo === 2010) {
  3134. this.$set(this.tempExecutorRow,'executor',val.username)
  3135. }
  3136. },
  3137. // 申请人输入校验
  3138. applicantBlur (tagNo) {
  3139. if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
  3140. let tempData = {
  3141. tagno: tagNo,
  3142. conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
  3143. }
  3144. verifyData(tempData).then(({data}) => {
  3145. if (data && data.code === 0) {
  3146. if (data.baseListData.length > 0) {
  3147. this.modalData.applicantId = data.baseListData[0].username
  3148. this.modalData.applicantName = data.baseListData[0].user_display
  3149. this.getDepartmentByUserName()
  3150. return
  3151. }
  3152. }
  3153. })
  3154. }
  3155. this.modalData.applicantName = ''
  3156. this.modalData.applicationDepartmentId = ''
  3157. this.modalData.applicationDepartmentName = ''
  3158. },
  3159. // 审批人员输入校验
  3160. tpEngineerBlur (tagNo) {
  3161. if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
  3162. let tempData = {
  3163. tagno: tagNo,
  3164. conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  3165. }
  3166. verifyData(tempData).then(({data}) => {
  3167. if (data && data.code === 0) {
  3168. if (data.baseListData.length > 0) {
  3169. this.modalData.tpEngineerId = data.baseListData[0].username
  3170. this.modalData.tpEngineerName = data.baseListData[0].user_display
  3171. return
  3172. }
  3173. }
  3174. })
  3175. }
  3176. this.modalData.tpEngineerName = ''
  3177. },
  3178. // I/E输入校验
  3179. industrialEngineerBlur (tagNo) {
  3180. if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
  3181. let tempData = {
  3182. tagno: tagNo,
  3183. conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  3184. }
  3185. verifyData(tempData).then(({data}) => {
  3186. if (data && data.code === 0) {
  3187. if (data.baseListData.length > 0) {
  3188. this.modalData.industrialEngineerId = data.baseListData[0].username
  3189. this.modalData.industrialEngineerName = data.baseListData[0].user_display
  3190. return
  3191. }
  3192. }
  3193. })
  3194. }
  3195. this.modalData.industrialEngineerName = ''
  3196. },
  3197. // CQC输入校验
  3198. cqcOperatorBlur (tagNo) {
  3199. if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
  3200. let tempData = {
  3201. tagno: tagNo,
  3202. conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  3203. }
  3204. verifyData(tempData).then(({data}) => {
  3205. if (data && data.code === 0) {
  3206. if (data.baseListData.length > 0) {
  3207. this.modalData.cqcOperatorId = data.baseListData[0].username
  3208. this.modalData.cqcOperatorName = data.baseListData[0].user_display
  3209. return
  3210. }
  3211. }
  3212. })
  3213. }
  3214. this.modalData.cqcOperatorName = ''
  3215. },
  3216. // FAI输入校验
  3217. faiOperatorBlur (tagNo) {
  3218. if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
  3219. let tempData = {
  3220. tagno: tagNo,
  3221. conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  3222. }
  3223. verifyData(tempData).then(({data}) => {
  3224. if (data && data.code === 0) {
  3225. if (data.baseListData.length > 0) {
  3226. this.modalData.faiOperatorId = data.baseListData[0].username
  3227. this.modalData.faiOperatorName = data.baseListData[0].user_display
  3228. return
  3229. }
  3230. }
  3231. })
  3232. }
  3233. this.modalData.faiOperatorName = ''
  3234. },
  3235. // ======== DelegateAccess 相关方法 ========
  3236. searchDelegateAccessByUser() {
  3237. // 角色 ROO7 的用户
  3238. let params = {
  3239. ...this.changeDelegateAccess,
  3240. site: this.$store.state.user.site,
  3241. }
  3242. searchDelegateAccessByUser(params).then(({data}) => {
  3243. if (data && data.code === 0) {
  3244. this.baseDelegateAccessList = data.rows;
  3245. } else {
  3246. this.$message.warning(data.msg)
  3247. }
  3248. }).catch((error) => {
  3249. this.$message.error(error)
  3250. })
  3251. },
  3252. handleSelectionChange(val) {
  3253. // 获得选中的 用户
  3254. this.selectionDelegateAccess2 = val;
  3255. },
  3256. handleTableClick(row, column, event, val) {
  3257. // 表格行点击选择
  3258. this.$refs[val].toggleRowSelection(row);
  3259. },
  3260. openDelegateAccess() {
  3261. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  3262. if (rows && rows.length > 0) {
  3263. this.$nextTick(() => {
  3264. rows.forEach(item => {
  3265. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  3266. this.$refs.delegateAccesstTable.toggleRowSelection(row);
  3267. })
  3268. })
  3269. }
  3270. },
  3271. closeDelegateAccess() {
  3272. this.selectionDelegateAccess2 = [];
  3273. },
  3274. confirmDelegateAccess() {
  3275. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  3276. this.delegateAccessVisible = false;
  3277. },
  3278. // ======== 导出相关方法 ========
  3279. /**
  3280. * 导出excel
  3281. */
  3282. async createExportData () {
  3283. this.searchData.limit = -1
  3284. this.searchData.page = 1
  3285. await technicalSpecificationSearch(this.searchData).then(({data}) => {
  3286. this.resultList = data.page.list
  3287. })
  3288. return this.resultList
  3289. },
  3290. startDownload () {},
  3291. finishDownload () {},
  3292. fields () {
  3293. let json = '{'
  3294. this.columnList.forEach((item, index) => {
  3295. if (index == this.columnList.length - 1) {
  3296. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3297. } else {
  3298. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3299. }
  3300. })
  3301. json += '}'
  3302. let s = eval('(' + json + ')')
  3303. return s
  3304. },
  3305. queryByAnyField(params){
  3306. params.no = this.pageIndex
  3307. params.size = this.pageSize
  3308. params.site = this.$store.state.user.site
  3309. params.userId = this.$store.state.user.id.toString()
  3310. this.dataListLoading = true;
  3311. technicalSpecificationSearchAny(params).then(({data})=>{
  3312. if (data && data.code === 0){
  3313. this.dataList = data.page.list
  3314. this.totalPage = data.page.totalCount
  3315. }else {
  3316. this.$message.warning(data.msg)
  3317. }
  3318. this.dataListLoading = false;
  3319. }).catch((error)=>{
  3320. this.$message.error(error)
  3321. this.dataListLoading = false;
  3322. })
  3323. this.filterSearchData = params
  3324. this.isFilterSearch = true
  3325. this.filterVisible = false
  3326. },
  3327. }
  3328. }
  3329. </script>
  3330. <style scoped lang="scss">
  3331. .numInput /deep/ .el-input__inner{
  3332. text-align: right;
  3333. }
  3334. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3335. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3336. -webkit-appearance: none;
  3337. }
  3338. /deep/ .inlineNumber input[type="number"]{
  3339. -moz-appearance: textfield;
  3340. padding-right: 5px !important;
  3341. }
  3342. </style>