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.

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