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.

3269 lines
126 KiB

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