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.

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