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.

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