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.

2249 lines
86 KiB

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
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. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item label="物料编码">
  6. <el-input v-model="searchData.partNo" clearable style="width: 120px"/>
  7. </el-form-item>
  8. <el-form-item label="物料名称">
  9. <el-input v-model="searchData.partDesc" clearable style="width: 150px"/>
  10. </el-form-item>
  11. <el-form-item label="客户编码">
  12. <el-input v-model="searchData.customerId" clearable style="width: 120px"/>
  13. </el-form-item>
  14. <el-form-item label="客户名称">
  15. <el-input v-model="searchData.customerDesc" clearable style="width: 150px"/>
  16. </el-form-item>
  17. <el-form-item label="项目编码">
  18. <el-input v-model="searchData.projectId" clearable style="width: 120px"/>
  19. </el-form-item>
  20. <el-form-item label="项目名称">
  21. <el-input v-model="searchData.projectDesc" clearable style="width: 150px"/>
  22. </el-form-item>
  23. <el-form-item label="技术参数卡编码">
  24. <el-input v-model="searchData.codeNo" clearable style="width: 120px"/>
  25. </el-form-item>
  26. <el-form-item label=" ">
  27. <el-button plain type="primary" @click="getDataList">查询</el-button>
  28. <el-button type="primary" @click="changeModel">变更申请</el-button>
  29. <download-excel
  30. :fields="fields()"
  31. :data="exportData"
  32. type="xls"
  33. :name="exportName"
  34. :header="exportHeader"
  35. :footer="exportFooter"
  36. :fetch="createExportData"
  37. :before-generate="startDownload"
  38. :before-finish="finishDownload"
  39. worksheet="导出信息"
  40. class="el-button el-button--primary el-button--medium">
  41. {{ "导出" }}
  42. </download-excel>
  43. </el-form-item>
  44. </el-form>
  45. <!-- 数据列表 -->
  46. <el-table
  47. :height="height"
  48. :data="dataList"
  49. border
  50. @selection-change="selectionData"
  51. style="width: 100%;">
  52. <el-table-column
  53. type="selection"
  54. header-align="center"
  55. align="center"
  56. :selectable="selectFlag"
  57. width="50">
  58. </el-table-column>
  59. <el-table-column
  60. v-for="(item,index) in columnList" :key="index"
  61. :sortable="item.columnSortable"
  62. :prop="item.columnProp"
  63. :header-align="item.headerAlign"
  64. :show-overflow-tooltip="item.showOverflowTooltip"
  65. :align="item.align"
  66. :fixed="item.fixed === ''?false:item.fixed"
  67. :min-width="item.columnWidth"
  68. :label="item.columnLabel">
  69. <template slot-scope="scope">
  70. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  71. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. <selectDiv ref="selectDiv"></selectDiv>
  76. <!-- 分页插件 -->
  77. <el-pagination
  78. style="margin-top: 0px"
  79. @size-change="sizeChangeHandle"
  80. @current-change="currentChangeHandle"
  81. :current-page="pageIndex"
  82. :page-sizes="[20, 50, 100, 200, 500]"
  83. :page-size="pageSize"
  84. :total="totalPage"
  85. layout="total, sizes, prev, pager, next, jumper">
  86. </el-pagination>
  87. <!-- 变更申请模态框 -->
  88. <el-dialog :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
  89. <el-tabs tab-position="left" type="border-card" v-model="activeName" @tab-click="refreshCurrentTabTable" style="width: 100%;height: 720px;">
  90. <el-tab-pane label="基本信息" name="basicInformation">
  91. <div style="height: 675px">
  92. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  93. <el-form-item prop="applicantId" :rules="rules.applicantId">
  94. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人</a></span>
  95. <el-input v-model="modalData.applicantId" style="width: 120px"></el-input>
  96. <el-input v-model="modalData.applicantName" disabled style="width: 300px"></el-input>
  97. </el-form-item>
  98. <el-form-item label="申请部门" >
  99. <el-input v-model="modalData.applicationDepartmentId" readonly style="width: 120px"></el-input>
  100. <el-input v-model="modalData.applicationDepartmentName" disabled style="width: 300px"></el-input>
  101. </el-form-item>
  102. </el-form>
  103. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  104. <el-form-item label="申请日期" prop="applicantId" :rules="rules.applyDate">
  105. <el-date-picker
  106. style="width: 205px"
  107. v-model="modalData.applyDate"
  108. type="date"
  109. value-format="yyyy-MM-dd"
  110. placeholder="请选择日期"
  111. :editable=false>
  112. </el-date-picker>
  113. </el-form-item>
  114. <el-form-item label="ECN变更影响" prop="changeImpact" :rules="rules.changeImpact">
  115. <dict-data-select v-model="modalData.changeImpact" style="width: 205px" dict-type="change_change_Impact"></dict-data-select>
  116. </el-form-item>
  117. <el-form-item label="变更影响描述" prop="changeImpactDesc" :rules="[{required: modalData.changeImpact === 'Y',message: ' ',trigger: ['blur','change']}]">
  118. <el-input v-model="modalData.changeImpactDesc" style="width: 423px"></el-input>
  119. </el-form-item>
  120. </el-form>
  121. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  122. <el-form-item label="ECN阶段" prop="ecnStage" :rules="rules.ecnStage">
  123. <dict-data-select v-model="modalData.ecnStage" style="width: 205px" dict-type="change_ecn_stage"></dict-data-select>
  124. </el-form-item>
  125. <el-form-item label="变更类别" prop="changeType" :rules="rules.changeType">
  126. <dict-data-select v-model="modalData.changeType" style="width: 100px" dict-type="change_change_type"></dict-data-select>
  127. </el-form-item>
  128. <el-form-item label=" ">
  129. <el-button type="primary" @click="chooseEcnTypeModal" style="width: 90px">ECN种类</el-button>
  130. </el-form-item>
  131. <el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
  132. <span style="cursor: pointer" slot="label" @click="getBaseList(103,2)"><a href="#">TP工程师</a></span>
  133. <el-input v-model="modalData.tpEngineerId" style="width: 120px"></el-input>
  134. <el-input v-model="modalData.tpEngineerName" disabled style="width: 300px"></el-input>
  135. </el-form-item>
  136. </el-form>
  137. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  138. <el-form-item label="变更生效日期" prop="changePhaseInDate" :rules="rules.changePhaseInDate">
  139. <el-date-picker
  140. style="width: 205px"
  141. v-model="modalData.changePhaseInDate"
  142. type="date"
  143. value-format="yyyy-MM-dd"
  144. placeholder="请选择日期"
  145. :editable=false>
  146. </el-date-picker>
  147. </el-form-item>
  148. <el-form-item label="是否DF是产品" prop="dfIsProduct" :rules="rules.dfIsProduct">
  149. <dict-data-select v-model="modalData.dfIsProduct" style="width: 205px" dict-type="change_df_is_product"></dict-data-select>
  150. </el-form-item>
  151. <el-form-item label="印刷方式" prop="printing" :rules="rules.printing">
  152. <dict-data-select v-model="modalData.printing" style="width: 205px" dict-type="change_printing"></dict-data-select>
  153. </el-form-item>
  154. <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">
  155. <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>
  156. </el-form-item>
  157. </el-form>
  158. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  159. <el-form-item label="变更要求描述" prop="changeRequestDesc" :rules="rules.changeRequestDesc">
  160. <el-input type="textarea" v-model="modalData.changeRequestDesc" :rows="3" resize='none' show-word-limit style="width: 643px;height: 30px"></el-input>
  161. </el-form-item>
  162. <el-form-item label="是否重新报价" prop="isReQuote" :rules="rules.isReQuote">
  163. <dict-data-select v-model="modalData.isReQuote" style="width: 205px" dict-type="change_is_re_quote"></dict-data-select>
  164. <el-button type="primary" icon="el-icon-upload" @click="uploadFileModal" style="margin-top: 12px;width: 105px">文件上传</el-button>
  165. </el-form-item>
  166. </el-form>
  167. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 50px">
  168. <el-form-item label="原产品是否UL认证要求" prop="ulCertificationRequirements" :rules="rules.ulCertificationRequirements">
  169. <dict-data-select v-model="modalData.ulCertificationRequirements" style="width: 423px" dict-type="change_ul_certification_requirements"></dict-data-select>
  170. </el-form-item>
  171. <el-form-item label="如果有,变更后能否继续满足此需求" prop="ulContinueToMeetDemand" :rules="rules.ulContinueToMeetDemand">
  172. <dict-data-select v-model="modalData.ulContinueToMeetDemand" style="width: 423px" dict-type="change_ul_continue_to_meet_demand"></dict-data-select>
  173. </el-form-item>
  174. </el-form>
  175. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  176. <el-form-item label="原产品是否GP要求" prop="gpCertificationRequirements" :rules="rules.gpCertificationRequirements">
  177. <dict-data-select v-model="modalData.gpCertificationRequirements" style="width: 423px" dict-type="change_gp_certification_requirements"></dict-data-select>
  178. </el-form-item>
  179. <el-form-item label="如果有,变更后能否继续满足此需求" prop="gpContinueToMeetDemand" :rules="rules.gpContinueToMeetDemand">
  180. <dict-data-select v-model="modalData.gpContinueToMeetDemand" style="width: 423px" dict-type="change_gp_continue_to_meet_demand"></dict-data-select>
  181. </el-form-item>
  182. </el-form>
  183. <el-form :inline="true" label-position="top">
  184. <div class="rq">
  185. <el-table
  186. :data="chooseDataList"
  187. height="300px"
  188. border
  189. style="width:100%">
  190. <el-table-column
  191. v-for="(item,index) in columnChooseDataList" :key="index"
  192. :sortable="item.columnSortable"
  193. :prop="item.columnProp"
  194. :header-align="item.headerAlign"
  195. :show-overflow-tooltip="item.showOverflowTooltip"
  196. :align="item.align"
  197. :fixed="item.fixed == ''?false:item.fixed"
  198. :min-width="item.columnWidth"
  199. :label="item.columnLabel">
  200. <template slot-scope="scope">
  201. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  202. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  203. </template>
  204. </el-table-column>
  205. <el-table-column
  206. prop=""
  207. header-align="center"
  208. align="center"
  209. min-width="170"
  210. label="新物料编码">
  211. <template slot-scope="scope">
  212. <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>
  213. <el-button type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
  214. </template>
  215. </el-table-column>
  216. <el-table-column
  217. prop=""
  218. header-align="center"
  219. align="center"
  220. min-width="90"
  221. label="新图纸编码">
  222. <template slot-scope="scope">
  223. <el-input :ref="`newDrawingNo${scope.$index}`" v-model="scope.row.newDrawingNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDrawingNo')" style="width:98%"></el-input>
  224. </template>
  225. </el-table-column>
  226. <el-table-column
  227. prop=""
  228. header-align="center"
  229. align="center"
  230. min-width="90"
  231. label="新图稿编码">
  232. <template slot-scope="scope">
  233. <el-input :ref="`newDraftNo${scope.$index}`" v-model="scope.row.newDraftNo" @keyup.enter.native="focusNextInput(scope.$index, 'newDraftNo')" style="width:98%"></el-input>
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. fixed="right"
  238. header-align="center"
  239. align="center"
  240. width="60"
  241. label="操作">
  242. <template slot-scope="scope">
  243. <el-link style="cursor: pointer" @click="deleteChooseDataModal(scope.row)">删除</el-link>
  244. </template>
  245. </el-table-column>
  246. </el-table>
  247. </div>
  248. </el-form>
  249. </div>
  250. <el-footer style="height:25px;text-align:center">
  251. <el-button v-if="basicInformationFlag" type="primary" @click="saveData">保存</el-button>
  252. <el-button type="primary" @click="closeModalFlag">关闭</el-button>
  253. </el-footer>
  254. </el-tab-pane>
  255. <el-tab-pane label="库存成本影响" name="inventoryCostImpact">
  256. <div style="height: 675px">
  257. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: -5px;">
  258. <el-form-item style="margin-top: 20px;width: 155px">
  259. <el-checkbox v-model="costImpactData.productionProductFlag" true-label="Y">在生产品</el-checkbox>
  260. </el-form-item>
  261. <el-form-item label="数量">
  262. <el-input class="inlineNumber numInput" v-model="costImpactData.productionProductNumber" :disabled="costImpactData.productionProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  263. </el-form-item>
  264. <el-form-item label="处理意见">
  265. <dict-data-select v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 130px" dict-type="change_production_product_opinions"></dict-data-select>
  266. </el-form-item>
  267. <el-form-item label=" " style="margin-left: -10px">
  268. <el-input v-model="costImpactData.productionProductRemark" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 300px"></el-input>
  269. </el-form-item>
  270. <el-form-item>
  271. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 3)"><a herf="#">执行人</a></span>
  272. <el-input v-model="costImpactData.productionProductExecutorName" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 130px"></el-input>
  273. </el-form-item>
  274. </el-form>
  275. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  276. <el-form-item style="margin-top: 20px;width: 155px">
  277. <el-checkbox v-model="costImpactData.inventoryProductFlag" true-label="Y">成品库存</el-checkbox>
  278. </el-form-item>
  279. <el-form-item label="数量">
  280. <el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductNumber" :disabled="costImpactData.inventoryProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  281. </el-form-item>
  282. <el-form-item label="处理意见">
  283. <dict-data-select v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 130px" dict-type="change_inventory_product_opinions"></dict-data-select>
  284. </el-form-item>
  285. <el-form-item label=" " style="margin-left: -10px">
  286. <el-input v-model="costImpactData.inventoryProductRemark" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 300px"></el-input>
  287. </el-form-item>
  288. <el-form-item>
  289. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 4)"><a herf="#">执行人</a></span>
  290. <el-input v-model="costImpactData.inventoryProductExecutorName" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 130px"></el-input>
  291. </el-form-item>
  292. </el-form>
  293. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  294. <el-form-item style="margin-top: 20px;width: 155px">
  295. <el-checkbox v-model="costImpactData.newOrderFlag" true-label="Y">新订单</el-checkbox>
  296. </el-form-item>
  297. <el-form-item label="数量">
  298. <el-input class="inlineNumber numInput" v-model="costImpactData.newOrderNumber" :disabled="costImpactData.newOrderFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  299. </el-form-item>
  300. </el-form>
  301. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  302. <el-form-item style="margin-top: 20px;width: 155px">
  303. <el-checkbox v-model="costImpactData.affectedFlag" true-label="Y">影响的原材料及其库存量</el-checkbox>
  304. </el-form-item>
  305. <el-form-item label="数量">
  306. <el-input class="inlineNumber numInput" v-model="costImpactData.affectedNumber" :disabled="costImpactData.affectedFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  307. </el-form-item>
  308. <el-form-item label="处理意见">
  309. <dict-data-select v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 130px" dict-type="change_affected_opinions"></dict-data-select>
  310. </el-form-item>
  311. <el-form-item label=" " style="margin-left: -10px">
  312. <el-input v-model="costImpactData.affectedRemark" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 300px"></el-input>
  313. </el-form-item>
  314. <el-form-item>
  315. <span style="cursor: pointer" slot="label" @click="getBaseList(103, 5)"><a herf="#">执行人</a></span>
  316. <el-input v-model="costImpactData.affectedExecutorName" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 130px"></el-input>
  317. </el-form-item>
  318. </el-form>
  319. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  320. <el-form-item label="ECN变更总成本" style="width: 155px">
  321. <el-input class="inlineNumber numInput" v-model="costImpactData.changeTotalCost" type="number" style="width: 125px"></el-input>
  322. </el-form-item>
  323. <el-form-item label="备注">
  324. <el-input v-model="costImpactData.remark" style="width: 692px"></el-input>
  325. </el-form-item>
  326. </el-form>
  327. </div>
  328. <el-footer style="height:25px;text-align:center">
  329. <el-button v-if="InventoryCostImpactFlag" type="primary" @click="inventoryCostImpactSave">保存</el-button>
  330. <el-button type="primary" @click="closeModalFlag">关闭</el-button>
  331. </el-footer>
  332. </el-tab-pane>
  333. <el-tab-pane label="TP&执行信息" name="actionInformation">
  334. <div style="height: 675px">
  335. <el-form :inline="true" label-position="top" :model="executionInfoData" style="margin-top: -5px;">
  336. <el-form-item label="原菲林编号">
  337. <el-input v-model="executionInfoData.originalFilmNo" style="width: 230px"></el-input>
  338. </el-form-item>
  339. <el-form-item label="原啤刀编号">
  340. <el-input v-model="executionInfoData.originalDieCuttingRuleNo" style="width: 230px"></el-input>
  341. </el-form-item>
  342. <el-form-item label="原网板/印版编号">
  343. <el-input v-model="executionInfoData.originalStencilNo" style="width: 230px"></el-input>
  344. </el-form-item>
  345. <el-form-item label="ECN执行日期">
  346. <el-date-picker style="width: 130px" v-model="executionInfoData.executionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :editable=false></el-date-picker>
  347. </el-form-item>
  348. </el-form>
  349. <el-form :inline="true" label-position="top" :model="executionInfoData" style="margin-top: -5px;">
  350. <el-form-item label="新菲林编号">
  351. <el-input v-model="executionInfoData.newFilmNo" style="width: 230px"></el-input>
  352. </el-form-item>
  353. <el-form-item label="新啤刀编号">
  354. <el-input v-model="executionInfoData.newDieCuttingRuleNo" style="width: 230px"></el-input>
  355. </el-form-item>
  356. <el-form-item label="新网板/印版编号">
  357. <el-input v-model="executionInfoData.newStencilNo" style="width: 230px"></el-input>
  358. </el-form-item>
  359. </el-form>
  360. <div style="text-align: center ;font-size: 11px">
  361. <span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
  362. </div>
  363. <el-button type="primary" @click="chooseModel">选择执行模板</el-button>
  364. <div class="rq">
  365. <el-table
  366. :data="chooseItemList"
  367. height="500px"
  368. border
  369. style="width: 100%">
  370. <el-table-column
  371. v-for="(item,index) in columnChooseItemList" :key="index"
  372. :sortable="item.columnSortable"
  373. :prop="item.columnProp"
  374. :header-align="item.headerAlign"
  375. :show-overflow-tooltip="item.showOverflowTooltip"
  376. :align="item.align"
  377. :fixed="item.fixed == ''?false:item.fixed"
  378. :min-width="item.columnWidth"
  379. :label="item.columnLabel">
  380. <template slot-scope="scope">
  381. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  382. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  383. </template>
  384. </el-table-column>
  385. <el-table-column
  386. prop=""
  387. header-align="center"
  388. align="center"
  389. min-width="100"
  390. label="备注">
  391. <template slot-scope="scope">
  392. <el-input v-model="scope.row.itemRemark" style="height: 11px" allow-create>;width:98%"></el-input>
  393. </template>
  394. </el-table-column>
  395. <el-table-column
  396. fixed="right"
  397. header-align="center"
  398. align="center"
  399. width="60"
  400. label="操作">
  401. <template slot-scope="scope">
  402. <el-link style="cursor: pointer" v-if="scope.row.executeFlag !== 'Y'" @click="executeModal(scope.row)">执行</el-link>
  403. </template>
  404. </el-table-column>
  405. </el-table>
  406. </div>
  407. </div>
  408. <el-footer style="height:25px;text-align:center">
  409. <el-button v-if="actionInformationFlag" type="primary" @click="executionInformationSave">保存</el-button>
  410. <el-button type="primary" @click="closeModalFlag">关闭</el-button>
  411. </el-footer>
  412. </el-tab-pane>
  413. <el-tab-pane label="会签信息" name="countersignature">
  414. <div style="height: 675px">
  415. <el-button type="primary" @click="chooseCSModel">选择会签模板</el-button>
  416. <div class="rq">
  417. <el-table
  418. :data="chooseCSItemList"
  419. height="600px"
  420. border
  421. style="width: 100%">
  422. <el-table-column
  423. v-for="(item,index) in columnChooseCSItemList" :key="index"
  424. :sortable="item.columnSortable"
  425. :prop="item.columnProp"
  426. :header-align="item.headerAlign"
  427. :show-overflow-tooltip="item.showOverflowTooltip"
  428. :align="item.align"
  429. :fixed="item.fixed == ''?false:item.fixed"
  430. :min-width="item.columnWidth"
  431. :label="item.columnLabel">
  432. <template slot-scope="scope">
  433. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  434. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  435. </template>
  436. </el-table-column>
  437. <el-table-column
  438. prop=""
  439. header-align="center"
  440. align="center"
  441. min-width="100"
  442. label="备注">
  443. <template slot-scope="scope">
  444. <el-input v-model="scope.row.itemRemark" style="height: 11px" allow-create>;width:98%"></el-input>
  445. </template>
  446. </el-table-column>
  447. <el-table-column
  448. fixed="right"
  449. header-align="center"
  450. align="center"
  451. width="60"
  452. label="操作">
  453. <template slot-scope="scope">
  454. <el-link style="cursor: pointer" v-if="scope.row.executeFlag !== 'Y'" @click="executeCSModal(scope.row)">执行</el-link>
  455. </template>
  456. </el-table-column>
  457. </el-table>
  458. </div>
  459. </div>
  460. <el-footer style="height:25px;text-align:center">
  461. <el-button v-if="CountersignatureFlag" type="primary" @click="countersignatureSave">保存</el-button>
  462. <el-button type="primary" @click="closeModalFlag">关闭</el-button>
  463. </el-footer>
  464. </el-tab-pane>
  465. </el-tabs>
  466. </el-dialog>
  467. <!-- ECN种类模态框 -->
  468. <el-dialog title="ECN种类" :close-on-click-modal="false" v-drag :visible.sync="EcnTypeModalFlag" width="900px">
  469. <el-form ref="dataForm" label-position="right">
  470. <el-row v-for="(item, index) in form" :key="index" style="margin-top: 10px">
  471. <el-col :span="8">
  472. <el-form-item :prop="'input.'+index+'.value'">
  473. <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>
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="16">
  477. <div v-for="i in item.list">
  478. <el-form-item :prop="'input.'+index+'.value'">
  479. <el-checkbox v-model="i.flag" @change="(val)=>ecnTypeDetailChange(val,index)" true-label="Y">{{i.value}}</el-checkbox>
  480. </el-form-item>
  481. </div>
  482. </el-col>
  483. </el-row>
  484. </el-form>
  485. <el-footer style="height:30px;text-align:center">
  486. <el-button type="primary" @click="saveEcnTypeData">保存</el-button>
  487. <el-button type="primary" @click="EcnTypeModalFlag = false">关闭</el-button>
  488. </el-footer>
  489. </el-dialog>
  490. <!-- ECN模板属性清单 -->
  491. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag" width="820px">
  492. <div class="rq">
  493. <el-form :inline="true" label-position="top" :model="chooseModelData">
  494. <el-form-item :label="'模板'">
  495. <el-select value="roleName" v-model="chooseModelData.codeNo" placeholder="请选择" style="width: 120px">
  496. <el-option
  497. v-for = "i in modelList"
  498. :key = "i.codeNo"
  499. :label = "i.codeDesc"
  500. :value = "i.codeNo">
  501. </el-option>
  502. </el-select>
  503. </el-form-item>
  504. <el-form-item label="属性编码">
  505. <el-input v-model="chooseModelData.itemNo" clearable style="width: 120px"></el-input>
  506. </el-form-item>
  507. <el-form-item label="属性名称">
  508. <el-input v-model="chooseModelData.itemDesc" clearable style="width: 120px"></el-input>
  509. </el-form-item>
  510. <el-form-item :label="' '">
  511. <el-button type="primary" @click="searchItemList()">查询</el-button>
  512. </el-form-item>
  513. </el-form>
  514. <el-table
  515. :height="300"
  516. :data="itemList"
  517. ref="itemTable"
  518. @row-click="itemClickRow"
  519. @selection-change="selectionItem"
  520. border
  521. style="width: 100%;">
  522. <el-table-column
  523. type="selection"
  524. header-align="center"
  525. align="center"
  526. width="50">
  527. </el-table-column>
  528. <el-table-column
  529. v-for="(item,index) in columnItemList" :key="index"
  530. :sortable="item.columnSortable"
  531. :prop="item.columnProp"
  532. :header-align="item.headerAlign"
  533. :show-overflow-tooltip="item.showOverflowTooltip"
  534. :align="item.align"
  535. :fixed="item.fixed==''?false:item.fixed"
  536. :min-width="item.columnWidth"
  537. :label="item.columnLabel">
  538. <template slot-scope="scope">
  539. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  540. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  541. </template>
  542. </el-table-column>
  543. </el-table>
  544. </div>
  545. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  546. <el-button type="primary" @click="confirmItem">确认</el-button>
  547. <el-button type="primary" @click="chooseModelFlag = false">关闭</el-button>
  548. </el-footer>
  549. </el-dialog>
  550. <!-- 会签模板属性清单 -->
  551. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseCSModelFlag" width="820px">
  552. <div class="rq">
  553. <el-form :inline="true" label-position="top" :model="chooseCSModelData">
  554. <el-form-item :label="'模板'">
  555. <el-select value="roleName" v-model="chooseCSModelData.codeNo" placeholder="请选择" style="width: 120px">
  556. <el-option
  557. v-for = "i in modelCSList"
  558. :key = "i.codeNo"
  559. :label = "i.codeDesc"
  560. :value = "i.codeNo">
  561. </el-option>
  562. </el-select>
  563. </el-form-item>
  564. <el-form-item label="属性编码">
  565. <el-input v-model="chooseCSModelData.itemNo" clearable style="width: 120px"></el-input>
  566. </el-form-item>
  567. <el-form-item label="属性名称">
  568. <el-input v-model="chooseCSModelData.itemDesc" clearable style="width: 120px"></el-input>
  569. </el-form-item>
  570. <el-form-item :label="' '">
  571. <el-button type="primary" @click="searchCSItemList()">查询</el-button>
  572. </el-form-item>
  573. </el-form>
  574. <el-table
  575. :height="300"
  576. :data="itemCSList"
  577. ref="itemCSTable"
  578. @row-click="itemCSClickRow"
  579. @selection-change="selectionCSItem"
  580. border
  581. style="width: 100%;">
  582. <el-table-column
  583. type="selection"
  584. header-align="center"
  585. align="center"
  586. width="50">
  587. </el-table-column>
  588. <el-table-column
  589. v-for="(item,index) in columnCSItemList" :key="index"
  590. :sortable="item.columnSortable"
  591. :prop="item.columnProp"
  592. :header-align="item.headerAlign"
  593. :show-overflow-tooltip="item.showOverflowTooltip"
  594. :align="item.align"
  595. :fixed="item.fixed==''?false:item.fixed"
  596. :min-width="item.columnWidth"
  597. :label="item.columnLabel">
  598. <template slot-scope="scope">
  599. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  600. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  601. </template>
  602. </el-table-column>
  603. </el-table>
  604. </div>
  605. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  606. <el-button type="primary" @click="confirmCSItem">确认</el-button>
  607. <el-button type="primary" @click="chooseCSModelFlag = false">关闭</el-button>
  608. </el-footer>
  609. </el-dialog>
  610. <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
  611. <!-- 上传文件的modal -->
  612. <changeUploadFile ref="changeUploadFile" @refreshPageTables="getFileData" v-drag></changeUploadFile>
  613. </div>
  614. </template>
  615. <script>
  616. import {
  617. technicalSpecificationSearch, // 获取技术参数卡列表
  618. getDepartmentByUserName, // 根据用户编码获得用户部门
  619. changeRequestSave, // 新增变更申请
  620. getChangeNo, // 获取申请单号
  621. deleteChangeFiles, // 根据变更单号删除文件,
  622. costImpactSave, // 新增库存成本影响
  623. executionSave, // 新增执行信息
  624. getEcnTypeData, // 查询ECN种类数据
  625. getEcnModel, // 查询ECN的模板
  626. getItemList, // 查询模板属性
  627. countersignatureSave, // 新增会签信息
  628. } from "@/api/changeManagement/changeManagement.js"
  629. import ChooseList from '@/views/modules/common/Chooselist'
  630. import {
  631. uploadFile // 文件上传
  632. } from '@/api/oss/oss.js'
  633. import DictDataSelect from '../sys/dict-data-select.vue'
  634. import changeUploadFile from "../base/upload_file.vue"
  635. import dayjs from "dayjs";
  636. export default {
  637. components: {
  638. changeUploadFile,
  639. DictDataSelect,
  640. ChooseList
  641. },
  642. data() {
  643. return {
  644. form: [],
  645. // 导出
  646. exportData: [],
  647. exportName: '工程变更申请' + this.dayjs().format('YYYYMMDDHHmmss'),
  648. exportHeader: ['工程变更申请'],
  649. exportFooter: [],
  650. resultList: [],
  651. // ======== 行高 ========
  652. height: 200,
  653. // ======== 分页 ========
  654. pageIndex: 1,
  655. pageSize: 50,
  656. totalPage: 0,
  657. activeName: 'basicInformation',
  658. tempPartRow: {},
  659. // 条件查询
  660. searchData: {
  661. site: this.$store.state.user.site,
  662. partNo: '',
  663. partDesc: '',
  664. customerId: '',
  665. customerDesc: '',
  666. projectId: '',
  667. projectDesc: '',
  668. codeNo: '',
  669. page: 1,
  670. limit: 10
  671. },
  672. // ======== 数据对象 ========
  673. modalData: {
  674. site: this.$store.state.user.site,
  675. changeNo: '',
  676. applicantId: '',
  677. applicantName: '',
  678. applicationDepartmentId: '',
  679. applicationDepartmentName: '',
  680. applyDate: '',
  681. changeImpact: '',
  682. changeImpactDesc: '',
  683. ecnStage: '',
  684. changeType: '',
  685. tpEngineerId: '',
  686. tpEngineerName: '',
  687. changePhaseInDate: '',
  688. dfIsProduct: '',
  689. printing: '',
  690. manufacturingCostIsChange: '',
  691. changeRequestDesc: '',
  692. isReQuote: '',
  693. ulCertificationRequirements: '',
  694. ulContinueToMeetDemand: '',
  695. gpCertificationRequirements: '',
  696. gpContinueToMeetDemand: '',
  697. createBy: '',
  698. detailList: [],
  699. ecnTypeData: []
  700. },
  701. costImpactData: {
  702. site: this.$store.state.user.site,
  703. changeNo: '',
  704. productionProductFlag: '',
  705. inventoryProductFlag: '',
  706. newOrderFlag: '',
  707. affectedFlag: '',
  708. productionProductNumber: '',
  709. productionProductOpinions: '',
  710. productionProductRemark: '',
  711. productionProductExecutor: '',
  712. productionProductExecutorName: '',
  713. inventoryProductNumber: '',
  714. inventoryProductOpinions: '',
  715. inventoryProductRemark: '',
  716. inventoryProductExecutor: '',
  717. inventoryProductExecutorName: '',
  718. newOrderNumber: '',
  719. affectedNumber: '',
  720. affectedOpinions: '',
  721. affectedRemark: '',
  722. affectedExecutor: '',
  723. affectedExecutorName: '',
  724. changeTotalCost: '',
  725. remark: '',
  726. createBy: '',
  727. updateBy: ''
  728. },
  729. executionInfoData: {
  730. site: this.$store.state.user.site,
  731. changeNo: '',
  732. originalFilmNo: '',
  733. newFilmNo: '',
  734. originalDieCuttingRuleNo: '',
  735. newDieCuttingRuleNo: '',
  736. originalStencilNo: '',
  737. newStencilNo: '',
  738. executionDate: '',
  739. createBy: '',
  740. updateBy: '',
  741. chooseItemList: []
  742. },
  743. countersignatureData: {
  744. site: this.$store.state.user.site,
  745. changeNo: '',
  746. createBy: '',
  747. updateBy: '',
  748. chooseCSItemList: []
  749. },
  750. chooseModelData: {
  751. site: this.$store.state.user.site,
  752. functionType: 'ECN',
  753. itemNo: '',
  754. itemDesc: '',
  755. codeNo: ''
  756. },
  757. chooseCSModelData: {
  758. site: this.$store.state.user.site,
  759. functionType: 'ECN',
  760. itemNo: '',
  761. itemDesc: '',
  762. codeNo: ''
  763. },
  764. // ======== 数据列表 ========
  765. dataList: [],
  766. chooseDataList: [],
  767. fileList: [],
  768. modelList: [],
  769. modelCSList: [],
  770. itemList: [],
  771. itemCSList: [],
  772. chooseItemList: [],
  773. chooseCSItemList: [],
  774. // ======== 列表表头 ========
  775. columnList: [
  776. {
  777. userId: this.$store.state.user.name,
  778. functionId: 108001,
  779. serialNumber: '108001Table1Site',
  780. tableId: '108001Table1',
  781. tableName: '技术参数卡',
  782. columnProp: 'site',
  783. headerAlign: 'center',
  784. align: 'center',
  785. columnLabel: 'Site',
  786. columnHidden: false,
  787. columnImage: false,
  788. status: true,
  789. fixed: '',
  790. columnWidth: 60
  791. },
  792. {
  793. userId: this.$store.state.user.name,
  794. functionId: 108001,
  795. serialNumber: '108001Table1BuNo',
  796. tableId: '108001Table1',
  797. tableName: '技术参数卡',
  798. columnProp: 'buNo',
  799. headerAlign: 'center',
  800. align: 'center',
  801. columnLabel: 'BU',
  802. columnHidden: false,
  803. columnImage: false,
  804. status: true,
  805. fixed: '',
  806. columnWidth: 80
  807. },
  808. {
  809. userId: this.$store.state.user.name,
  810. functionId: 108001,
  811. serialNumber: '108001Table1PartNo',
  812. tableId: '108001Table1',
  813. tableName: '技术参数卡',
  814. columnProp: 'partNo',
  815. headerAlign: 'center',
  816. align: 'center',
  817. columnLabel: '物料编码',
  818. columnHidden: false,
  819. columnImage: false,
  820. status: true,
  821. fixed: '',
  822. columnWidth: 120
  823. },
  824. {
  825. userId: this.$store.state.user.name,
  826. functionId: 108001,
  827. serialNumber: '108001Table1PartDesc',
  828. tableId: '108001Table1',
  829. tableName: '技术参数卡',
  830. columnProp: 'partDesc',
  831. headerAlign: 'center',
  832. align: 'left',
  833. columnLabel: '物料名称',
  834. columnHidden: false,
  835. columnImage: false,
  836. status: true,
  837. fixed: '',
  838. columnWidth: 180
  839. },
  840. {
  841. userId: this.$store.state.user.name,
  842. functionId: 108001,
  843. serialNumber: '108001Table1ProjectId',
  844. tableId: '108001Table1',
  845. tableName: '技术参数卡',
  846. columnProp: 'projectId',
  847. headerAlign: 'center',
  848. align: 'center',
  849. columnLabel: '项目编码',
  850. columnHidden: false,
  851. columnImage: false,
  852. status: true,
  853. fixed: '',
  854. columnWidth: 120
  855. },
  856. {
  857. userId: this.$store.state.user.name,
  858. functionId: 108001,
  859. serialNumber: '108001Table1ProjectDesc',
  860. tableId: '108001Table1',
  861. tableName: '技术参数卡',
  862. columnProp: 'projectDesc',
  863. headerAlign: 'center',
  864. align: 'left',
  865. columnLabel: '项目名称',
  866. columnHidden: false,
  867. columnImage: false,
  868. status: true,
  869. fixed: '',
  870. columnWidth: 180
  871. },
  872. {
  873. userId: this.$store.state.user.name,
  874. functionId: 108001,
  875. serialNumber: '108001Table1CustomerId',
  876. tableId: '108001Table1',
  877. tableName: '技术参数卡',
  878. columnProp: 'customerId',
  879. headerAlign: 'center',
  880. align: 'center',
  881. columnLabel: '客户编码',
  882. columnHidden: false,
  883. columnImage: false,
  884. status: true,
  885. fixed: '',
  886. columnWidth: 120
  887. },
  888. {
  889. userId: this.$store.state.user.name,
  890. functionId: 108001,
  891. serialNumber: '108001Table1CustomerDesc',
  892. tableId: '108001Table1',
  893. tableName: '技术参数卡',
  894. columnProp: 'customerDesc',
  895. headerAlign: 'center',
  896. align: 'left',
  897. columnLabel: '客户名称',
  898. columnHidden: false,
  899. columnImage: false,
  900. status: true,
  901. fixed: '',
  902. columnWidth: 180
  903. },
  904. {
  905. userId: this.$store.state.user.name,
  906. functionId: 108001,
  907. serialNumber: '108001Table1CodeNo',
  908. tableId: '108001Table1',
  909. tableName: '技术参数卡',
  910. columnProp: 'codeNo',
  911. headerAlign: 'center',
  912. align: 'center',
  913. columnLabel: '技术参数卡',
  914. columnHidden: false,
  915. columnImage: false,
  916. status: true,
  917. fixed: '',
  918. columnWidth: 120
  919. },
  920. {
  921. userId: this.$store.state.user.name,
  922. functionId: 108001,
  923. serialNumber: '108001Table1CodeNo',
  924. tableId: '108001Table1',
  925. tableName: '技术参数卡',
  926. columnProp: 'ecnFlag',
  927. headerAlign: 'center',
  928. align: 'center',
  929. columnLabel: '状态',
  930. columnHidden: false,
  931. columnImage: false,
  932. status: true,
  933. fixed: '',
  934. columnWidth: 100
  935. },
  936. {
  937. userId: this.$store.state.user.name,
  938. functionId: 108001,
  939. serialNumber: '108001Table1RevNo',
  940. tableId: '108001Table1',
  941. tableName: '技术参数卡',
  942. columnProp: 'revNo',
  943. headerAlign: 'center',
  944. align: 'center',
  945. columnLabel: '版本号',
  946. columnHidden: false,
  947. columnImage: false,
  948. status: true,
  949. fixed: '',
  950. columnWidth: 80
  951. },
  952. ],
  953. columnChooseDataList: [
  954. {
  955. userId: this.$store.state.user.name,
  956. functionId: 108001,
  957. serialNumber: '108001Table2PartNo',
  958. tableId: '108001Table2',
  959. tableName: '所选变更列表',
  960. columnProp: 'partNo',
  961. headerAlign: 'center',
  962. align: 'center',
  963. columnLabel: '物料编码',
  964. columnHidden: false,
  965. columnImage: false,
  966. status: true,
  967. fixed: '',
  968. columnWidth: 100
  969. },
  970. {
  971. userId: this.$store.state.user.name,
  972. functionId: 108001,
  973. serialNumber: '108001Table2PartDesc',
  974. tableId: '108001Table2',
  975. tableName: '所选变更列表',
  976. columnProp: 'partDesc',
  977. headerAlign: 'center',
  978. align: 'left',
  979. columnLabel: '物料描述',
  980. columnHidden: false,
  981. columnImage: false,
  982. status: true,
  983. fixed: '',
  984. columnWidth: 180
  985. },
  986. {
  987. userId: this.$store.state.user.name,
  988. functionId: 108001,
  989. serialNumber: '108001Table2DrawingNo',
  990. tableId: '108001Table2',
  991. tableName: '所选变更列表',
  992. columnProp: 'drawingNo',
  993. headerAlign: 'center',
  994. align: 'center',
  995. columnLabel: '图纸编码',
  996. columnHidden: false,
  997. columnImage: false,
  998. status: true,
  999. fixed: '',
  1000. columnWidth: 90
  1001. },
  1002. {
  1003. userId: this.$store.state.user.name,
  1004. functionId: 108001,
  1005. serialNumber: '108001Table2DraftNo',
  1006. tableId: '108001Table2',
  1007. tableName: '所选变更列表',
  1008. columnProp: 'draftNo',
  1009. headerAlign: 'center',
  1010. align: 'center',
  1011. columnLabel: '图稿编码',
  1012. columnHidden: false,
  1013. columnImage: false,
  1014. status: true,
  1015. fixed: '',
  1016. columnWidth: 90
  1017. },
  1018. ],
  1019. columnChooseItemList: [
  1020. {
  1021. userId: this.$store.state.user.name,
  1022. functionId: 108001,
  1023. serialNumber: '108001Table3ItemNo',
  1024. tableId: '108001Table3',
  1025. tableName: '执行属性表',
  1026. columnProp: 'itemNo',
  1027. headerAlign: 'center',
  1028. align: 'center',
  1029. columnLabel: '属性编码',
  1030. columnHidden: false,
  1031. columnImage: false,
  1032. status: true,
  1033. fixed: '',
  1034. columnWidth: 80
  1035. },
  1036. {
  1037. userId: this.$store.state.user.name,
  1038. functionId: 108001,
  1039. serialNumber: '108001Table3ItemDesc',
  1040. tableId: '108001Table3',
  1041. tableName: '执行属性表',
  1042. columnProp: 'itemDesc',
  1043. headerAlign: 'center',
  1044. align: 'center',
  1045. columnLabel: '属性名称',
  1046. columnHidden: false,
  1047. columnImage: false,
  1048. status: true,
  1049. fixed: '',
  1050. columnWidth: 150
  1051. },
  1052. {
  1053. userId: this.$store.state.user.name,
  1054. functionId: 108001,
  1055. serialNumber: '108001Table3ExecuteFlag',
  1056. tableId: '108001Table3',
  1057. tableName: '执行属性表',
  1058. columnProp: 'executeFlag',
  1059. headerAlign: 'center',
  1060. align: 'center',
  1061. columnLabel: '是否执行',
  1062. columnHidden: false,
  1063. columnImage: false,
  1064. status: true,
  1065. fixed: '',
  1066. columnWidth: 80
  1067. },
  1068. {
  1069. userId: this.$store.state.user.name,
  1070. functionId: 108001,
  1071. serialNumber: '108001Table3Executor',
  1072. tableId: '108001Table3',
  1073. tableName: '执行属性表',
  1074. columnProp: 'executor',
  1075. headerAlign: 'center',
  1076. align: 'center',
  1077. columnLabel: '执行人',
  1078. columnHidden: false,
  1079. columnImage: false,
  1080. status: true,
  1081. fixed: '',
  1082. columnWidth: 100
  1083. },{
  1084. userId: this.$store.state.user.name,
  1085. functionId: 108001,
  1086. serialNumber: '108001Table3ExecuteDate',
  1087. tableId: '108001Table3',
  1088. tableName: '执行属性表',
  1089. columnProp: 'itemExecutionDate',
  1090. headerAlign: 'center',
  1091. align: 'center',
  1092. columnLabel: '执行时间',
  1093. columnHidden: false,
  1094. columnImage: false,
  1095. status: true,
  1096. fixed: '',
  1097. columnWidth: 150
  1098. },
  1099. ],
  1100. columnChooseCSItemList: [
  1101. {
  1102. userId: this.$store.state.user.name,
  1103. functionId: 108001,
  1104. serialNumber: '108001Table6ItemNo',
  1105. tableId: '108001Table6',
  1106. tableName: '执行属性表',
  1107. columnProp: 'itemNo',
  1108. headerAlign: 'center',
  1109. align: 'center',
  1110. columnLabel: '属性编码',
  1111. columnHidden: false,
  1112. columnImage: false,
  1113. status: true,
  1114. fixed: '',
  1115. columnWidth: 80
  1116. },
  1117. {
  1118. userId: this.$store.state.user.name,
  1119. functionId: 108001,
  1120. serialNumber: '108001Table6ItemDesc',
  1121. tableId: '108001Table6',
  1122. tableName: '执行属性表',
  1123. columnProp: 'itemDesc',
  1124. headerAlign: 'center',
  1125. align: 'center',
  1126. columnLabel: '属性名称',
  1127. columnHidden: false,
  1128. columnImage: false,
  1129. status: true,
  1130. fixed: '',
  1131. columnWidth: 150
  1132. },
  1133. {
  1134. userId: this.$store.state.user.name,
  1135. functionId: 108001,
  1136. serialNumber: '108001Table6ExecuteFlag',
  1137. tableId: '108001Table6',
  1138. tableName: '执行属性表',
  1139. columnProp: 'executeFlag',
  1140. headerAlign: 'center',
  1141. align: 'center',
  1142. columnLabel: '是否执行',
  1143. columnHidden: false,
  1144. columnImage: false,
  1145. status: true,
  1146. fixed: '',
  1147. columnWidth: 80
  1148. },
  1149. {
  1150. userId: this.$store.state.user.name,
  1151. functionId: 108001,
  1152. serialNumber: '108001Table6Executor',
  1153. tableId: '108001Table6',
  1154. tableName: '执行属性表',
  1155. columnProp: 'executor',
  1156. headerAlign: 'center',
  1157. align: 'center',
  1158. columnLabel: '执行人',
  1159. columnHidden: false,
  1160. columnImage: false,
  1161. status: true,
  1162. fixed: '',
  1163. columnWidth: 100
  1164. },{
  1165. userId: this.$store.state.user.name,
  1166. functionId: 108001,
  1167. serialNumber: '108001Table6ExecuteDate',
  1168. tableId: '108001Table6',
  1169. tableName: '执行属性表',
  1170. columnProp: 'itemExecutionDate',
  1171. headerAlign: 'center',
  1172. align: 'center',
  1173. columnLabel: '执行时间',
  1174. columnHidden: false,
  1175. columnImage: false,
  1176. status: true,
  1177. fixed: '',
  1178. columnWidth: 150
  1179. },
  1180. ],
  1181. columnItemList: [
  1182. {
  1183. userId: this.$store.state.user.name,
  1184. functionId: 108001,
  1185. serialNumber: '108001Table4ItemNo',
  1186. tableId: '108001Table4',
  1187. tableName: '执行属性表',
  1188. columnProp: 'itemNo',
  1189. headerAlign: 'center',
  1190. align: 'center',
  1191. columnLabel: '属性编码',
  1192. columnHidden: false,
  1193. columnImage: false,
  1194. status: true,
  1195. fixed: '',
  1196. columnWidth: 80
  1197. },
  1198. {
  1199. userId: this.$store.state.user.name,
  1200. functionId: 108001,
  1201. serialNumber: '108001Table4ItemDesc',
  1202. tableId: '108001Table4',
  1203. tableName: '执行属性表',
  1204. columnProp: 'itemDesc',
  1205. headerAlign: 'center',
  1206. align: 'center',
  1207. columnLabel: '属性名称',
  1208. columnHidden: false,
  1209. columnImage: false,
  1210. status: true,
  1211. fixed: '',
  1212. columnWidth: 150
  1213. },
  1214. ],
  1215. columnCSItemList: [
  1216. {
  1217. userId: this.$store.state.user.name,
  1218. functionId: 108001,
  1219. serialNumber: '108001Table5ItemNo',
  1220. tableId: '108001Table5',
  1221. tableName: '执行属性表',
  1222. columnProp: 'itemNo',
  1223. headerAlign: 'center',
  1224. align: 'center',
  1225. columnLabel: '属性编码',
  1226. columnHidden: false,
  1227. columnImage: false,
  1228. status: true,
  1229. fixed: '',
  1230. columnWidth: 80
  1231. },
  1232. {
  1233. userId: this.$store.state.user.name,
  1234. functionId: 108001,
  1235. serialNumber: '108001Table5ItemDesc',
  1236. tableId: '108001Table5',
  1237. tableName: '执行属性表',
  1238. columnProp: 'itemDesc',
  1239. headerAlign: 'center',
  1240. align: 'center',
  1241. columnLabel: '属性名称',
  1242. columnHidden: false,
  1243. columnImage: false,
  1244. status: true,
  1245. fixed: '',
  1246. columnWidth: 150
  1247. },
  1248. ],
  1249. // ======== 必填规则 ========
  1250. rules: {
  1251. applicantId: [
  1252. {
  1253. required: true,
  1254. message: ' ',
  1255. trigger: ['blur','change']
  1256. }
  1257. ],
  1258. applyDate: [
  1259. {
  1260. required: true,
  1261. message: ' ',
  1262. trigger: ['blur','change']
  1263. }
  1264. ],
  1265. changeImpact: [
  1266. {
  1267. required: true,
  1268. message: ' ',
  1269. trigger: ['blur','change']
  1270. }
  1271. ],
  1272. changeImpactDesc: [
  1273. {
  1274. required: true,
  1275. message: ' ',
  1276. trigger: ['blur','change']
  1277. }
  1278. ],
  1279. ecnStage: [
  1280. {
  1281. required: true,
  1282. message: ' ',
  1283. trigger: ['blur','change']
  1284. }
  1285. ],
  1286. changeType: [
  1287. {
  1288. required: true,
  1289. message: ' ',
  1290. trigger: ['blur','change']
  1291. }
  1292. ],
  1293. tpEngineerId: [
  1294. {
  1295. required: true,
  1296. message: ' ',
  1297. trigger: ['blur','change']
  1298. }
  1299. ],
  1300. changePhaseInDate: [
  1301. {
  1302. required: true,
  1303. message: ' ',
  1304. trigger: ['blur','change']
  1305. }
  1306. ],
  1307. dfIsProduct: [
  1308. {
  1309. required: true,
  1310. message: ' ',
  1311. trigger: ['blur','change']
  1312. }
  1313. ],
  1314. printing: [
  1315. {
  1316. required: true,
  1317. message: ' ',
  1318. trigger: ['blur','change']
  1319. }
  1320. ],
  1321. manufacturingCostIsChange: [
  1322. {
  1323. required: true,
  1324. message: ' ',
  1325. trigger: ['blur','change']
  1326. }
  1327. ],
  1328. changeRequestDesc: [
  1329. {
  1330. required: true,
  1331. message: ' ',
  1332. trigger: ['blur','change']
  1333. }
  1334. ],
  1335. isReQuote: [
  1336. {
  1337. required: true,
  1338. message: ' ',
  1339. trigger: ['blur','change']
  1340. }
  1341. ],
  1342. ulCertificationRequirements: [
  1343. {
  1344. required: true,
  1345. message: ' ',
  1346. trigger: ['blur','change']
  1347. }
  1348. ],
  1349. ulContinueToMeetDemand: [
  1350. {
  1351. required: true,
  1352. message: ' ',
  1353. trigger: ['blur','change']
  1354. }
  1355. ],
  1356. gpCertificationRequirements: [
  1357. {
  1358. required: true,
  1359. message: ' ',
  1360. trigger: ['blur','change']
  1361. }
  1362. ],
  1363. gpContinueToMeetDemand: [
  1364. {
  1365. required: true,
  1366. message: ' ',
  1367. trigger: ['blur','change']
  1368. }
  1369. ],
  1370. },
  1371. // ======== 复选数据集 ========
  1372. dataSelections: [],
  1373. itemSelections: [],
  1374. itemCSSelections: [],
  1375. // ======== 模态框开关控制 ========
  1376. modalFlag: false,
  1377. modalDisableFlag: false,
  1378. EcnTypeModalFlag: false,
  1379. basicInformationFlag: false,
  1380. InventoryCostImpactFlag: false,
  1381. actionInformationFlag: false,
  1382. chooseModelFlag: false,
  1383. chooseCSModelFlag: false,
  1384. CountersignatureFlag: false,
  1385. }
  1386. },
  1387. created () {
  1388. this.getDataList()
  1389. this.getEcnModel()
  1390. this.getEcnCSModel()
  1391. },
  1392. mounted() {
  1393. this.$nextTick(() => {
  1394. this.height = window.innerHeight - 180
  1395. })
  1396. },
  1397. computed:{
  1398. },
  1399. methods: {
  1400. partInput (row, val) {
  1401. row.newPartNo = val.toUpperCase()
  1402. },
  1403. choosePartNo (row) {
  1404. this.tempPartRow = row
  1405. this.getBaseList(133)
  1406. },
  1407. ecnTypeHeaderChange (val,index) {
  1408. if (val === 'Y') {
  1409. for (let i = 0; i < this.form[index].list.length; i++) {
  1410. this.form[index].list[i].flag = 'Y'
  1411. }
  1412. } else {
  1413. for (let i = 0; i < this.form[index].list.length; i++) {
  1414. this.form[index].list[i].flag = 'N'
  1415. }
  1416. }
  1417. },
  1418. ecnTypeDetailChange (val,index) {
  1419. if (this.form[index].list.every(x => x.flag === 'Y')) {
  1420. this.form[index].flag = 'Y'
  1421. }else {
  1422. this.form[index].flag = 'N'
  1423. }
  1424. },
  1425. selectFlag (row) {
  1426. if (row.ecnFlag === '变更中') {
  1427. return false
  1428. } else {
  1429. return true
  1430. }
  1431. },
  1432. //每页数
  1433. sizeChangeHandle (val) {
  1434. this.pageSize = val
  1435. this.pageIndex = 1
  1436. this.getDataList()
  1437. },
  1438. // 当前页
  1439. currentChangeHandle (val) {
  1440. this.pageIndex = val
  1441. this.getDataList()
  1442. },
  1443. // 获取数据列表
  1444. getDataList () {
  1445. this.searchData.limit = this.pageSize
  1446. this.searchData.page = this.pageIndex
  1447. technicalSpecificationSearch(this.searchData).then(({data}) => {
  1448. if (data.code === 0) {
  1449. this.dataList = data.page.list
  1450. this.pageIndex = data.page.currPage
  1451. this.pageSize = data.page.pageSize
  1452. this.totalPage = data.page.totalCount
  1453. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  1454. }
  1455. })
  1456. },
  1457. // 复选物料信息
  1458. selectionData (val) {
  1459. this.dataSelections = val
  1460. this.$refs.selectDiv.setLengthselected(this.dataSelections.length)
  1461. },
  1462. // 页签切换
  1463. refreshCurrentTabTable () {
  1464. },
  1465. // 变更申请模态框
  1466. changeModel () {
  1467. if (this.dataSelections.length === 0) {
  1468. this.$message.warning('请选择要变更的技术参数卡!')
  1469. return
  1470. }
  1471. // 获取申请单号
  1472. let tempData = {
  1473. site: this.$store.state.user.site,
  1474. transType: 'change_no'
  1475. }
  1476. getChangeNo(tempData).then(({data}) => {
  1477. if (data.code === 0) {
  1478. this.modalData = {
  1479. site: this.$store.state.user.site,
  1480. changeNo: data.changeNo,
  1481. applicantId: this.$store.state.user.name,
  1482. applicantName: this.$store.state.user.userDisplay,
  1483. applicationDepartmentId: '',
  1484. applicationDepartmentName: '',
  1485. applyDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1486. changeImpact: 'N',
  1487. changeImpactDesc: '',
  1488. ecnStage: '',
  1489. changeType: '',
  1490. tpEngineerId: '',
  1491. tpEngineerName: '',
  1492. changePhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1493. dfIsProduct: '',
  1494. printing: '',
  1495. manufacturingCostIsChange: '',
  1496. changeRequestDesc: '',
  1497. isReQuote: '',
  1498. ulCertificationRequirements: '',
  1499. ulContinueToMeetDemand: '',
  1500. gpCertificationRequirements: '',
  1501. gpContinueToMeetDemand: '',
  1502. createBy: this.$store.state.user.name,
  1503. detailList: [],
  1504. ecnTypeData: []
  1505. }
  1506. this.costImpactData = {
  1507. site: this.$store.state.user.site,
  1508. changeNo: data.changeNo,
  1509. productionProductFlag: '',
  1510. inventoryProductFlag: '',
  1511. newOrderFlag: '',
  1512. affectedFlag: '',
  1513. productionProductNumber: '',
  1514. productionProductOpinions: '',
  1515. productionProductRemark: '',
  1516. productionProductExecutor: '',
  1517. productionProductExecutorName: '',
  1518. inventoryProductNumber: '',
  1519. inventoryProductOpinions: '',
  1520. inventoryProductRemark: '',
  1521. inventoryProductExecutor: '',
  1522. inventoryProductExecutorName: '',
  1523. newOrderNumber: '',
  1524. affectedNumber: '',
  1525. affectedOpinions: '',
  1526. affectedRemark: '',
  1527. affectedExecutor: '',
  1528. affectedExecutorName: '',
  1529. changeTotalCost: '',
  1530. remark: '',
  1531. createBy: this.$store.state.user.name,
  1532. }
  1533. this.executionInfoData = {
  1534. site: this.$store.state.user.site,
  1535. changeNo: data.changeNo,
  1536. originalFilmNo: '',
  1537. newFilmNo: '',
  1538. originalDieCuttingRuleNo: '',
  1539. newDieCuttingRuleNo: '',
  1540. originalStencilNo: '',
  1541. newStencilNo: '',
  1542. executionDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1543. createBy: this.$store.state.user.name,
  1544. chooseItemList: []
  1545. }
  1546. this.countersignatureData = {
  1547. site: this.$store.state.user.site,
  1548. changeNo: data.changeNo,
  1549. createBy: this.$store.state.user.name,
  1550. chooseCSItemList: []
  1551. }
  1552. this.getDepartmentByUserName()
  1553. this.getEcnTypeData() // 获取ECN种类
  1554. this.chooseDataList = this.dataSelections
  1555. this.activeName = 'basicInformation'
  1556. this.modalFlag = true
  1557. this.modalDisableFlag = false
  1558. this.basicInformationFlag = true
  1559. this.InventoryCostImpactFlag = true
  1560. this.actionInformationFlag = true
  1561. this.CountersignatureFlag = true
  1562. } else {
  1563. this.$alert(data.msg, '错误', {
  1564. confirmButtonText: '确定'
  1565. })
  1566. }
  1567. })
  1568. },
  1569. // 删除变更申请模态框
  1570. closeModalFlag () {
  1571. // deleteChangeFiles(this.modalData).then(({data}) => {
  1572. // if (data && data.code === 0) {
  1573. // this.getDataList()
  1574. // this.modalFlag = false
  1575. // } else {
  1576. // this.$alert(data.msg, '错误', {
  1577. // confirmButtonText: '确定'
  1578. // })
  1579. // }
  1580. // })
  1581. this.modalFlag = false
  1582. },
  1583. // 新增变更申请
  1584. saveData () {
  1585. this.modalData.detailList = this.chooseDataList
  1586. this.modalData.ecnTypeData = this.form
  1587. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  1588. this.$message.warning('请选择申请人员!')
  1589. return
  1590. }
  1591. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  1592. this.$message.warning('请选择申请日期!')
  1593. return
  1594. }
  1595. if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  1596. this.$message.warning('请选择ECN变更影响!')
  1597. return
  1598. }
  1599. if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  1600. this.$message.warning('请填写变更影响描述!')
  1601. return
  1602. }
  1603. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  1604. this.$message.warning('请选择ECN阶段!')
  1605. return
  1606. }
  1607. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  1608. this.$message.warning('请选择变更类别!')
  1609. return
  1610. }
  1611. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  1612. this.$message.warning('请选择TP工程师!')
  1613. return
  1614. }
  1615. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  1616. this.$message.warning('请选择变更生效日期!')
  1617. return
  1618. }
  1619. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  1620. this.$message.warning('请选择是否DF是产品!')
  1621. return
  1622. }
  1623. if (this.modalData.printing === '' || this.modalData.printing == null) {
  1624. this.$message.warning('请选择印刷方式!')
  1625. return
  1626. }
  1627. if (this.modalData.manufacturingCostIsChange === '' || this.modalData.manufacturingCostIsChange == null) {
  1628. this.$message.warning('请选择制造成本是否变更!')
  1629. return
  1630. }
  1631. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  1632. this.$message.warning('请填写变更要求描述!')
  1633. return
  1634. }
  1635. if (this.modalData.isReQuote === '' || this.modalData.isReQuote == null) {
  1636. this.$message.warning('请选择是否重新报价!')
  1637. return
  1638. }
  1639. if (this.modalData.ulCertificationRequirements === '' || this.modalData.ulCertificationRequirements == null) {
  1640. this.$message.warning('请选择原产品是否UL认证要求!')
  1641. return
  1642. }
  1643. if (this.modalData.ulContinueToMeetDemand === '' || this.modalData.ulContinueToMeetDemand == null) {
  1644. this.$message.warning('请选择变更后能否继续满足此需求(UL)!')
  1645. return
  1646. }
  1647. if (this.modalData.gpCertificationRequirements === '' || this.modalData.gpCertificationRequirements == null) {
  1648. this.$message.warning('请选择原产品是否GP要求!')
  1649. return
  1650. }
  1651. if (this.modalData.gpContinueToMeetDemand === '' || this.modalData.gpContinueToMeetDemand == null) {
  1652. this.$message.warning('请选择变更后能否继续满足此需求(GP)!')
  1653. return
  1654. }
  1655. changeRequestSave(this.modalData).then(({data}) => {
  1656. if (data && data.code === 0) {
  1657. for (let i = 0; i <this.fileList.length; i++) {
  1658. uploadFile(this.fileList[i]).then(({data}) => {
  1659. if (data.code !== 0) {
  1660. this.$message.warning(data.msg)
  1661. }
  1662. })
  1663. }
  1664. this.getDataList()
  1665. this.basicInformationFlag = false
  1666. this.$message({
  1667. message: '操作成功',
  1668. type: 'success',
  1669. duration: 1500,
  1670. onClose: () => {}
  1671. })
  1672. } else {
  1673. this.$alert(data.msg, '错误', {
  1674. confirmButtonText: '确定'
  1675. })
  1676. }
  1677. })
  1678. },
  1679. // 新增库存成本影响
  1680. inventoryCostImpactSave () {
  1681. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  1682. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  1683. this.$message.warning('请填写在生产品数量!')
  1684. return
  1685. }
  1686. if (this.costImpactData.productionProductNumber <= 0) {
  1687. this.$message.warning('在生产品数量不能小于等于0!')
  1688. return
  1689. }
  1690. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  1691. this.$message.warning('请填写在生产品处理意见!')
  1692. return
  1693. }
  1694. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  1695. this.$message.warning('请填写在生产品执行人!')
  1696. return
  1697. }
  1698. }
  1699. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  1700. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  1701. this.$message.warning('请填写成品库存数量!')
  1702. return
  1703. }
  1704. if (this.costImpactData.inventoryProductNumber <= 0) {
  1705. this.$message.warning('成品库存数量不能小于等于0!')
  1706. return
  1707. }
  1708. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  1709. this.$message.warning('请填写成品库存处理意见!')
  1710. return
  1711. }
  1712. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  1713. this.$message.warning('请填写成品库存执行人!')
  1714. return
  1715. }
  1716. }
  1717. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  1718. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  1719. this.$message.warning('请填写新订单数量!')
  1720. return
  1721. }
  1722. if (this.costImpactData.newOrderNumber <= 0) {
  1723. this.$message.warning('新订单数量不能小于等于0!')
  1724. return
  1725. }
  1726. }
  1727. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  1728. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  1729. this.$message.warning('请填写影响的原材料及其库存量数量!')
  1730. return
  1731. }
  1732. if (this.costImpactData.affectedNumber <= 0) {
  1733. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  1734. return
  1735. }
  1736. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  1737. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  1738. return
  1739. }
  1740. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  1741. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  1742. return
  1743. }
  1744. }
  1745. if (this.costImpactData.changeTotalCost == null || this.costImpactData.changeTotalCost === '') {
  1746. this.$message.warning('请填写ECN变更总成本!')
  1747. return
  1748. }
  1749. if (this.costImpactData.changeTotalCost <= 0) {
  1750. this.$message.warning('ECN变更总成本不能小于等于0!')
  1751. return
  1752. }
  1753. costImpactSave(this.costImpactData).then(({data}) => {
  1754. if (data && data.code === 0) {
  1755. this.InventoryCostImpactFlag = false
  1756. this.getDataList()
  1757. this.$message({
  1758. message: '操作成功',
  1759. type: 'success',
  1760. duration: 1500,
  1761. onClose: () => {}
  1762. })
  1763. } else {
  1764. this.$alert(data.msg, '错误', {
  1765. confirmButtonText: '确定'
  1766. })
  1767. }
  1768. })
  1769. },
  1770. // 新增执行信息
  1771. executionInformationSave () {
  1772. if (this.chooseItemList.length === 0) {
  1773. this.$message.warning('请选择模板属性!')
  1774. return;
  1775. } else {
  1776. this.executionInfoData.chooseItemList = this.chooseItemList
  1777. }
  1778. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  1779. this.$message.warning('请填写原啤刀编号!')
  1780. return;
  1781. }
  1782. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  1783. this.$message.warning('请填写新啤刀编号!')
  1784. return;
  1785. }
  1786. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  1787. this.$message.warning('请填写原网板/印版编号!')
  1788. return;
  1789. }
  1790. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  1791. this.$message.warning('请填写新网板/印版编号!')
  1792. return;
  1793. }
  1794. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  1795. this.$message.warning('请选择ECN执行日期!')
  1796. return;
  1797. }
  1798. executionSave(this.executionInfoData).then(({data}) => {
  1799. if (data && data.code === 0) {
  1800. this.actionInformationFlag = false
  1801. this.getDataList()
  1802. this.$message({
  1803. message: '操作成功',
  1804. type: 'success',
  1805. duration: 1500,
  1806. onClose: () => {}
  1807. })
  1808. } else {
  1809. this.$alert(data.msg, '错误', {
  1810. confirmButtonText: '确定'
  1811. })
  1812. }
  1813. })
  1814. },
  1815. // 删除所选技术参数卡
  1816. deleteChooseDataModal (row) {
  1817. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  1818. confirmButtonText: '确定',
  1819. cancelButtonText: '取消',
  1820. type: 'warning'
  1821. }).then(() => {
  1822. this.chooseDataList = this.chooseDataList.filter(a => {
  1823. return a.codeNo !== row.codeNo
  1824. })
  1825. })
  1826. },
  1827. // 根据人员编码查人员部门
  1828. getDepartmentByUserName () {
  1829. let tempData = {
  1830. site: this.$store.state.user.site,
  1831. username: this.modalData.applicantId
  1832. }
  1833. getDepartmentByUserName(tempData).then(({data}) => {
  1834. if (data.code === 0) {
  1835. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  1836. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  1837. }
  1838. })
  1839. },
  1840. // 回车换行
  1841. focusNextInput (index, type) {
  1842. let aaa = ''
  1843. if (this.chooseDataList.length - 1 === index) {
  1844. aaa = `${type}0`
  1845. } else {
  1846. aaa = `${type}${index + 1}`
  1847. }
  1848. this.$nextTick(() => {
  1849. this.$refs[aaa].focus()
  1850. })
  1851. },
  1852. // 上传文件
  1853. uploadFileModal () {
  1854. let currentData = {
  1855. titleCon: '工程变更文件上传',
  1856. site: this.modalData.site,
  1857. createBy: this.$store.state.user.name,
  1858. dataNo: this.modalData.changeNo,
  1859. fileRemark: '',
  1860. folder: 'change',
  1861. }
  1862. //打开组件 去做新增业务
  1863. this.$nextTick(() => {
  1864. this.$refs.changeUploadFile.init(currentData)
  1865. })
  1866. },
  1867. // 得到保存的文件对象
  1868. getFileData (fData) {
  1869. const formData = new FormData()
  1870. // 片接文件
  1871. formData.append("file", fData.file)
  1872. formData.append("orderRef1", fData.site)
  1873. formData.append("orderRef2", fData.dataNo)
  1874. formData.append("fileRemark", fData.fileRemark)
  1875. formData.append("folder", fData.folder)
  1876. this.fileList.push(formData)
  1877. },
  1878. // 选择ECN种类模态框
  1879. chooseEcnTypeModal () {
  1880. this.EcnTypeModalFlag = true
  1881. },
  1882. // 查询ECN种类数据
  1883. getEcnTypeData () {
  1884. let tempData = {
  1885. site: this.$store.state.user.site
  1886. }
  1887. getEcnTypeData(tempData).then(({data}) => {
  1888. if (data.code === 0) {
  1889. this.form = data.rows
  1890. }
  1891. })
  1892. },
  1893. // 保存ECN种类
  1894. saveEcnTypeData () {
  1895. this.$message({
  1896. message: '操作成功',
  1897. type: 'success',
  1898. duration: 1500,
  1899. onClose: () => {}
  1900. })
  1901. this.EcnTypeModalFlag = false
  1902. },
  1903. // 选择模板属性
  1904. chooseModel () {
  1905. this.chooseModelData = {
  1906. site: this.$store.state.user.site,
  1907. itemNo: '',
  1908. itemDesc: '',
  1909. functionType: 'ECN',
  1910. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  1911. }
  1912. // 先清空缓存选中
  1913. this.$nextTick(() => this.$refs.itemTable.clearSelection())
  1914. // 查询所有部门
  1915. getItemList(this.chooseModelData).then(({data}) => {
  1916. if (data && data.code === 0) {
  1917. this.itemList = data.rows
  1918. this.itemList.forEach(val => {
  1919. // 回显选中的部门
  1920. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  1921. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  1922. }
  1923. })
  1924. } else {
  1925. this.$alert(data.msg, '错误', {
  1926. confirmButtonText: '确定'
  1927. })
  1928. }
  1929. })
  1930. this.chooseModelFlag = true
  1931. },
  1932. // 查询属性
  1933. searchItemList () {
  1934. getItemList(this.chooseModelData).then(({data}) => {
  1935. if (data.code === 0) {
  1936. this.itemList = data.rows
  1937. }
  1938. })
  1939. },
  1940. // 单机选择
  1941. itemClickRow (row) {
  1942. this.$refs.itemTable.toggleRowSelection(row)
  1943. },
  1944. // 复选属性
  1945. selectionItem (val) {
  1946. this.itemSelections = val
  1947. },
  1948. // 确认多选属性
  1949. confirmItem () {
  1950. if (this.itemSelections.length === 0) {
  1951. this.$message.warning("请勾选属性!")
  1952. return
  1953. }
  1954. this.chooseItemList = this.itemSelections
  1955. this.chooseModelFlag = false
  1956. },
  1957. // 执行所选属性
  1958. executeModal (row) {
  1959. row.executeFlag = 'Y'
  1960. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  1961. row.executor = this.$store.state.user.name
  1962. },
  1963. // 查询ECN的模板
  1964. getEcnModel () {
  1965. let tempData = {
  1966. site: this.$store.state.user.site,
  1967. functionType: 'ECN'
  1968. }
  1969. getEcnModel(tempData).then(({data}) => {
  1970. if (data.code === 0) {
  1971. this.modelList = data.rows
  1972. }
  1973. })
  1974. },
  1975. // ===================================
  1976. // 查询会签的模板
  1977. getEcnCSModel () {
  1978. let tempData = {
  1979. site: this.$store.state.user.site,
  1980. functionType: 'ECN'
  1981. }
  1982. getEcnModel(tempData).then(({data}) => {
  1983. if (data.code === 0) {
  1984. this.modelCSList = data.rows
  1985. }
  1986. })
  1987. },
  1988. // 选择会签模板属性
  1989. chooseCSModel () {
  1990. this.chooseCSModelData = {
  1991. site: this.$store.state.user.site,
  1992. itemNo: '',
  1993. itemDesc: '',
  1994. functionType: 'ECN',
  1995. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  1996. }
  1997. // 先清空缓存选中
  1998. this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  1999. // 查询所有属性
  2000. getItemList(this.chooseCSModelData).then(({data}) => {
  2001. if (data && data.code === 0) {
  2002. this.itemCSList = data.rows
  2003. this.itemCSList.forEach(val => {
  2004. // 回显选中的部门
  2005. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2006. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  2007. }
  2008. })
  2009. } else {
  2010. this.$alert(data.msg, '错误', {
  2011. confirmButtonText: '确定'
  2012. })
  2013. }
  2014. })
  2015. this.chooseCSModelFlag = true
  2016. },
  2017. // 查询CS属性
  2018. searchCSItemList () {
  2019. getItemList(this.chooseCSModelData).then(({data}) => {
  2020. if (data.code === 0) {
  2021. this.itemCSList = data.rows
  2022. }
  2023. })
  2024. },
  2025. // 单击选择
  2026. itemCSClickRow (row) {
  2027. this.$refs.itemCSTable.toggleRowSelection(row)
  2028. },
  2029. // 复选CS属性
  2030. selectionCSItem (val) {
  2031. this.itemCSSelections = val
  2032. },
  2033. // 确认多选CS属性
  2034. confirmCSItem () {
  2035. if (this.itemCSSelections.length === 0) {
  2036. this.$message.warning("请勾选属性!")
  2037. return
  2038. }
  2039. this.chooseCSItemList = this.itemCSSelections
  2040. this.chooseCSModelFlag = false
  2041. },
  2042. // 执行所选属性
  2043. executeCSModal (row) {
  2044. row.executeFlag = 'Y'
  2045. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  2046. row.executor = this.$store.state.user.name
  2047. },
  2048. // 新增会签信息
  2049. countersignatureSave () {
  2050. if (this.chooseCSItemList.length === 0) {
  2051. this.$message.warning('请选择模板属性!')
  2052. return;
  2053. } else {
  2054. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2055. }
  2056. countersignatureSave(this.countersignatureData).then(({data}) => {
  2057. if (data && data.code === 0) {
  2058. this.CountersignatureFlag = false
  2059. this.getDataList()
  2060. this.$message({
  2061. message: '操作成功',
  2062. type: 'success',
  2063. duration: 1500,
  2064. onClose: () => {}
  2065. })
  2066. } else {
  2067. this.$alert(data.msg, '错误', {
  2068. confirmButtonText: '确定'
  2069. })
  2070. }
  2071. })
  2072. },
  2073. // 获取基础数据列表S
  2074. getBaseList (val, type) {
  2075. this.tagNo = val
  2076. this.tagNo1 = type
  2077. this.$nextTick(() => {
  2078. let strVal = ''
  2079. if (val === 103) {
  2080. if (type === 1) {
  2081. strVal = this.modalData.applicantId
  2082. } else if (type === 2) {
  2083. strVal = this.modalData.tpEngineerId
  2084. } else if (type === 3) {
  2085. if (this.costImpactData.productionProductFlag !== 'Y') {
  2086. return
  2087. } else {
  2088. strVal = this.costImpactData.productionProductExecutor
  2089. }
  2090. } else if (type === 4) {
  2091. if (this.costImpactData.inventoryProductFlag !== 'Y') {
  2092. return
  2093. } else {
  2094. strVal = this.costImpactData.inventoryProductExecutor
  2095. }
  2096. } else if (type === 5) {
  2097. if (this.costImpactData.affectedFlag !== 'Y') {
  2098. return
  2099. } else {
  2100. strVal = this.costImpactData.affectedExecutor
  2101. }
  2102. }
  2103. }
  2104. if (val === 133) {
  2105. strVal = this.tempPartRow.newPartNo
  2106. }
  2107. this.$refs.baseList.init(val, strVal)
  2108. })
  2109. },
  2110. // 列表方法的回调
  2111. getBaseData (val) {
  2112. if (this.tagNo === 103) {
  2113. if (this.tagNo1 === 1) {
  2114. this.modalData.applicantId = val.username
  2115. this.modalData.applicantName = val.user_display
  2116. this.getDepartmentByUserName()
  2117. } else if (this.tagNo1 === 2) {
  2118. this.modalData.tpEngineerId = val.username
  2119. this.modalData.tpEngineerName = val.user_display
  2120. } else if (this.tagNo1 === 3) {
  2121. this.costImpactData.productionProductExecutor = val.username
  2122. this.costImpactData.productionProductExecutorName = val.user_display
  2123. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  2124. } else if (this.tagNo1 === 4) {
  2125. this.costImpactData.inventoryProductExecutor = val.username
  2126. this.costImpactData.inventoryProductExecutorName = val.user_display
  2127. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  2128. } else if (this.tagNo1 === 5) {
  2129. this.costImpactData.affectedExecutor = val.username
  2130. this.costImpactData.affectedExecutorName = val.user_display
  2131. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  2132. }
  2133. }
  2134. if (this.tagNo === 133) {
  2135. //this.tempPartRow.newPartNo = val.part_no
  2136. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  2137. }
  2138. },
  2139. // ======== 导出相关方法 ========
  2140. /**
  2141. * 导出excel
  2142. */
  2143. async createExportData () {
  2144. this.searchData.limit = -1
  2145. this.searchData.page = 1
  2146. await technicalSpecificationSearch(this.searchData).then(({data}) => {
  2147. this.resultList = data.page.list
  2148. })
  2149. return this.resultList
  2150. },
  2151. startDownload () {},
  2152. finishDownload () {},
  2153. fields () {
  2154. let json = '{'
  2155. this.columnList.forEach((item, index) => {
  2156. if (index == this.columnList.length - 1) {
  2157. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2158. } else {
  2159. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2160. }
  2161. })
  2162. json += '}'
  2163. let s = eval('(' + json + ')')
  2164. return s
  2165. }
  2166. }
  2167. }
  2168. </script>
  2169. <style scoped lang="scss">
  2170. .numInput /deep/ .el-input__inner{
  2171. text-align: right;
  2172. }
  2173. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  2174. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  2175. -webkit-appearance: none;
  2176. }
  2177. /deep/ .inlineNumber input[type="number"]{
  2178. -moz-appearance: textfield;
  2179. padding-right: 5px !important;
  2180. }
  2181. </style>