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.

2251 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
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 :title="changeTitle" :close-on-click-modal="false" top="10vh" 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. changeTitle: '',
  660. // 条件查询
  661. searchData: {
  662. site: this.$store.state.user.site,
  663. partNo: '',
  664. partDesc: '',
  665. customerId: '',
  666. customerDesc: '',
  667. projectId: '',
  668. projectDesc: '',
  669. codeNo: '',
  670. page: 1,
  671. limit: 10
  672. },
  673. // ======== 数据对象 ========
  674. modalData: {
  675. site: this.$store.state.user.site,
  676. changeNo: '',
  677. applicantId: '',
  678. applicantName: '',
  679. applicationDepartmentId: '',
  680. applicationDepartmentName: '',
  681. applyDate: '',
  682. changeImpact: '',
  683. changeImpactDesc: '',
  684. ecnStage: '',
  685. changeType: '',
  686. tpEngineerId: '',
  687. tpEngineerName: '',
  688. changePhaseInDate: '',
  689. dfIsProduct: '',
  690. printing: '',
  691. manufacturingCostIsChange: '',
  692. changeRequestDesc: '',
  693. isReQuote: '',
  694. ulCertificationRequirements: '',
  695. ulContinueToMeetDemand: '',
  696. gpCertificationRequirements: '',
  697. gpContinueToMeetDemand: '',
  698. createBy: '',
  699. detailList: [],
  700. ecnTypeData: []
  701. },
  702. costImpactData: {
  703. site: this.$store.state.user.site,
  704. changeNo: '',
  705. productionProductFlag: '',
  706. inventoryProductFlag: '',
  707. newOrderFlag: '',
  708. affectedFlag: '',
  709. productionProductNumber: '',
  710. productionProductOpinions: '',
  711. productionProductRemark: '',
  712. productionProductExecutor: '',
  713. productionProductExecutorName: '',
  714. inventoryProductNumber: '',
  715. inventoryProductOpinions: '',
  716. inventoryProductRemark: '',
  717. inventoryProductExecutor: '',
  718. inventoryProductExecutorName: '',
  719. newOrderNumber: '',
  720. affectedNumber: '',
  721. affectedOpinions: '',
  722. affectedRemark: '',
  723. affectedExecutor: '',
  724. affectedExecutorName: '',
  725. changeTotalCost: '',
  726. remark: '',
  727. createBy: '',
  728. updateBy: ''
  729. },
  730. executionInfoData: {
  731. site: this.$store.state.user.site,
  732. changeNo: '',
  733. originalFilmNo: '',
  734. newFilmNo: '',
  735. originalDieCuttingRuleNo: '',
  736. newDieCuttingRuleNo: '',
  737. originalStencilNo: '',
  738. newStencilNo: '',
  739. executionDate: '',
  740. createBy: '',
  741. updateBy: '',
  742. chooseItemList: []
  743. },
  744. countersignatureData: {
  745. site: this.$store.state.user.site,
  746. changeNo: '',
  747. createBy: '',
  748. updateBy: '',
  749. chooseCSItemList: []
  750. },
  751. chooseModelData: {
  752. site: this.$store.state.user.site,
  753. functionType: 'ECN',
  754. itemNo: '',
  755. itemDesc: '',
  756. codeNo: ''
  757. },
  758. chooseCSModelData: {
  759. site: this.$store.state.user.site,
  760. functionType: 'ECN',
  761. itemNo: '',
  762. itemDesc: '',
  763. codeNo: ''
  764. },
  765. // ======== 数据列表 ========
  766. dataList: [],
  767. chooseDataList: [],
  768. fileList: [],
  769. modelList: [],
  770. modelCSList: [],
  771. itemList: [],
  772. itemCSList: [],
  773. chooseItemList: [],
  774. chooseCSItemList: [],
  775. // ======== 列表表头 ========
  776. columnList: [
  777. {
  778. userId: this.$store.state.user.name,
  779. functionId: 108001,
  780. serialNumber: '108001Table1Site',
  781. tableId: '108001Table1',
  782. tableName: '技术参数卡',
  783. columnProp: 'site',
  784. headerAlign: 'center',
  785. align: 'center',
  786. columnLabel: 'Site',
  787. columnHidden: false,
  788. columnImage: false,
  789. status: true,
  790. fixed: '',
  791. columnWidth: 60
  792. },
  793. {
  794. userId: this.$store.state.user.name,
  795. functionId: 108001,
  796. serialNumber: '108001Table1BuNo',
  797. tableId: '108001Table1',
  798. tableName: '技术参数卡',
  799. columnProp: 'buNo',
  800. headerAlign: 'center',
  801. align: 'center',
  802. columnLabel: 'BU',
  803. columnHidden: false,
  804. columnImage: false,
  805. status: true,
  806. fixed: '',
  807. columnWidth: 80
  808. },
  809. {
  810. userId: this.$store.state.user.name,
  811. functionId: 108001,
  812. serialNumber: '108001Table1PartNo',
  813. tableId: '108001Table1',
  814. tableName: '技术参数卡',
  815. columnProp: 'partNo',
  816. headerAlign: 'center',
  817. align: 'center',
  818. columnLabel: '物料编码',
  819. columnHidden: false,
  820. columnImage: false,
  821. status: true,
  822. fixed: '',
  823. columnWidth: 120
  824. },
  825. {
  826. userId: this.$store.state.user.name,
  827. functionId: 108001,
  828. serialNumber: '108001Table1PartDesc',
  829. tableId: '108001Table1',
  830. tableName: '技术参数卡',
  831. columnProp: 'partDesc',
  832. headerAlign: 'center',
  833. align: 'left',
  834. columnLabel: '物料名称',
  835. columnHidden: false,
  836. columnImage: false,
  837. status: true,
  838. fixed: '',
  839. columnWidth: 180
  840. },
  841. {
  842. userId: this.$store.state.user.name,
  843. functionId: 108001,
  844. serialNumber: '108001Table1ProjectId',
  845. tableId: '108001Table1',
  846. tableName: '技术参数卡',
  847. columnProp: 'projectId',
  848. headerAlign: 'center',
  849. align: 'center',
  850. columnLabel: '项目编码',
  851. columnHidden: false,
  852. columnImage: false,
  853. status: true,
  854. fixed: '',
  855. columnWidth: 120
  856. },
  857. {
  858. userId: this.$store.state.user.name,
  859. functionId: 108001,
  860. serialNumber: '108001Table1ProjectDesc',
  861. tableId: '108001Table1',
  862. tableName: '技术参数卡',
  863. columnProp: 'projectDesc',
  864. headerAlign: 'center',
  865. align: 'left',
  866. columnLabel: '项目名称',
  867. columnHidden: false,
  868. columnImage: false,
  869. status: true,
  870. fixed: '',
  871. columnWidth: 180
  872. },
  873. {
  874. userId: this.$store.state.user.name,
  875. functionId: 108001,
  876. serialNumber: '108001Table1CustomerId',
  877. tableId: '108001Table1',
  878. tableName: '技术参数卡',
  879. columnProp: 'customerId',
  880. headerAlign: 'center',
  881. align: 'center',
  882. columnLabel: '客户编码',
  883. columnHidden: false,
  884. columnImage: false,
  885. status: true,
  886. fixed: '',
  887. columnWidth: 120
  888. },
  889. {
  890. userId: this.$store.state.user.name,
  891. functionId: 108001,
  892. serialNumber: '108001Table1CustomerDesc',
  893. tableId: '108001Table1',
  894. tableName: '技术参数卡',
  895. columnProp: 'customerDesc',
  896. headerAlign: 'center',
  897. align: 'left',
  898. columnLabel: '客户名称',
  899. columnHidden: false,
  900. columnImage: false,
  901. status: true,
  902. fixed: '',
  903. columnWidth: 180
  904. },
  905. {
  906. userId: this.$store.state.user.name,
  907. functionId: 108001,
  908. serialNumber: '108001Table1CodeNo',
  909. tableId: '108001Table1',
  910. tableName: '技术参数卡',
  911. columnProp: 'codeNo',
  912. headerAlign: 'center',
  913. align: 'center',
  914. columnLabel: '技术参数卡',
  915. columnHidden: false,
  916. columnImage: false,
  917. status: true,
  918. fixed: '',
  919. columnWidth: 120
  920. },
  921. {
  922. userId: this.$store.state.user.name,
  923. functionId: 108001,
  924. serialNumber: '108001Table1CodeNo',
  925. tableId: '108001Table1',
  926. tableName: '技术参数卡',
  927. columnProp: 'ecnFlag',
  928. headerAlign: 'center',
  929. align: 'center',
  930. columnLabel: '状态',
  931. columnHidden: false,
  932. columnImage: false,
  933. status: true,
  934. fixed: '',
  935. columnWidth: 100
  936. },
  937. {
  938. userId: this.$store.state.user.name,
  939. functionId: 108001,
  940. serialNumber: '108001Table1RevNo',
  941. tableId: '108001Table1',
  942. tableName: '技术参数卡',
  943. columnProp: 'revNo',
  944. headerAlign: 'center',
  945. align: 'center',
  946. columnLabel: '版本号',
  947. columnHidden: false,
  948. columnImage: false,
  949. status: true,
  950. fixed: '',
  951. columnWidth: 80
  952. },
  953. ],
  954. columnChooseDataList: [
  955. {
  956. userId: this.$store.state.user.name,
  957. functionId: 108001,
  958. serialNumber: '108001Table2PartNo',
  959. tableId: '108001Table2',
  960. tableName: '所选变更列表',
  961. columnProp: 'partNo',
  962. headerAlign: 'center',
  963. align: 'center',
  964. columnLabel: '物料编码',
  965. columnHidden: false,
  966. columnImage: false,
  967. status: true,
  968. fixed: '',
  969. columnWidth: 100
  970. },
  971. {
  972. userId: this.$store.state.user.name,
  973. functionId: 108001,
  974. serialNumber: '108001Table2PartDesc',
  975. tableId: '108001Table2',
  976. tableName: '所选变更列表',
  977. columnProp: 'partDesc',
  978. headerAlign: 'center',
  979. align: 'left',
  980. columnLabel: '物料描述',
  981. columnHidden: false,
  982. columnImage: false,
  983. status: true,
  984. fixed: '',
  985. columnWidth: 180
  986. },
  987. {
  988. userId: this.$store.state.user.name,
  989. functionId: 108001,
  990. serialNumber: '108001Table2DrawingNo',
  991. tableId: '108001Table2',
  992. tableName: '所选变更列表',
  993. columnProp: 'drawingNo',
  994. headerAlign: 'center',
  995. align: 'center',
  996. columnLabel: '图纸编码',
  997. columnHidden: false,
  998. columnImage: false,
  999. status: true,
  1000. fixed: '',
  1001. columnWidth: 90
  1002. },
  1003. {
  1004. userId: this.$store.state.user.name,
  1005. functionId: 108001,
  1006. serialNumber: '108001Table2DraftNo',
  1007. tableId: '108001Table2',
  1008. tableName: '所选变更列表',
  1009. columnProp: 'draftNo',
  1010. headerAlign: 'center',
  1011. align: 'center',
  1012. columnLabel: '图稿编码',
  1013. columnHidden: false,
  1014. columnImage: false,
  1015. status: true,
  1016. fixed: '',
  1017. columnWidth: 90
  1018. },
  1019. ],
  1020. columnChooseItemList: [
  1021. {
  1022. userId: this.$store.state.user.name,
  1023. functionId: 108001,
  1024. serialNumber: '108001Table3ItemNo',
  1025. tableId: '108001Table3',
  1026. tableName: '执行属性表',
  1027. columnProp: 'itemNo',
  1028. headerAlign: 'center',
  1029. align: 'center',
  1030. columnLabel: '属性编码',
  1031. columnHidden: false,
  1032. columnImage: false,
  1033. status: true,
  1034. fixed: '',
  1035. columnWidth: 80
  1036. },
  1037. {
  1038. userId: this.$store.state.user.name,
  1039. functionId: 108001,
  1040. serialNumber: '108001Table3ItemDesc',
  1041. tableId: '108001Table3',
  1042. tableName: '执行属性表',
  1043. columnProp: 'itemDesc',
  1044. headerAlign: 'center',
  1045. align: 'center',
  1046. columnLabel: '属性名称',
  1047. columnHidden: false,
  1048. columnImage: false,
  1049. status: true,
  1050. fixed: '',
  1051. columnWidth: 150
  1052. },
  1053. {
  1054. userId: this.$store.state.user.name,
  1055. functionId: 108001,
  1056. serialNumber: '108001Table3ExecuteFlag',
  1057. tableId: '108001Table3',
  1058. tableName: '执行属性表',
  1059. columnProp: 'executeFlag',
  1060. headerAlign: 'center',
  1061. align: 'center',
  1062. columnLabel: '是否执行',
  1063. columnHidden: false,
  1064. columnImage: false,
  1065. status: true,
  1066. fixed: '',
  1067. columnWidth: 80
  1068. },
  1069. {
  1070. userId: this.$store.state.user.name,
  1071. functionId: 108001,
  1072. serialNumber: '108001Table3Executor',
  1073. tableId: '108001Table3',
  1074. tableName: '执行属性表',
  1075. columnProp: 'executor',
  1076. headerAlign: 'center',
  1077. align: 'center',
  1078. columnLabel: '执行人',
  1079. columnHidden: false,
  1080. columnImage: false,
  1081. status: true,
  1082. fixed: '',
  1083. columnWidth: 100
  1084. },{
  1085. userId: this.$store.state.user.name,
  1086. functionId: 108001,
  1087. serialNumber: '108001Table3ExecuteDate',
  1088. tableId: '108001Table3',
  1089. tableName: '执行属性表',
  1090. columnProp: 'itemExecutionDate',
  1091. headerAlign: 'center',
  1092. align: 'center',
  1093. columnLabel: '执行时间',
  1094. columnHidden: false,
  1095. columnImage: false,
  1096. status: true,
  1097. fixed: '',
  1098. columnWidth: 150
  1099. },
  1100. ],
  1101. columnChooseCSItemList: [
  1102. {
  1103. userId: this.$store.state.user.name,
  1104. functionId: 108001,
  1105. serialNumber: '108001Table6ItemNo',
  1106. tableId: '108001Table6',
  1107. tableName: '执行属性表',
  1108. columnProp: 'itemNo',
  1109. headerAlign: 'center',
  1110. align: 'center',
  1111. columnLabel: '属性编码',
  1112. columnHidden: false,
  1113. columnImage: false,
  1114. status: true,
  1115. fixed: '',
  1116. columnWidth: 80
  1117. },
  1118. {
  1119. userId: this.$store.state.user.name,
  1120. functionId: 108001,
  1121. serialNumber: '108001Table6ItemDesc',
  1122. tableId: '108001Table6',
  1123. tableName: '执行属性表',
  1124. columnProp: 'itemDesc',
  1125. headerAlign: 'center',
  1126. align: 'center',
  1127. columnLabel: '属性名称',
  1128. columnHidden: false,
  1129. columnImage: false,
  1130. status: true,
  1131. fixed: '',
  1132. columnWidth: 150
  1133. },
  1134. {
  1135. userId: this.$store.state.user.name,
  1136. functionId: 108001,
  1137. serialNumber: '108001Table6ExecuteFlag',
  1138. tableId: '108001Table6',
  1139. tableName: '执行属性表',
  1140. columnProp: 'executeFlag',
  1141. headerAlign: 'center',
  1142. align: 'center',
  1143. columnLabel: '是否执行',
  1144. columnHidden: false,
  1145. columnImage: false,
  1146. status: true,
  1147. fixed: '',
  1148. columnWidth: 80
  1149. },
  1150. {
  1151. userId: this.$store.state.user.name,
  1152. functionId: 108001,
  1153. serialNumber: '108001Table6Executor',
  1154. tableId: '108001Table6',
  1155. tableName: '执行属性表',
  1156. columnProp: 'executor',
  1157. headerAlign: 'center',
  1158. align: 'center',
  1159. columnLabel: '执行人',
  1160. columnHidden: false,
  1161. columnImage: false,
  1162. status: true,
  1163. fixed: '',
  1164. columnWidth: 100
  1165. },{
  1166. userId: this.$store.state.user.name,
  1167. functionId: 108001,
  1168. serialNumber: '108001Table6ExecuteDate',
  1169. tableId: '108001Table6',
  1170. tableName: '执行属性表',
  1171. columnProp: 'itemExecutionDate',
  1172. headerAlign: 'center',
  1173. align: 'center',
  1174. columnLabel: '执行时间',
  1175. columnHidden: false,
  1176. columnImage: false,
  1177. status: true,
  1178. fixed: '',
  1179. columnWidth: 150
  1180. },
  1181. ],
  1182. columnItemList: [
  1183. {
  1184. userId: this.$store.state.user.name,
  1185. functionId: 108001,
  1186. serialNumber: '108001Table4ItemNo',
  1187. tableId: '108001Table4',
  1188. tableName: '执行属性表',
  1189. columnProp: 'itemNo',
  1190. headerAlign: 'center',
  1191. align: 'center',
  1192. columnLabel: '属性编码',
  1193. columnHidden: false,
  1194. columnImage: false,
  1195. status: true,
  1196. fixed: '',
  1197. columnWidth: 80
  1198. },
  1199. {
  1200. userId: this.$store.state.user.name,
  1201. functionId: 108001,
  1202. serialNumber: '108001Table4ItemDesc',
  1203. tableId: '108001Table4',
  1204. tableName: '执行属性表',
  1205. columnProp: 'itemDesc',
  1206. headerAlign: 'center',
  1207. align: 'center',
  1208. columnLabel: '属性名称',
  1209. columnHidden: false,
  1210. columnImage: false,
  1211. status: true,
  1212. fixed: '',
  1213. columnWidth: 150
  1214. },
  1215. ],
  1216. columnCSItemList: [
  1217. {
  1218. userId: this.$store.state.user.name,
  1219. functionId: 108001,
  1220. serialNumber: '108001Table5ItemNo',
  1221. tableId: '108001Table5',
  1222. tableName: '执行属性表',
  1223. columnProp: 'itemNo',
  1224. headerAlign: 'center',
  1225. align: 'center',
  1226. columnLabel: '属性编码',
  1227. columnHidden: false,
  1228. columnImage: false,
  1229. status: true,
  1230. fixed: '',
  1231. columnWidth: 80
  1232. },
  1233. {
  1234. userId: this.$store.state.user.name,
  1235. functionId: 108001,
  1236. serialNumber: '108001Table5ItemDesc',
  1237. tableId: '108001Table5',
  1238. tableName: '执行属性表',
  1239. columnProp: 'itemDesc',
  1240. headerAlign: 'center',
  1241. align: 'center',
  1242. columnLabel: '属性名称',
  1243. columnHidden: false,
  1244. columnImage: false,
  1245. status: true,
  1246. fixed: '',
  1247. columnWidth: 150
  1248. },
  1249. ],
  1250. // ======== 必填规则 ========
  1251. rules: {
  1252. applicantId: [
  1253. {
  1254. required: true,
  1255. message: ' ',
  1256. trigger: ['blur','change']
  1257. }
  1258. ],
  1259. applyDate: [
  1260. {
  1261. required: true,
  1262. message: ' ',
  1263. trigger: ['blur','change']
  1264. }
  1265. ],
  1266. changeImpact: [
  1267. {
  1268. required: true,
  1269. message: ' ',
  1270. trigger: ['blur','change']
  1271. }
  1272. ],
  1273. changeImpactDesc: [
  1274. {
  1275. required: true,
  1276. message: ' ',
  1277. trigger: ['blur','change']
  1278. }
  1279. ],
  1280. ecnStage: [
  1281. {
  1282. required: true,
  1283. message: ' ',
  1284. trigger: ['blur','change']
  1285. }
  1286. ],
  1287. changeType: [
  1288. {
  1289. required: true,
  1290. message: ' ',
  1291. trigger: ['blur','change']
  1292. }
  1293. ],
  1294. tpEngineerId: [
  1295. {
  1296. required: true,
  1297. message: ' ',
  1298. trigger: ['blur','change']
  1299. }
  1300. ],
  1301. changePhaseInDate: [
  1302. {
  1303. required: true,
  1304. message: ' ',
  1305. trigger: ['blur','change']
  1306. }
  1307. ],
  1308. dfIsProduct: [
  1309. {
  1310. required: true,
  1311. message: ' ',
  1312. trigger: ['blur','change']
  1313. }
  1314. ],
  1315. printing: [
  1316. {
  1317. required: true,
  1318. message: ' ',
  1319. trigger: ['blur','change']
  1320. }
  1321. ],
  1322. manufacturingCostIsChange: [
  1323. {
  1324. required: true,
  1325. message: ' ',
  1326. trigger: ['blur','change']
  1327. }
  1328. ],
  1329. changeRequestDesc: [
  1330. {
  1331. required: true,
  1332. message: ' ',
  1333. trigger: ['blur','change']
  1334. }
  1335. ],
  1336. isReQuote: [
  1337. {
  1338. required: true,
  1339. message: ' ',
  1340. trigger: ['blur','change']
  1341. }
  1342. ],
  1343. ulCertificationRequirements: [
  1344. {
  1345. required: true,
  1346. message: ' ',
  1347. trigger: ['blur','change']
  1348. }
  1349. ],
  1350. ulContinueToMeetDemand: [
  1351. {
  1352. required: true,
  1353. message: ' ',
  1354. trigger: ['blur','change']
  1355. }
  1356. ],
  1357. gpCertificationRequirements: [
  1358. {
  1359. required: true,
  1360. message: ' ',
  1361. trigger: ['blur','change']
  1362. }
  1363. ],
  1364. gpContinueToMeetDemand: [
  1365. {
  1366. required: true,
  1367. message: ' ',
  1368. trigger: ['blur','change']
  1369. }
  1370. ],
  1371. },
  1372. // ======== 复选数据集 ========
  1373. dataSelections: [],
  1374. itemSelections: [],
  1375. itemCSSelections: [],
  1376. // ======== 模态框开关控制 ========
  1377. modalFlag: false,
  1378. modalDisableFlag: false,
  1379. EcnTypeModalFlag: false,
  1380. basicInformationFlag: false,
  1381. InventoryCostImpactFlag: false,
  1382. actionInformationFlag: false,
  1383. chooseModelFlag: false,
  1384. chooseCSModelFlag: false,
  1385. CountersignatureFlag: false,
  1386. }
  1387. },
  1388. created () {
  1389. this.getDataList()
  1390. this.getEcnModel()
  1391. this.getEcnCSModel()
  1392. },
  1393. mounted() {
  1394. this.$nextTick(() => {
  1395. this.height = window.innerHeight - 180
  1396. })
  1397. },
  1398. computed:{
  1399. },
  1400. methods: {
  1401. partInput (row, val) {
  1402. row.newPartNo = val.toUpperCase()
  1403. },
  1404. choosePartNo (row) {
  1405. this.tempPartRow = row
  1406. this.getBaseList(133)
  1407. },
  1408. ecnTypeHeaderChange (val,index) {
  1409. if (val === 'Y') {
  1410. for (let i = 0; i < this.form[index].list.length; i++) {
  1411. this.form[index].list[i].flag = 'Y'
  1412. }
  1413. } else {
  1414. for (let i = 0; i < this.form[index].list.length; i++) {
  1415. this.form[index].list[i].flag = 'N'
  1416. }
  1417. }
  1418. },
  1419. ecnTypeDetailChange (val,index) {
  1420. if (this.form[index].list.every(x => x.flag === 'Y')) {
  1421. this.form[index].flag = 'Y'
  1422. }else {
  1423. this.form[index].flag = 'N'
  1424. }
  1425. },
  1426. selectFlag (row) {
  1427. if (row.ecnFlag === '变更中') {
  1428. return false
  1429. } else {
  1430. return true
  1431. }
  1432. },
  1433. //每页数
  1434. sizeChangeHandle (val) {
  1435. this.pageSize = val
  1436. this.pageIndex = 1
  1437. this.getDataList()
  1438. },
  1439. // 当前页
  1440. currentChangeHandle (val) {
  1441. this.pageIndex = val
  1442. this.getDataList()
  1443. },
  1444. // 获取数据列表
  1445. getDataList () {
  1446. this.searchData.limit = this.pageSize
  1447. this.searchData.page = this.pageIndex
  1448. technicalSpecificationSearch(this.searchData).then(({data}) => {
  1449. if (data.code === 0) {
  1450. this.dataList = data.page.list
  1451. this.pageIndex = data.page.currPage
  1452. this.pageSize = data.page.pageSize
  1453. this.totalPage = data.page.totalCount
  1454. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  1455. }
  1456. })
  1457. },
  1458. // 复选物料信息
  1459. selectionData (val) {
  1460. this.dataSelections = val
  1461. this.$refs.selectDiv.setLengthselected(this.dataSelections.length)
  1462. },
  1463. // 页签切换
  1464. refreshCurrentTabTable () {
  1465. },
  1466. // 变更申请模态框
  1467. changeModel () {
  1468. if (this.dataSelections.length === 0) {
  1469. this.$message.warning('请选择要变更的技术参数卡!')
  1470. return
  1471. }
  1472. // 获取申请单号
  1473. let tempData = {
  1474. site: this.$store.state.user.site,
  1475. transType: 'change_no'
  1476. }
  1477. getChangeNo(tempData).then(({data}) => {
  1478. if (data.code === 0) {
  1479. this.modalData = {
  1480. site: this.$store.state.user.site,
  1481. changeNo: data.changeNo,
  1482. applicantId: this.$store.state.user.name,
  1483. applicantName: this.$store.state.user.userDisplay,
  1484. applicationDepartmentId: '',
  1485. applicationDepartmentName: '',
  1486. applyDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1487. changeImpact: 'N',
  1488. changeImpactDesc: '',
  1489. ecnStage: '',
  1490. changeType: '',
  1491. tpEngineerId: '',
  1492. tpEngineerName: '',
  1493. changePhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1494. dfIsProduct: '',
  1495. printing: '',
  1496. manufacturingCostIsChange: '',
  1497. changeRequestDesc: '',
  1498. isReQuote: '',
  1499. ulCertificationRequirements: '',
  1500. ulContinueToMeetDemand: '',
  1501. gpCertificationRequirements: '',
  1502. gpContinueToMeetDemand: '',
  1503. createBy: this.$store.state.user.name,
  1504. detailList: [],
  1505. ecnTypeData: []
  1506. }
  1507. this.changeTitle = '变更申请-' + this.modalData.changeNo
  1508. this.costImpactData = {
  1509. site: this.$store.state.user.site,
  1510. changeNo: data.changeNo,
  1511. productionProductFlag: '',
  1512. inventoryProductFlag: '',
  1513. newOrderFlag: '',
  1514. affectedFlag: '',
  1515. productionProductNumber: '',
  1516. productionProductOpinions: '',
  1517. productionProductRemark: '',
  1518. productionProductExecutor: '',
  1519. productionProductExecutorName: '',
  1520. inventoryProductNumber: '',
  1521. inventoryProductOpinions: '',
  1522. inventoryProductRemark: '',
  1523. inventoryProductExecutor: '',
  1524. inventoryProductExecutorName: '',
  1525. newOrderNumber: '',
  1526. affectedNumber: '',
  1527. affectedOpinions: '',
  1528. affectedRemark: '',
  1529. affectedExecutor: '',
  1530. affectedExecutorName: '',
  1531. changeTotalCost: '',
  1532. remark: '',
  1533. createBy: this.$store.state.user.name,
  1534. }
  1535. this.executionInfoData = {
  1536. site: this.$store.state.user.site,
  1537. changeNo: data.changeNo,
  1538. originalFilmNo: '',
  1539. newFilmNo: '',
  1540. originalDieCuttingRuleNo: '',
  1541. newDieCuttingRuleNo: '',
  1542. originalStencilNo: '',
  1543. newStencilNo: '',
  1544. executionDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  1545. createBy: this.$store.state.user.name,
  1546. chooseItemList: []
  1547. }
  1548. this.countersignatureData = {
  1549. site: this.$store.state.user.site,
  1550. changeNo: data.changeNo,
  1551. createBy: this.$store.state.user.name,
  1552. chooseCSItemList: []
  1553. }
  1554. this.getDepartmentByUserName()
  1555. this.getEcnTypeData() // 获取ECN种类
  1556. this.chooseDataList = this.dataSelections
  1557. this.activeName = 'basicInformation'
  1558. this.modalFlag = true
  1559. this.modalDisableFlag = false
  1560. this.basicInformationFlag = true
  1561. this.InventoryCostImpactFlag = true
  1562. this.actionInformationFlag = true
  1563. this.CountersignatureFlag = true
  1564. } else {
  1565. this.$alert(data.msg, '错误', {
  1566. confirmButtonText: '确定'
  1567. })
  1568. }
  1569. })
  1570. },
  1571. // 删除变更申请模态框
  1572. closeModalFlag () {
  1573. // deleteChangeFiles(this.modalData).then(({data}) => {
  1574. // if (data && data.code === 0) {
  1575. // this.getDataList()
  1576. // this.modalFlag = false
  1577. // } else {
  1578. // this.$alert(data.msg, '错误', {
  1579. // confirmButtonText: '确定'
  1580. // })
  1581. // }
  1582. // })
  1583. this.modalFlag = false
  1584. },
  1585. // 新增变更申请
  1586. saveData () {
  1587. this.modalData.detailList = this.chooseDataList
  1588. this.modalData.ecnTypeData = this.form
  1589. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  1590. this.$message.warning('请选择申请人员!')
  1591. return
  1592. }
  1593. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  1594. this.$message.warning('请选择申请日期!')
  1595. return
  1596. }
  1597. if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  1598. this.$message.warning('请选择ECN变更影响!')
  1599. return
  1600. }
  1601. if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  1602. this.$message.warning('请填写变更影响描述!')
  1603. return
  1604. }
  1605. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  1606. this.$message.warning('请选择ECN阶段!')
  1607. return
  1608. }
  1609. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  1610. this.$message.warning('请选择变更类别!')
  1611. return
  1612. }
  1613. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  1614. this.$message.warning('请选择TP工程师!')
  1615. return
  1616. }
  1617. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  1618. this.$message.warning('请选择变更生效日期!')
  1619. return
  1620. }
  1621. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  1622. this.$message.warning('请选择是否DF是产品!')
  1623. return
  1624. }
  1625. if (this.modalData.printing === '' || this.modalData.printing == null) {
  1626. this.$message.warning('请选择印刷方式!')
  1627. return
  1628. }
  1629. if (this.modalData.manufacturingCostIsChange === '' || this.modalData.manufacturingCostIsChange == null) {
  1630. this.$message.warning('请选择制造成本是否变更!')
  1631. return
  1632. }
  1633. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  1634. this.$message.warning('请填写变更要求描述!')
  1635. return
  1636. }
  1637. if (this.modalData.isReQuote === '' || this.modalData.isReQuote == null) {
  1638. this.$message.warning('请选择是否重新报价!')
  1639. return
  1640. }
  1641. if (this.modalData.ulCertificationRequirements === '' || this.modalData.ulCertificationRequirements == null) {
  1642. this.$message.warning('请选择原产品是否UL认证要求!')
  1643. return
  1644. }
  1645. if (this.modalData.ulContinueToMeetDemand === '' || this.modalData.ulContinueToMeetDemand == null) {
  1646. this.$message.warning('请选择变更后能否继续满足此需求(UL)!')
  1647. return
  1648. }
  1649. if (this.modalData.gpCertificationRequirements === '' || this.modalData.gpCertificationRequirements == null) {
  1650. this.$message.warning('请选择原产品是否GP要求!')
  1651. return
  1652. }
  1653. if (this.modalData.gpContinueToMeetDemand === '' || this.modalData.gpContinueToMeetDemand == null) {
  1654. this.$message.warning('请选择变更后能否继续满足此需求(GP)!')
  1655. return
  1656. }
  1657. changeRequestSave(this.modalData).then(({data}) => {
  1658. if (data && data.code === 0) {
  1659. for (let i = 0; i <this.fileList.length; i++) {
  1660. uploadFile(this.fileList[i]).then(({data}) => {
  1661. if (data.code !== 0) {
  1662. this.$message.warning(data.msg)
  1663. }
  1664. })
  1665. }
  1666. this.getDataList()
  1667. this.basicInformationFlag = false
  1668. this.$message({
  1669. message: '操作成功',
  1670. type: 'success',
  1671. duration: 1500,
  1672. onClose: () => {}
  1673. })
  1674. } else {
  1675. this.$alert(data.msg, '错误', {
  1676. confirmButtonText: '确定'
  1677. })
  1678. }
  1679. })
  1680. },
  1681. // 新增库存成本影响
  1682. inventoryCostImpactSave () {
  1683. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  1684. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  1685. this.$message.warning('请填写在生产品数量!')
  1686. return
  1687. }
  1688. if (this.costImpactData.productionProductNumber <= 0) {
  1689. this.$message.warning('在生产品数量不能小于等于0!')
  1690. return
  1691. }
  1692. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  1693. this.$message.warning('请填写在生产品处理意见!')
  1694. return
  1695. }
  1696. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  1697. this.$message.warning('请填写在生产品执行人!')
  1698. return
  1699. }
  1700. }
  1701. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  1702. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  1703. this.$message.warning('请填写成品库存数量!')
  1704. return
  1705. }
  1706. if (this.costImpactData.inventoryProductNumber <= 0) {
  1707. this.$message.warning('成品库存数量不能小于等于0!')
  1708. return
  1709. }
  1710. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  1711. this.$message.warning('请填写成品库存处理意见!')
  1712. return
  1713. }
  1714. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  1715. this.$message.warning('请填写成品库存执行人!')
  1716. return
  1717. }
  1718. }
  1719. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  1720. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  1721. this.$message.warning('请填写新订单数量!')
  1722. return
  1723. }
  1724. if (this.costImpactData.newOrderNumber <= 0) {
  1725. this.$message.warning('新订单数量不能小于等于0!')
  1726. return
  1727. }
  1728. }
  1729. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  1730. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  1731. this.$message.warning('请填写影响的原材料及其库存量数量!')
  1732. return
  1733. }
  1734. if (this.costImpactData.affectedNumber <= 0) {
  1735. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  1736. return
  1737. }
  1738. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  1739. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  1740. return
  1741. }
  1742. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  1743. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  1744. return
  1745. }
  1746. }
  1747. if (this.costImpactData.changeTotalCost == null || this.costImpactData.changeTotalCost === '') {
  1748. this.$message.warning('请填写ECN变更总成本!')
  1749. return
  1750. }
  1751. if (this.costImpactData.changeTotalCost <= 0) {
  1752. this.$message.warning('ECN变更总成本不能小于等于0!')
  1753. return
  1754. }
  1755. costImpactSave(this.costImpactData).then(({data}) => {
  1756. if (data && data.code === 0) {
  1757. this.InventoryCostImpactFlag = false
  1758. this.getDataList()
  1759. this.$message({
  1760. message: '操作成功',
  1761. type: 'success',
  1762. duration: 1500,
  1763. onClose: () => {}
  1764. })
  1765. } else {
  1766. this.$alert(data.msg, '错误', {
  1767. confirmButtonText: '确定'
  1768. })
  1769. }
  1770. })
  1771. },
  1772. // 新增执行信息
  1773. executionInformationSave () {
  1774. if (this.chooseItemList.length === 0) {
  1775. this.$message.warning('请选择模板属性!')
  1776. return;
  1777. } else {
  1778. this.executionInfoData.chooseItemList = this.chooseItemList
  1779. }
  1780. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  1781. this.$message.warning('请填写原啤刀编号!')
  1782. return;
  1783. }
  1784. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  1785. this.$message.warning('请填写新啤刀编号!')
  1786. return;
  1787. }
  1788. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  1789. this.$message.warning('请填写原网板/印版编号!')
  1790. return;
  1791. }
  1792. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  1793. this.$message.warning('请填写新网板/印版编号!')
  1794. return;
  1795. }
  1796. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  1797. this.$message.warning('请选择ECN执行日期!')
  1798. return;
  1799. }
  1800. executionSave(this.executionInfoData).then(({data}) => {
  1801. if (data && data.code === 0) {
  1802. this.actionInformationFlag = false
  1803. this.getDataList()
  1804. this.$message({
  1805. message: '操作成功',
  1806. type: 'success',
  1807. duration: 1500,
  1808. onClose: () => {}
  1809. })
  1810. } else {
  1811. this.$alert(data.msg, '错误', {
  1812. confirmButtonText: '确定'
  1813. })
  1814. }
  1815. })
  1816. },
  1817. // 删除所选技术参数卡
  1818. deleteChooseDataModal (row) {
  1819. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  1820. confirmButtonText: '确定',
  1821. cancelButtonText: '取消',
  1822. type: 'warning'
  1823. }).then(() => {
  1824. this.chooseDataList = this.chooseDataList.filter(a => {
  1825. return a.codeNo !== row.codeNo
  1826. })
  1827. })
  1828. },
  1829. // 根据人员编码查人员部门
  1830. getDepartmentByUserName () {
  1831. let tempData = {
  1832. site: this.$store.state.user.site,
  1833. username: this.modalData.applicantId
  1834. }
  1835. getDepartmentByUserName(tempData).then(({data}) => {
  1836. if (data.code === 0) {
  1837. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  1838. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  1839. }
  1840. })
  1841. },
  1842. // 回车换行
  1843. focusNextInput (index, type) {
  1844. let aaa = ''
  1845. if (this.chooseDataList.length - 1 === index) {
  1846. aaa = `${type}0`
  1847. } else {
  1848. aaa = `${type}${index + 1}`
  1849. }
  1850. this.$nextTick(() => {
  1851. this.$refs[aaa].focus()
  1852. })
  1853. },
  1854. // 上传文件
  1855. uploadFileModal () {
  1856. let currentData = {
  1857. titleCon: '工程变更文件上传',
  1858. site: this.modalData.site,
  1859. createBy: this.$store.state.user.name,
  1860. dataNo: this.modalData.changeNo,
  1861. fileRemark: '',
  1862. folder: 'change',
  1863. }
  1864. //打开组件 去做新增业务
  1865. this.$nextTick(() => {
  1866. this.$refs.changeUploadFile.init(currentData)
  1867. })
  1868. },
  1869. // 得到保存的文件对象
  1870. getFileData (fData) {
  1871. const formData = new FormData()
  1872. // 片接文件
  1873. formData.append("file", fData.file)
  1874. formData.append("orderRef1", fData.site)
  1875. formData.append("orderRef2", fData.dataNo)
  1876. formData.append("fileRemark", fData.fileRemark)
  1877. formData.append("folder", fData.folder)
  1878. this.fileList.push(formData)
  1879. },
  1880. // 选择ECN种类模态框
  1881. chooseEcnTypeModal () {
  1882. this.EcnTypeModalFlag = true
  1883. },
  1884. // 查询ECN种类数据
  1885. getEcnTypeData () {
  1886. let tempData = {
  1887. site: this.$store.state.user.site
  1888. }
  1889. getEcnTypeData(tempData).then(({data}) => {
  1890. if (data.code === 0) {
  1891. this.form = data.rows
  1892. }
  1893. })
  1894. },
  1895. // 保存ECN种类
  1896. saveEcnTypeData () {
  1897. this.$message({
  1898. message: '操作成功',
  1899. type: 'success',
  1900. duration: 1500,
  1901. onClose: () => {}
  1902. })
  1903. this.EcnTypeModalFlag = false
  1904. },
  1905. // 选择模板属性
  1906. chooseModel () {
  1907. this.chooseModelData = {
  1908. site: this.$store.state.user.site,
  1909. itemNo: '',
  1910. itemDesc: '',
  1911. functionType: 'ECN',
  1912. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  1913. }
  1914. // 先清空缓存选中
  1915. this.$nextTick(() => this.$refs.itemTable.clearSelection())
  1916. // 查询所有部门
  1917. getItemList(this.chooseModelData).then(({data}) => {
  1918. if (data && data.code === 0) {
  1919. this.itemList = data.rows
  1920. this.itemList.forEach(val => {
  1921. // 回显选中的部门
  1922. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  1923. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  1924. }
  1925. })
  1926. } else {
  1927. this.$alert(data.msg, '错误', {
  1928. confirmButtonText: '确定'
  1929. })
  1930. }
  1931. })
  1932. this.chooseModelFlag = true
  1933. },
  1934. // 查询属性
  1935. searchItemList () {
  1936. getItemList(this.chooseModelData).then(({data}) => {
  1937. if (data.code === 0) {
  1938. this.itemList = data.rows
  1939. }
  1940. })
  1941. },
  1942. // 单机选择
  1943. itemClickRow (row) {
  1944. this.$refs.itemTable.toggleRowSelection(row)
  1945. },
  1946. // 复选属性
  1947. selectionItem (val) {
  1948. this.itemSelections = val
  1949. },
  1950. // 确认多选属性
  1951. confirmItem () {
  1952. if (this.itemSelections.length === 0) {
  1953. this.$message.warning("请勾选属性!")
  1954. return
  1955. }
  1956. this.chooseItemList = this.itemSelections
  1957. this.chooseModelFlag = false
  1958. },
  1959. // 执行所选属性
  1960. executeModal (row) {
  1961. row.executeFlag = 'Y'
  1962. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  1963. row.executor = this.$store.state.user.name
  1964. },
  1965. // 查询ECN的模板
  1966. getEcnModel () {
  1967. let tempData = {
  1968. site: this.$store.state.user.site,
  1969. functionType: 'ECN'
  1970. }
  1971. getEcnModel(tempData).then(({data}) => {
  1972. if (data.code === 0) {
  1973. this.modelList = data.rows
  1974. }
  1975. })
  1976. },
  1977. // ===================================
  1978. // 查询会签的模板
  1979. getEcnCSModel () {
  1980. let tempData = {
  1981. site: this.$store.state.user.site,
  1982. functionType: 'ECN'
  1983. }
  1984. getEcnModel(tempData).then(({data}) => {
  1985. if (data.code === 0) {
  1986. this.modelCSList = data.rows
  1987. }
  1988. })
  1989. },
  1990. // 选择会签模板属性
  1991. chooseCSModel () {
  1992. this.chooseCSModelData = {
  1993. site: this.$store.state.user.site,
  1994. itemNo: '',
  1995. itemDesc: '',
  1996. functionType: 'ECN',
  1997. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  1998. }
  1999. // 先清空缓存选中
  2000. this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  2001. // 查询所有属性
  2002. getItemList(this.chooseCSModelData).then(({data}) => {
  2003. if (data && data.code === 0) {
  2004. this.itemCSList = data.rows
  2005. this.itemCSList.forEach(val => {
  2006. // 回显选中的部门
  2007. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2008. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  2009. }
  2010. })
  2011. } else {
  2012. this.$alert(data.msg, '错误', {
  2013. confirmButtonText: '确定'
  2014. })
  2015. }
  2016. })
  2017. this.chooseCSModelFlag = true
  2018. },
  2019. // 查询CS属性
  2020. searchCSItemList () {
  2021. getItemList(this.chooseCSModelData).then(({data}) => {
  2022. if (data.code === 0) {
  2023. this.itemCSList = data.rows
  2024. }
  2025. })
  2026. },
  2027. // 单击选择
  2028. itemCSClickRow (row) {
  2029. this.$refs.itemCSTable.toggleRowSelection(row)
  2030. },
  2031. // 复选CS属性
  2032. selectionCSItem (val) {
  2033. this.itemCSSelections = val
  2034. },
  2035. // 确认多选CS属性
  2036. confirmCSItem () {
  2037. if (this.itemCSSelections.length === 0) {
  2038. this.$message.warning("请勾选属性!")
  2039. return
  2040. }
  2041. this.chooseCSItemList = this.itemCSSelections
  2042. this.chooseCSModelFlag = false
  2043. },
  2044. // 执行所选属性
  2045. executeCSModal (row) {
  2046. row.executeFlag = 'Y'
  2047. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  2048. row.executor = this.$store.state.user.name
  2049. },
  2050. // 新增会签信息
  2051. countersignatureSave () {
  2052. if (this.chooseCSItemList.length === 0) {
  2053. this.$message.warning('请选择模板属性!')
  2054. return;
  2055. } else {
  2056. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2057. }
  2058. countersignatureSave(this.countersignatureData).then(({data}) => {
  2059. if (data && data.code === 0) {
  2060. this.CountersignatureFlag = false
  2061. this.getDataList()
  2062. this.$message({
  2063. message: '操作成功',
  2064. type: 'success',
  2065. duration: 1500,
  2066. onClose: () => {}
  2067. })
  2068. } else {
  2069. this.$alert(data.msg, '错误', {
  2070. confirmButtonText: '确定'
  2071. })
  2072. }
  2073. })
  2074. },
  2075. // 获取基础数据列表S
  2076. getBaseList (val, type) {
  2077. this.tagNo = val
  2078. this.tagNo1 = type
  2079. this.$nextTick(() => {
  2080. let strVal = ''
  2081. if (val === 103) {
  2082. if (type === 1) {
  2083. strVal = this.modalData.applicantId
  2084. } else if (type === 2) {
  2085. strVal = this.modalData.tpEngineerId
  2086. } else if (type === 3) {
  2087. if (this.costImpactData.productionProductFlag !== 'Y') {
  2088. return
  2089. } else {
  2090. strVal = this.costImpactData.productionProductExecutor
  2091. }
  2092. } else if (type === 4) {
  2093. if (this.costImpactData.inventoryProductFlag !== 'Y') {
  2094. return
  2095. } else {
  2096. strVal = this.costImpactData.inventoryProductExecutor
  2097. }
  2098. } else if (type === 5) {
  2099. if (this.costImpactData.affectedFlag !== 'Y') {
  2100. return
  2101. } else {
  2102. strVal = this.costImpactData.affectedExecutor
  2103. }
  2104. }
  2105. }
  2106. if (val === 133) {
  2107. strVal = this.tempPartRow.newPartNo
  2108. }
  2109. this.$refs.baseList.init(val, strVal)
  2110. })
  2111. },
  2112. // 列表方法的回调
  2113. getBaseData (val) {
  2114. if (this.tagNo === 103) {
  2115. if (this.tagNo1 === 1) {
  2116. this.modalData.applicantId = val.username
  2117. this.modalData.applicantName = val.user_display
  2118. this.getDepartmentByUserName()
  2119. } else if (this.tagNo1 === 2) {
  2120. this.modalData.tpEngineerId = val.username
  2121. this.modalData.tpEngineerName = val.user_display
  2122. } else if (this.tagNo1 === 3) {
  2123. this.costImpactData.productionProductExecutor = val.username
  2124. this.costImpactData.productionProductExecutorName = val.user_display
  2125. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  2126. } else if (this.tagNo1 === 4) {
  2127. this.costImpactData.inventoryProductExecutor = val.username
  2128. this.costImpactData.inventoryProductExecutorName = val.user_display
  2129. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  2130. } else if (this.tagNo1 === 5) {
  2131. this.costImpactData.affectedExecutor = val.username
  2132. this.costImpactData.affectedExecutorName = val.user_display
  2133. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  2134. }
  2135. }
  2136. if (this.tagNo === 133) {
  2137. //this.tempPartRow.newPartNo = val.part_no
  2138. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  2139. }
  2140. },
  2141. // ======== 导出相关方法 ========
  2142. /**
  2143. * 导出excel
  2144. */
  2145. async createExportData () {
  2146. this.searchData.limit = -1
  2147. this.searchData.page = 1
  2148. await technicalSpecificationSearch(this.searchData).then(({data}) => {
  2149. this.resultList = data.page.list
  2150. })
  2151. return this.resultList
  2152. },
  2153. startDownload () {},
  2154. finishDownload () {},
  2155. fields () {
  2156. let json = '{'
  2157. this.columnList.forEach((item, index) => {
  2158. if (index == this.columnList.length - 1) {
  2159. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  2160. } else {
  2161. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  2162. }
  2163. })
  2164. json += '}'
  2165. let s = eval('(' + json + ')')
  2166. return s
  2167. }
  2168. }
  2169. }
  2170. </script>
  2171. <style scoped lang="scss">
  2172. .numInput /deep/ .el-input__inner{
  2173. text-align: right;
  2174. }
  2175. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  2176. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  2177. -webkit-appearance: none;
  2178. }
  2179. /deep/ .inlineNumber input[type="number"]{
  2180. -moz-appearance: textfield;
  2181. padding-right: 5px !important;
  2182. }
  2183. </style>