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.

3007 lines
122 KiB

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