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.

3201 lines
131 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('applicantId') === '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('applicantId') === '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('applyDate') === '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('changeImpact') === '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('changeImpactDesc') === '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('ecnStage') === '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('changeType') === '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('ecnType') === '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('ecnType') === '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('tpEngineerId') === '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('tpEngineerId') === '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('changePhaseInDate') === '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('dfIsProduct') === '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('industrialEngineerId') === '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('industrialEngineerId') === '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('cqcOperatorId') === '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('cqcOperatorId') === '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('faiOperatorId') === '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('faiOperatorId') === '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('changeRequestDesc') === '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('newPartNo') === '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('newPartNo') === '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('newDrawingNo') === '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('newDraftNo') === '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('productionProductFlag') === '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('productionProductNumber') === '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('productionProductOpinions') === '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('productionProductScrapAmount') === '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('productionProductExecutor') === '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('productionProductExecutor') === '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('inventoryProductFlag') === '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('inventoryProductNumber') === '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('inventoryProductOpinions') === '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('inventoryProductScrapAmount') === '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('inventoryProductExecutor') === '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('inventoryProductExecutor') === '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('newOrderFlag') === '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('newOrderNumber') === '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('affectedFlag') === '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('affectedNumber') === '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('affectedOpinions') === '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('affectedScrapAmount') === '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('affectedExecutor') === '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('affectedExecutor') === '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="saveData">保存</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('chooseValue') === '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('itemRemark') === '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('originalFilmNo') === 'N'" v-model="executionInfoData.originalFilmNo" style="width: 230px"></el-input>
  426. </el-form-item>
  427. <el-form-item label="原啤刀编号">
  428. <el-input :disabled="changeExecutionInfoFlag('originalDieCuttingRuleNo') === 'N'" v-model="executionInfoData.originalDieCuttingRuleNo" style="width: 230px"></el-input>
  429. </el-form-item>
  430. <el-form-item label="原网板/印版编号">
  431. <el-input :disabled="changeExecutionInfoFlag('originalStencilNo') === '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('executionDate') === '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('newFilmNo') === 'N'" v-model="executionInfoData.newFilmNo" style="width: 230px"></el-input>
  440. </el-form-item>
  441. <el-form-item label="新啤刀编号">
  442. <el-input :disabled="changeExecutionInfoFlag('newDieCuttingRuleNo') === 'N'" v-model="executionInfoData.newDieCuttingRuleNo" style="width: 230px"></el-input>
  443. </el-form-item>
  444. <el-form-item label="新网板/印版编号">
  445. <el-input :disabled="changeExecutionInfoFlag('newStencilNo') === '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('itemRemark') === '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="saveData">保存</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('itemRemark') === '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="saveData">保存</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. if (!this.plmChangeRequestArr){
  883. return 'N'
  884. }
  885. let arr = this.plmChangeRequestArr.filter(a => a.fieldId === value)
  886. if (arr.length > 0) {
  887. return arr[0].updateFlag
  888. }
  889. return 'N'
  890. }
  891. },
  892. changeRequestDetailFlag () {
  893. return (value) => {
  894. if (!this.plmChangeRequestDetailArr){
  895. return 'N'
  896. }
  897. let arr = this.plmChangeRequestDetailArr.filter(a => a.fieldId === value)
  898. if (arr.length > 0) {
  899. return arr[0].updateFlag
  900. }
  901. return 'N'
  902. }
  903. },
  904. changeCostImpactFlag () {
  905. return (value) => {
  906. if (!this.plmChangeCostImpactArr){
  907. return 'N'
  908. }
  909. let arr = this.plmChangeCostImpactArr.filter(a => a.fieldId === value)
  910. if (arr.length > 0) {
  911. return arr[0].updateFlag
  912. }
  913. return 'N'
  914. }
  915. },
  916. changeFAItemFlag () {
  917. return (value) => {
  918. if (!this.plmChangeFAItemArr){
  919. return 'N'
  920. }
  921. let arr = this.plmChangeFAItemArr.filter(a => a.fieldId === value)
  922. if (arr.length > 0) {
  923. return arr[0].updateFlag
  924. }
  925. return 'N'
  926. }
  927. },
  928. changeExecutionInfoFlag () {
  929. return (value) => {
  930. if (!this.plmChangeExecutionInfoArr){
  931. return 'N'
  932. }
  933. let arr = this.plmChangeExecutionInfoArr.filter(a => a.fieldId === value)
  934. if (arr.length > 0) {
  935. return arr[0].updateFlag
  936. }
  937. return 'N'
  938. }
  939. },
  940. changeItemFlag () {
  941. return (value) => {
  942. if (!this.plmChangeItemArr){
  943. return 'N'
  944. }
  945. let arr = this.plmChangeItemArr.filter(a => a.fieldId === value)
  946. if (arr.length > 0) {
  947. return arr[0].updateFlag
  948. }
  949. return 'N'
  950. }
  951. },
  952. changeCountersignatureItemFlag () {
  953. return (value) => {
  954. if (!this.plmChangeCountersignatureItemArr){
  955. return 'N'
  956. }
  957. let arr = this.plmChangeCountersignatureItemArr.filter(a => a.fieldId === value)
  958. if (arr.length > 0) {
  959. return arr[0].updateFlag
  960. }
  961. return 'N'
  962. }
  963. },
  964. },
  965. watch: {
  966. modalData: {
  967. deep: true,
  968. handler: function (newV, oldV) {
  969. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  970. this.modalData.tpEngineerName = ''
  971. }
  972. if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
  973. this.modalData.industrialEngineerName = ''
  974. }
  975. if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
  976. this.modalData.cqcOperatorName = ''
  977. }
  978. if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
  979. this.modalData.faiOperatorName = ''
  980. }
  981. }
  982. },
  983. uploadDialog (newValue,oldValue) {
  984. if (newValue === false) {
  985. this.getChangeFileList()
  986. }
  987. },
  988. },
  989. data () {
  990. return {
  991. // 导出
  992. exportData: [],
  993. exportName: '工程变更记录' + this.dayjs().format('YYYYMMDDHHmmss'),
  994. exportHeader: ['工程变更记录'],
  995. exportFooter: [],
  996. resultList: [],
  997. // ======== 行高 ========
  998. height: 200,
  999. secondHeight: 200,
  1000. // ======== 分页 ========
  1001. pageIndex: 1,
  1002. pageSize: 50,
  1003. totalPage: 0,
  1004. // 条件查询
  1005. searchData: {
  1006. site: this.$store.state.user.site,
  1007. changeNo: '',
  1008. menuId: this.$route.meta.menuId,
  1009. page: 1,
  1010. limit: 10
  1011. },
  1012. // 初始页签
  1013. activeTable: 'basicInformation',
  1014. activeName: 'basicInformation',
  1015. tempPartRow: {},
  1016. tempExecutorRow: {},
  1017. changeTitle: '',
  1018. plmChangeRequestArr: [],
  1019. plmChangeRequestDetailArr: [],
  1020. plmChangeCostImpactArr: [],
  1021. plmChangeFAItemArr: [],
  1022. plmChangeExecutionInfoArr: [],
  1023. plmChangeItemArr: [],
  1024. plmChangeCountersignatureItemArr: [],
  1025. // ======== 数据对象 ========
  1026. modalData: {
  1027. site: this.$store.state.user.site,
  1028. changeNo: '',
  1029. applicantId: '',
  1030. applicantName: '',
  1031. applicationDepartmentId: '',
  1032. applicationDepartmentName: '',
  1033. applyDate: '',
  1034. ecnType: '',
  1035. changeImpact: '',
  1036. changeImpactDesc: '',
  1037. ecnStage: '',
  1038. changeType: '',
  1039. tpEngineerId: '',
  1040. tpEngineerName: '',
  1041. changePhaseInDate: '',
  1042. dfIsProduct: '',
  1043. printing: '',
  1044. manufacturingCostIsChange: '',
  1045. changeRequestDesc: '',
  1046. isReQuote: '',
  1047. ulCertificationRequirements: '',
  1048. ulContinueToMeetDemand: '',
  1049. gpCertificationRequirements: '',
  1050. gpContinueToMeetDemand: '',
  1051. detailList: [],
  1052. ecnTypeData: [],
  1053. industrialEngineerId: '',
  1054. industrialEngineerName: '',
  1055. changeStatus: '',
  1056. cqcOperatorId: '',
  1057. cqcOperatorName: '',
  1058. faiOperatorId: '',
  1059. faiOperatorName: '',
  1060. nodeConclusion: '',
  1061. stepId: '',
  1062. rejectFlag: '',
  1063. rejectStepId: '',
  1064. isReject: '',
  1065. menuId: this.$route.meta.menuId
  1066. },
  1067. costImpactData: {
  1068. site: this.$store.state.user.site,
  1069. changeNo: '',
  1070. productionProductFlag: '',
  1071. inventoryProductFlag: '',
  1072. newOrderFlag: '',
  1073. affectedFlag: '',
  1074. productionProductNumber: '',
  1075. productionProductOpinions: '',
  1076. productionProductScrapAmount: 0,
  1077. productionProductRemark: '',
  1078. productionProductExecutor: '',
  1079. productionProductExecutorName: '',
  1080. inventoryProductNumber: '',
  1081. inventoryProductOpinions: '',
  1082. inventoryProductScrapAmount: 0,
  1083. inventoryProductRemark: '',
  1084. inventoryProductExecutor: '',
  1085. inventoryProductExecutorName: '',
  1086. newOrderNumber: '',
  1087. affectedNumber: '',
  1088. affectedOpinions: '',
  1089. affectedScrapAmount: 0,
  1090. affectedRemark: '',
  1091. affectedExecutor: '',
  1092. affectedExecutorName: '',
  1093. changeTotalCost: '',
  1094. remark: '',
  1095. createBy: '',
  1096. updateBy: ''
  1097. },
  1098. executionInfoData: {
  1099. site: this.$store.state.user.site,
  1100. changeNo: '',
  1101. originalFilmNo: '',
  1102. newFilmNo: '',
  1103. originalDieCuttingRuleNo: '',
  1104. newDieCuttingRuleNo: '',
  1105. originalStencilNo: '',
  1106. newStencilNo: '',
  1107. executionDate: '',
  1108. createBy: '',
  1109. updateBy: '',
  1110. chooseItemList: [],
  1111. chooseItemList2: []
  1112. },
  1113. chooseModelData: {
  1114. site: this.$store.state.user.site,
  1115. functionType: 'ECN',
  1116. itemNo: '',
  1117. itemDesc: '',
  1118. codeNo: ''
  1119. },
  1120. countersignatureData: {
  1121. site: this.$store.state.user.site,
  1122. changeNo: '',
  1123. createBy: '',
  1124. updateBy: '',
  1125. chooseCSItemList: []
  1126. },
  1127. // ======== 数据列表 ========
  1128. dataList: [],
  1129. detailList: [],
  1130. fileList: [],
  1131. chooseItemList: [],
  1132. chooseItemList2: [],
  1133. chooseCSItemList: [],
  1134. chooseDataList: [],
  1135. form: [],
  1136. modelList: [],
  1137. itemList: [],
  1138. chooseFileList: [],
  1139. // ======== 列表表头 ========
  1140. columnList: [
  1141. {
  1142. userId: this.$store.state.user.name,
  1143. functionId: 108002,
  1144. serialNumber: '108002Table1ChangeNo',
  1145. tableId: '108002Table1',
  1146. tableName: '工程变更记录表',
  1147. columnProp: 'changeNo',
  1148. headerAlign: 'center',
  1149. align: 'center',
  1150. columnLabel: '申请编号',
  1151. columnHidden: false,
  1152. columnImage: false,
  1153. status: true,
  1154. fixed: '',
  1155. columnWidth: 120
  1156. },
  1157. {
  1158. userId: this.$store.state.user.name,
  1159. functionId: 108002,
  1160. serialNumber: '108002Table1ApplicantName',
  1161. tableId: '108002Table1',
  1162. tableName: '工程变更记录表',
  1163. columnProp: 'applicantName',
  1164. headerAlign: 'center',
  1165. align: 'center',
  1166. columnLabel: '申请人',
  1167. columnHidden: false,
  1168. columnImage: false,
  1169. status: true,
  1170. fixed: '',
  1171. columnWidth: 120
  1172. },
  1173. {
  1174. userId: this.$store.state.user.name,
  1175. functionId: 108002,
  1176. serialNumber: '108002Table1DepartmentName',
  1177. tableId: '108002Table1',
  1178. tableName: '工程变更记录表',
  1179. columnProp: 'applicationDepartmentName',
  1180. headerAlign: 'center',
  1181. align: 'center',
  1182. columnLabel: '申请部门',
  1183. columnHidden: false,
  1184. columnImage: false,
  1185. status: true,
  1186. fixed: '',
  1187. columnWidth: 120
  1188. },
  1189. {
  1190. userId: this.$store.state.user.name,
  1191. functionId: 108002,
  1192. serialNumber: '108002Table1ChangeStatus',
  1193. tableId: '108002Table1',
  1194. tableName: '工程变更记录表',
  1195. columnProp: 'changeStatus',
  1196. headerAlign: 'center',
  1197. align: 'center',
  1198. columnLabel: '变更单状态',
  1199. columnHidden: false,
  1200. columnImage: false,
  1201. status: true,
  1202. fixed: '',
  1203. columnWidth: 100
  1204. },
  1205. {
  1206. userId: this.$store.state.user.name,
  1207. functionId: 108002,
  1208. serialNumber: '108002Table1NodeName',
  1209. tableId: '108002Table1',
  1210. tableName: '工程变更记录表',
  1211. columnProp: 'nodeName',
  1212. headerAlign: 'center',
  1213. align: 'center',
  1214. columnLabel: '当前节点',
  1215. columnHidden: false,
  1216. columnImage: false,
  1217. status: true,
  1218. fixed: '',
  1219. columnWidth: 150
  1220. },
  1221. {
  1222. userId: this.$store.state.user.name,
  1223. functionId: 108002,
  1224. serialNumber: '108002Table1EcnStage',
  1225. tableId: '108002Table1',
  1226. tableName: '工程变更记录表',
  1227. columnProp: 'ecnStage',
  1228. headerAlign: 'center',
  1229. align: 'center',
  1230. columnLabel: 'ECN阶段',
  1231. columnHidden: false,
  1232. columnImage: false,
  1233. status: true,
  1234. fixed: '',
  1235. columnWidth: 100
  1236. },
  1237. {
  1238. userId: this.$store.state.user.name,
  1239. functionId: 108002,
  1240. serialNumber: '108002Table1ChangeType',
  1241. tableId: '108002Table1',
  1242. tableName: '工程变更记录表',
  1243. columnProp: 'changeType',
  1244. headerAlign: 'center',
  1245. align: 'center',
  1246. columnLabel: '变更类别',
  1247. columnHidden: false,
  1248. columnImage: false,
  1249. status: true,
  1250. fixed: '',
  1251. columnWidth: 100
  1252. },
  1253. {
  1254. userId: this.$store.state.user.name,
  1255. functionId: 108002,
  1256. serialNumber: '108002Table1EcnType',
  1257. tableId: '108002Table1',
  1258. tableName: '工程变更记录表',
  1259. columnProp: 'ecnType',
  1260. headerAlign: 'center',
  1261. align: 'center',
  1262. columnLabel: 'ECN种类',
  1263. columnHidden: false,
  1264. columnImage: false,
  1265. status: true,
  1266. fixed: '',
  1267. columnWidth: 100
  1268. },
  1269. {
  1270. userId: this.$store.state.user.name,
  1271. functionId: 108002,
  1272. serialNumber: '108002Table1ApplyDate',
  1273. tableId: '108002Table1',
  1274. tableName: '工程变更记录表',
  1275. columnProp: 'applyDate',
  1276. headerAlign: 'center',
  1277. align: 'center',
  1278. columnLabel: '申请日期',
  1279. columnHidden: false,
  1280. columnImage: false,
  1281. status: true,
  1282. fixed: '',
  1283. columnWidth: 100
  1284. },
  1285. {
  1286. userId: this.$store.state.user.name,
  1287. functionId: 108002,
  1288. serialNumber: '108002Table1ChangePhaseInDate',
  1289. tableId: '108002Table1',
  1290. tableName: '工程变更记录表',
  1291. columnProp: 'changePhaseInDate',
  1292. headerAlign: 'center',
  1293. align: 'center',
  1294. columnLabel: '变更生效日期',
  1295. columnHidden: false,
  1296. columnImage: false,
  1297. status: true,
  1298. fixed: '',
  1299. columnWidth: 100
  1300. },
  1301. {
  1302. userId: this.$store.state.user.name,
  1303. functionId: 108002,
  1304. serialNumber: '108002Table1xxx',
  1305. tableId: '108002Table1',
  1306. tableName: '工程变更记录表',
  1307. columnProp: 'xxx',
  1308. headerAlign: 'center',
  1309. align: 'center',
  1310. columnLabel: 'ECN执行日期',
  1311. columnHidden: false,
  1312. columnImage: false,
  1313. status: true,
  1314. fixed: '',
  1315. columnWidth: 100
  1316. },
  1317. ],
  1318. detailColumnList: [
  1319. {
  1320. userId: this.$store.state.user.name,
  1321. functionId: 108002,
  1322. serialNumber: '108002Table2PartNo',
  1323. tableId: '108002Table2',
  1324. tableName: '变更单基本信息表',
  1325. columnProp: 'partNo',
  1326. headerAlign: 'center',
  1327. align: 'center',
  1328. columnLabel: '正式物料编码',
  1329. columnHidden: false,
  1330. columnImage: false,
  1331. status: true,
  1332. fixed: '',
  1333. columnWidth: 120
  1334. },
  1335. {
  1336. userId: this.$store.state.user.name,
  1337. functionId: 108002,
  1338. serialNumber: '108002Table2PartDesc',
  1339. tableId: '108002Table2',
  1340. tableName: '变更单基本信息表',
  1341. columnProp: 'partDesc',
  1342. headerAlign: 'center',
  1343. align: 'left',
  1344. columnLabel: '物料描述',
  1345. columnHidden: false,
  1346. columnImage: false,
  1347. status: true,
  1348. fixed: '',
  1349. columnWidth: 180
  1350. },
  1351. {
  1352. userId: this.$store.state.user.name,
  1353. functionId: 108002,
  1354. serialNumber: '108002Table2NewPartNo',
  1355. tableId: '108002Table2',
  1356. tableName: '变更单基本信息表',
  1357. columnProp: 'newPartNo',
  1358. headerAlign: 'center',
  1359. align: 'center',
  1360. columnLabel: '新物料编码',
  1361. columnHidden: false,
  1362. columnImage: false,
  1363. status: true,
  1364. fixed: '',
  1365. columnWidth: 100
  1366. },
  1367. {
  1368. userId: this.$store.state.user.name,
  1369. functionId: 108002,
  1370. serialNumber: '108002Table2NewDrawingNo',
  1371. tableId: '108002Table2',
  1372. tableName: '变更单基本信息表',
  1373. columnProp: 'newDrawingNo',
  1374. headerAlign: 'center',
  1375. align: 'center',
  1376. columnLabel: '新图纸编码',
  1377. columnHidden: false,
  1378. columnImage: false,
  1379. status: true,
  1380. fixed: '',
  1381. columnWidth: 100
  1382. },
  1383. {
  1384. userId: this.$store.state.user.name,
  1385. functionId: 108002,
  1386. serialNumber: '108002Table2NewDraftNo',
  1387. tableId: '108002Table2',
  1388. tableName: '变更单基本信息表',
  1389. columnProp: 'newDraftNo',
  1390. headerAlign: 'center',
  1391. align: 'center',
  1392. columnLabel: '新图稿编码',
  1393. columnHidden: false,
  1394. columnImage: false,
  1395. status: true,
  1396. fixed: '',
  1397. columnWidth: 100
  1398. },
  1399. {
  1400. userId: this.$store.state.user.name,
  1401. functionId: 108002,
  1402. serialNumber: '108002Table2CodeNo',
  1403. tableId: '108002Table2',
  1404. tableName: '变更单基本信息表',
  1405. columnProp: 'codeNo',
  1406. headerAlign: 'center',
  1407. align: 'center',
  1408. columnLabel: '技术参数卡编码',
  1409. columnHidden: false,
  1410. columnImage: false,
  1411. status: true,
  1412. fixed: '',
  1413. columnWidth: 100
  1414. },
  1415. ],
  1416. fileColumnList: [
  1417. {
  1418. userId: this.$store.state.user.name,
  1419. functionId: 108002,
  1420. serialNumber: '108002Table3FileName',
  1421. tableId: '108002Table3',
  1422. tableName: '变更单文件信息表',
  1423. columnProp: 'fileName',
  1424. headerAlign: 'center',
  1425. align: 'left',
  1426. columnLabel: '文件名称',
  1427. columnHidden: false,
  1428. columnImage: false,
  1429. status: true,
  1430. fixed: '',
  1431. columnWidth: 120
  1432. },
  1433. {
  1434. userId: this.$store.state.user.name,
  1435. functionId: 108002,
  1436. serialNumber: '108002Table3FileType',
  1437. tableId: '108002Table3',
  1438. tableName: '变更单文件信息表',
  1439. columnProp: 'fileType',
  1440. headerAlign: 'center',
  1441. align: 'left',
  1442. columnLabel: '文件类型',
  1443. columnHidden: false,
  1444. columnImage: false,
  1445. status: true,
  1446. fixed: '',
  1447. columnWidth: 80
  1448. },
  1449. {
  1450. userId: this.$store.state.user.name,
  1451. functionId: 108002,
  1452. serialNumber: '108002Table3Url',
  1453. tableId: '108002Table3',
  1454. tableName: '变更单文件信息表',
  1455. columnProp: 'url',
  1456. headerAlign: 'center',
  1457. align: 'left',
  1458. columnLabel: '文件地址',
  1459. columnHidden: false,
  1460. columnImage: false,
  1461. status: true,
  1462. fixed: '',
  1463. columnWidth: 180
  1464. },
  1465. {
  1466. userId: this.$store.state.user.name,
  1467. functionId: 108002,
  1468. serialNumber: '108002Table3CreateBy',
  1469. tableId: '108002Table3',
  1470. tableName: '变更单文件信息表',
  1471. columnProp: 'createBy',
  1472. headerAlign: 'center',
  1473. align: 'center',
  1474. columnLabel: '创建人',
  1475. columnHidden: false,
  1476. columnImage: false,
  1477. status: true,
  1478. fixed: '',
  1479. columnWidth: 100
  1480. },
  1481. {
  1482. userId: this.$store.state.user.name,
  1483. functionId: 108002,
  1484. serialNumber: '108002Table3CreateDate',
  1485. tableId: '108002Table3',
  1486. tableName: '变更单文件信息表',
  1487. columnProp: 'createDate',
  1488. headerAlign: 'center',
  1489. align: 'center',
  1490. columnLabel: '创建时间',
  1491. columnHidden: false,
  1492. columnImage: false,
  1493. status: true,
  1494. fixed: '',
  1495. columnWidth: 150
  1496. },
  1497. ],
  1498. columnChooseDataList: [
  1499. {
  1500. userId: this.$store.state.user.name,
  1501. functionId: 108002,
  1502. serialNumber: '108002Table4PartNo',
  1503. tableId: '108002Table4',
  1504. tableName: '所选变更列表',
  1505. columnProp: 'partNo',
  1506. headerAlign: 'center',
  1507. align: 'center',
  1508. columnLabel: '正式物料编码',
  1509. columnHidden: false,
  1510. columnImage: false,
  1511. status: true,
  1512. fixed: '',
  1513. columnWidth: 100
  1514. },
  1515. {
  1516. userId: this.$store.state.user.name,
  1517. functionId: 108002,
  1518. serialNumber: '108002Table4PartDesc',
  1519. tableId: '108002Table4',
  1520. tableName: '所选变更列表',
  1521. columnProp: 'partDesc',
  1522. headerAlign: 'center',
  1523. align: 'left',
  1524. columnLabel: '物料描述',
  1525. columnHidden: false,
  1526. columnImage: false,
  1527. status: true,
  1528. fixed: '',
  1529. columnWidth: 180
  1530. },
  1531. {
  1532. userId: this.$store.state.user.name,
  1533. functionId: 108002,
  1534. serialNumber: '108002Table4DrawingNo',
  1535. tableId: '108002Table4',
  1536. tableName: '所选变更列表',
  1537. columnProp: 'drawingNo',
  1538. headerAlign: 'center',
  1539. align: 'center',
  1540. columnLabel: '图纸编码',
  1541. columnHidden: false,
  1542. columnImage: false,
  1543. status: true,
  1544. fixed: '',
  1545. columnWidth: 90
  1546. },
  1547. {
  1548. userId: this.$store.state.user.name,
  1549. functionId: 108002,
  1550. serialNumber: '108002Table4DraftNo',
  1551. tableId: '108002Table4',
  1552. tableName: '所选变更列表',
  1553. columnProp: 'draftNo',
  1554. headerAlign: 'center',
  1555. align: 'center',
  1556. columnLabel: '图稿编码',
  1557. columnHidden: false,
  1558. columnImage: false,
  1559. status: true,
  1560. fixed: '',
  1561. columnWidth: 90
  1562. },
  1563. ],
  1564. columnChooseItemList: [
  1565. {
  1566. columnProp: 'itemNo',
  1567. headerAlign: 'center',
  1568. align: 'center',
  1569. columnLabel: '属性编码',
  1570. columnHidden: false,
  1571. columnImage: false,
  1572. status: true,
  1573. fixed: '',
  1574. columnWidth: 80
  1575. },
  1576. {
  1577. columnProp: 'itemDesc',
  1578. headerAlign: 'center',
  1579. align: 'center',
  1580. columnLabel: '属性名称',
  1581. columnHidden: false,
  1582. columnImage: false,
  1583. status: true,
  1584. fixed: '',
  1585. columnWidth: 150
  1586. },
  1587. {
  1588. columnProp: 'itemExecutionDate',
  1589. headerAlign: 'center',
  1590. align: 'center',
  1591. columnLabel: '执行时间',
  1592. columnHidden: false,
  1593. columnImage: false,
  1594. status: true,
  1595. fixed: '',
  1596. columnWidth: 130
  1597. }
  1598. ],
  1599. columnChooseItemList2: [
  1600. {
  1601. columnProp: 'itemNo',
  1602. headerAlign: 'center',
  1603. align: 'center',
  1604. columnLabel: '属性编码',
  1605. columnHidden: false,
  1606. columnImage: false,
  1607. status: true,
  1608. fixed: '',
  1609. columnWidth: 80
  1610. },
  1611. {
  1612. columnProp: 'itemDesc',
  1613. headerAlign: 'center',
  1614. align: 'center',
  1615. columnLabel: '属性名称',
  1616. columnHidden: false,
  1617. columnImage: false,
  1618. status: true,
  1619. fixed: '',
  1620. columnWidth: 150
  1621. },
  1622. // {
  1623. // columnProp: 'executeFlag',
  1624. // headerAlign: 'center',
  1625. // align: 'center',
  1626. // columnLabel: '是否执行',
  1627. // columnHidden: false,
  1628. // columnImage: false,
  1629. // status: true,
  1630. // fixed: '',
  1631. // columnWidth: 80
  1632. // },
  1633. // {
  1634. // columnProp: 'executor',
  1635. // headerAlign: 'center',
  1636. // align: 'center',
  1637. // columnLabel: '执行人',
  1638. // columnHidden: false,
  1639. // columnImage: false,
  1640. // status: true,
  1641. // fixed: '',
  1642. // columnWidth: 100
  1643. // },
  1644. // {
  1645. // columnProp: 'itemExecutionDate',
  1646. // headerAlign: 'center',
  1647. // align: 'center',
  1648. // columnLabel: '执行时间',
  1649. // columnHidden: false,
  1650. // columnImage: false,
  1651. // status: true,
  1652. // fixed: '',
  1653. // columnWidth: 150
  1654. // }
  1655. ],
  1656. columnItemList: [
  1657. {
  1658. userId: this.$store.state.user.name,
  1659. functionId: 108002,
  1660. serialNumber: '108002Table6ItemNo',
  1661. tableId: '108002Table6',
  1662. tableName: '执行属性表',
  1663. columnProp: 'itemNo',
  1664. headerAlign: 'center',
  1665. align: 'center',
  1666. columnLabel: '属性编码',
  1667. columnHidden: false,
  1668. columnImage: false,
  1669. status: true,
  1670. fixed: '',
  1671. columnWidth: 80
  1672. },
  1673. {
  1674. userId: this.$store.state.user.name,
  1675. functionId: 108002,
  1676. serialNumber: '108002Table6ItemDesc',
  1677. tableId: '108002Table6',
  1678. tableName: '执行属性表',
  1679. columnProp: 'itemDesc',
  1680. headerAlign: 'center',
  1681. align: 'center',
  1682. columnLabel: '属性名称',
  1683. columnHidden: false,
  1684. columnImage: false,
  1685. status: true,
  1686. fixed: '',
  1687. columnWidth: 150
  1688. },
  1689. ],
  1690. columnCSChooseItemList: [
  1691. {
  1692. userId: this.$store.state.user.name,
  1693. functionId: 108002,
  1694. serialNumber: '108002Table7ItemNo',
  1695. tableId: '108002Table7',
  1696. tableName: '执行属性表',
  1697. columnProp: 'itemNo',
  1698. headerAlign: 'center',
  1699. align: 'center',
  1700. columnLabel: '属性编码',
  1701. columnHidden: false,
  1702. columnImage: false,
  1703. status: true,
  1704. fixed: '',
  1705. columnWidth: 80
  1706. },
  1707. {
  1708. userId: this.$store.state.user.name,
  1709. functionId: 108002,
  1710. serialNumber: '108002Table7ItemDesc',
  1711. tableId: '108002Table7',
  1712. tableName: '执行属性表',
  1713. columnProp: 'itemDesc',
  1714. headerAlign: 'center',
  1715. align: 'center',
  1716. columnLabel: '属性名称',
  1717. columnHidden: false,
  1718. columnImage: false,
  1719. status: true,
  1720. fixed: '',
  1721. columnWidth: 150
  1722. },
  1723. {
  1724. userId: this.$store.state.user.name,
  1725. functionId: 108002,
  1726. serialNumber: '108002Table7ExecuteFlag',
  1727. tableId: '108002Table7',
  1728. tableName: '执行属性表',
  1729. columnProp: 'executeFlag',
  1730. headerAlign: 'center',
  1731. align: 'center',
  1732. columnLabel: '是否执行',
  1733. columnHidden: false,
  1734. columnImage: false,
  1735. status: true,
  1736. fixed: '',
  1737. columnWidth: 80
  1738. },
  1739. {
  1740. userId: this.$store.state.user.name,
  1741. functionId: 108002,
  1742. serialNumber: '108002Table7Executor',
  1743. tableId: '108002Table7',
  1744. tableName: '执行属性表',
  1745. columnProp: 'executor',
  1746. headerAlign: 'center',
  1747. align: 'center',
  1748. columnLabel: '执行人',
  1749. columnHidden: false,
  1750. columnImage: false,
  1751. status: true,
  1752. fixed: '',
  1753. columnWidth: 100
  1754. },{
  1755. userId: this.$store.state.user.name,
  1756. functionId: 108002,
  1757. serialNumber: '108002Table7ExecuteDate',
  1758. tableId: '108002Table7',
  1759. tableName: '执行属性表',
  1760. columnProp: 'itemExecutionDate',
  1761. headerAlign: 'center',
  1762. align: 'center',
  1763. columnLabel: '执行时间',
  1764. columnHidden: false,
  1765. columnImage: false,
  1766. status: true,
  1767. fixed: '',
  1768. columnWidth: 150
  1769. },
  1770. ],
  1771. // ======== 必填规则 ========
  1772. rules: {
  1773. applicantId: [
  1774. {
  1775. required: true,
  1776. message: ' ',
  1777. trigger: ['blur','change']
  1778. }
  1779. ],
  1780. applyDate: [
  1781. {
  1782. required: true,
  1783. message: ' ',
  1784. trigger: ['blur','change']
  1785. }
  1786. ],
  1787. changeImpact: [
  1788. {
  1789. required: true,
  1790. message: ' ',
  1791. trigger: ['blur','change']
  1792. }
  1793. ],
  1794. changeImpactDesc: [
  1795. {
  1796. required: true,
  1797. message: ' ',
  1798. trigger: ['blur','change']
  1799. }
  1800. ],
  1801. ecnStage: [
  1802. {
  1803. required: true,
  1804. message: ' ',
  1805. trigger: ['blur','change']
  1806. }
  1807. ],
  1808. changeType: [
  1809. {
  1810. required: true,
  1811. message: ' ',
  1812. trigger: ['blur','change']
  1813. }
  1814. ],
  1815. tpEngineerId: [
  1816. {
  1817. required: true,
  1818. message: ' ',
  1819. trigger: ['blur','change']
  1820. }
  1821. ],
  1822. changePhaseInDate: [
  1823. {
  1824. required: true,
  1825. message: ' ',
  1826. trigger: ['blur','change']
  1827. }
  1828. ],
  1829. dfIsProduct: [
  1830. {
  1831. required: true,
  1832. message: ' ',
  1833. trigger: ['blur','change']
  1834. }
  1835. ],
  1836. printing: [
  1837. {
  1838. required: true,
  1839. message: ' ',
  1840. trigger: ['blur','change']
  1841. }
  1842. ],
  1843. manufacturingCostIsChange: [
  1844. {
  1845. required: true,
  1846. message: ' ',
  1847. trigger: ['blur','change']
  1848. }
  1849. ],
  1850. changeRequestDesc: [
  1851. {
  1852. required: true,
  1853. message: ' ',
  1854. trigger: ['blur','change']
  1855. }
  1856. ],
  1857. isReQuote: [
  1858. {
  1859. required: true,
  1860. message: ' ',
  1861. trigger: ['blur','change']
  1862. }
  1863. ],
  1864. ulCertificationRequirements: [
  1865. {
  1866. required: true,
  1867. message: ' ',
  1868. trigger: ['blur','change']
  1869. }
  1870. ],
  1871. ulContinueToMeetDemand: [
  1872. {
  1873. required: true,
  1874. message: ' ',
  1875. trigger: ['blur','change']
  1876. }
  1877. ],
  1878. gpCertificationRequirements: [
  1879. {
  1880. required: true,
  1881. message: ' ',
  1882. trigger: ['blur','change']
  1883. }
  1884. ],
  1885. gpContinueToMeetDemand: [
  1886. {
  1887. required: true,
  1888. message: ' ',
  1889. trigger: ['blur','change']
  1890. }
  1891. ],
  1892. ecnType: [
  1893. {
  1894. required: true,
  1895. message: ' ',
  1896. trigger: ['blur','change']
  1897. }
  1898. ],
  1899. },
  1900. // ======== 复选数据集 ========
  1901. fileSelections: [],
  1902. itemSelections: [],
  1903. // ======== 选中的当前行数据 ========
  1904. currentRow: {},
  1905. currentCostImpactData: {},
  1906. // ======== 模态框开关控制 ========
  1907. modalFlag: false,
  1908. modalDisableFlag: false,
  1909. ecnTypeModalFlag: false,
  1910. chooseModelFlag: false,
  1911. uploadDialog: false,
  1912. submitModalFlag: false
  1913. }
  1914. },
  1915. mounted () {
  1916. this.$nextTick(() => {
  1917. this.height = window.innerHeight / 2 - 30
  1918. /*第二个表格高度的动态调整*/
  1919. this.secondHeight = window.innerHeight / 2 - 186
  1920. })
  1921. },
  1922. activated () {
  1923. if (this.$route.params.type === 'tokenLogin') {
  1924. if (this.$route.params.docNo) {
  1925. this.searchData.changeNo = this.$route.params.docNo
  1926. }
  1927. this.searchData.limit = this.pageSize
  1928. this.searchData.page = this.pageIndex
  1929. changeRecordSearch(this.searchData).then(({data}) => {
  1930. if (data.code === 0) {
  1931. this.dataList = data.page.list
  1932. this.pageIndex = data.page.currPage
  1933. this.pageSize = data.page.pageSize
  1934. this.totalPage = data.page.totalCount
  1935. // 判断是否全部存在数据
  1936. if (this.totalPage > 0) {
  1937. // 设置选中行
  1938. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  1939. // 加载当前的页签的table
  1940. this.refreshCurrentTabTable()
  1941. this.updateModal(this.dataList[0])
  1942. }
  1943. }
  1944. })
  1945. } else {
  1946. if (this.$route.params.changeNo) {
  1947. this.searchData.changeNo = this.$route.params.changeNo
  1948. }
  1949. this.getDataList()
  1950. }
  1951. },
  1952. created () {
  1953. this.getEcnModel()
  1954. },
  1955. methods: {
  1956. // 获取流程的配置权限
  1957. async getNodeAuthority (row) {
  1958. let tempData = {
  1959. site: row.site,
  1960. changeNo: row.changeNo,
  1961. stepId: row.stepId,
  1962. menuId: this.$route.meta.menuId
  1963. }
  1964. await getNodeAuthority(tempData).then(({data}) => {
  1965. if (data && data.code === 0) {
  1966. this.plmChangeRequestArr = data.rows.plm_change_request
  1967. this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  1968. this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  1969. this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  1970. this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  1971. this.plmChangeItemArr = data.rows.plm_change_item
  1972. }
  1973. })
  1974. },
  1975. // ======= 正则校验 =======
  1976. handleInput (value, type) {
  1977. // 大于等于0,且只能输入16位小数
  1978. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  1979. if (val === null || val === undefined || val === '') {
  1980. val = 0
  1981. }
  1982. if (type === 1) {
  1983. this.costImpactData.productionProductScrapAmount = val
  1984. } else if (type === 2) {
  1985. this.costImpactData.inventoryProductScrapAmount = val
  1986. } else if (type === 3) {
  1987. this.costImpactData.affectedScrapAmount = val
  1988. }
  1989. },
  1990. partInput (row, val) {
  1991. row.newPartNo = val.toUpperCase()
  1992. },
  1993. executorInput (row, val) {
  1994. row.executor = val.toUpperCase()
  1995. },
  1996. choosePartNo (row) {
  1997. this.tempPartRow = row
  1998. if (this.tempPartRow.newPartNo == null) {
  1999. this.tempPartRow.newPartNo = ''
  2000. }
  2001. this.getBaseList(133)
  2002. },
  2003. chooseExecutor (row) {
  2004. this.tempExecutorRow = row
  2005. if (this.tempExecutorRow.executor == null) {
  2006. this.tempExecutorRow.executor = ''
  2007. }
  2008. this.getBaseList(103, 7)
  2009. },
  2010. ecnTypeHeaderChange (val,index) {
  2011. if (val === 'Y') {
  2012. for (let i = 0; i < this.form[index].list.length; i++) {
  2013. this.form[index].list[i].flag = 'Y'
  2014. }
  2015. } else {
  2016. for (let i = 0; i < this.form[index].list.length; i++) {
  2017. this.form[index].list[i].flag = 'N'
  2018. }
  2019. }
  2020. },
  2021. ecnTypeDetailChange (val,index) {
  2022. if (this.form[index].list.every(x => x.flag === 'Y')) {
  2023. this.form[index].flag = 'Y'
  2024. }else {
  2025. this.form[index].flag = 'N'
  2026. }
  2027. },
  2028. // ======== 分页相关方法 ========
  2029. // 每页数
  2030. sizeChangeHandle (val) {
  2031. this.pageSize = val
  2032. this.pageIndex = 1
  2033. this.getDataList()
  2034. },
  2035. // 当前页
  2036. currentChangeHandle (val) {
  2037. this.pageIndex = val
  2038. this.getDataList()
  2039. },
  2040. // ======== 列表选择相关方法 ========
  2041. selectFlag () {
  2042. return true
  2043. },
  2044. // ======== 页签切换相关方法 ========
  2045. // 单机选中询价信息
  2046. changeClickRow (row) {
  2047. this.$refs.changeTable.toggleRowSelection(row)
  2048. this.currentRow = JSON.parse(JSON.stringify(row))
  2049. },
  2050. // // 列表表格选择替换
  2051. // tabClick (tab, event) {
  2052. // // 刷新列表数据
  2053. // this.refreshCurrentTabTable()
  2054. // },
  2055. // 当前值发生变化的时候修改
  2056. currentChange (row, oldRow) {
  2057. // 判断是否是获取焦点的事件
  2058. if (row) {
  2059. this.currentRow = JSON.parse(JSON.stringify(row))
  2060. // 刷新当前页表
  2061. this.refreshCurrentTabTable()
  2062. }
  2063. },
  2064. // 刷新页签的table数据
  2065. refreshChangeTab () {
  2066. if (this.activeName === 'inventoryCostImpact') {
  2067. } else if (this.activeName === 'actionInformation') {
  2068. }
  2069. },
  2070. // 新增库存成本影响
  2071. inventoryCostImpactSave () {
  2072. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  2073. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  2074. this.$message.warning('请填写在生产品数量!')
  2075. return
  2076. }
  2077. if (this.costImpactData.productionProductNumber <= 0) {
  2078. this.$message.warning('在生产品数量不能小于等于0!')
  2079. return
  2080. }
  2081. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  2082. this.$message.warning('请填写在生产品处理意见!')
  2083. return
  2084. }
  2085. if (this.costImpactData.productionProductScrapAmount === 0) {
  2086. this.$message.warning('请填写在生产品报废金额!')
  2087. return
  2088. }
  2089. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  2090. this.$message.warning('请填写在生产品执行人!')
  2091. return
  2092. }
  2093. }
  2094. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  2095. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  2096. this.$message.warning('请填写成品库存数量!')
  2097. return
  2098. }
  2099. if (this.costImpactData.inventoryProductNumber <= 0) {
  2100. this.$message.warning('成品库存数量不能小于等于0!')
  2101. return
  2102. }
  2103. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  2104. this.$message.warning('请填写成品库存处理意见!')
  2105. return
  2106. }
  2107. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  2108. this.$message.warning('请填写成品库存报废金额!')
  2109. return
  2110. }
  2111. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  2112. this.$message.warning('请填写成品库存执行人!')
  2113. return
  2114. }
  2115. }
  2116. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  2117. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  2118. this.$message.warning('请填写新订单数量!')
  2119. return
  2120. }
  2121. if (this.costImpactData.newOrderNumber <= 0) {
  2122. this.$message.warning('新订单数量不能小于等于0!')
  2123. return
  2124. }
  2125. }
  2126. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  2127. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  2128. this.$message.warning('请填写影响的原材料及其库存量数量!')
  2129. return
  2130. }
  2131. if (this.costImpactData.affectedNumber <= 0) {
  2132. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  2133. return
  2134. }
  2135. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  2136. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  2137. return
  2138. }
  2139. if (this.costImpactData.affectedScrapAmount === 0) {
  2140. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  2141. return
  2142. }
  2143. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  2144. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  2145. return
  2146. }
  2147. }
  2148. this.costImpactData.changeTotalCost = this.totalCost
  2149. costImpactUpdate(this.costImpactData).then(({data}) => {
  2150. if (data && data.code === 0) {
  2151. this.costImpactData = data.rows.costImpactData
  2152. this.getDataList()
  2153. this.$message({
  2154. message: '操作成功',
  2155. type: 'success',
  2156. duration: 1500,
  2157. onClose: () => {}
  2158. })
  2159. } else {
  2160. this.$alert(data.msg, '错误', {
  2161. confirmButtonText: '确定'
  2162. })
  2163. }
  2164. })
  2165. },
  2166. // 刷新页签的table数据
  2167. refreshCurrentTabTable () {
  2168. if (this.activeTable === 'basicInformation') {
  2169. this.getChangeDetailList()
  2170. } else if (this.activeTable === 'fileInformation') {
  2171. this.getChangeFileList()
  2172. } else if (this.activeTable === 'inventoryCostImpact') {
  2173. this.inventoryCostImpactSearch2()
  2174. }
  2175. },
  2176. // ======== 列表数据刷新方法 ========
  2177. // 获取数据列表
  2178. getDataList () {
  2179. if(localStorage.getItem('ecnData')!=undefined){
  2180. let data=JSON.parse(localStorage.getItem('ecnData'));
  2181. this.searchData.changeNo=data.ecnNo
  2182. localStorage.removeItem('ecnData');
  2183. }
  2184. this.searchData.limit = this.pageSize
  2185. this.searchData.page = this.pageIndex
  2186. changeRecordSearch(this.searchData).then(({data}) => {
  2187. if (data.code === 0) {
  2188. this.dataList = data.page.list
  2189. this.pageIndex = data.page.currPage
  2190. this.pageSize = data.page.pageSize
  2191. this.totalPage = data.page.totalCount
  2192. // 判断是否全部存在数据
  2193. if (this.totalPage > 0) {
  2194. // 设置选中行
  2195. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  2196. // 加载当前的页签的table
  2197. this.refreshCurrentTabTable()
  2198. }
  2199. }
  2200. })
  2201. },
  2202. // 变更单详情的列表
  2203. getChangeDetailList () {
  2204. let tempData = {
  2205. site: this.$store.state.user.site,
  2206. changeNo: this.currentRow.changeNo
  2207. }
  2208. changeDetailSearch(tempData).then(({data}) => {
  2209. if (data && data.code === 0) {
  2210. this.detailList = data.rows
  2211. } else {
  2212. this.detailList = []
  2213. }
  2214. })
  2215. },
  2216. // 变更单文件的列表
  2217. getChangeFileList () {
  2218. let tempData = {
  2219. orderRef1: this.$store.state.user.site,
  2220. orderRef2: this.currentRow.changeNo
  2221. }
  2222. changeFileSearch(tempData).then(({data}) => {
  2223. if (data && data.code === 0) {
  2224. this.fileList = data.rows
  2225. } else {
  2226. this.fileList = []
  2227. }
  2228. })
  2229. },
  2230. // 复选变更单文件
  2231. selectionFile (val) {
  2232. this.fileSelections = val
  2233. },
  2234. // 上传文件
  2235. uploadFileModal () {
  2236. let currentData = {
  2237. titleCon: '工程变更文件上传',
  2238. site: this.currentRow.site,
  2239. createBy: this.$store.state.user.name,
  2240. dataNo: this.currentRow.changeNo,
  2241. fileRemark: '',
  2242. folder: 'change',
  2243. }
  2244. this.uploadDialog = true
  2245. //打开组件 去做新增业务
  2246. // this.$nextTick(() => {
  2247. // this.$refs.changeUploadFile.init(currentData);
  2248. // })
  2249. },
  2250. // 删除变更单文件
  2251. deleteChangeFile () {
  2252. if (this.fileSelections.length === 0) {
  2253. this.$message.warning('请选择要删除的文件!')
  2254. return
  2255. }
  2256. let tempData = {
  2257. fileList: this.fileSelections
  2258. }
  2259. this.$confirm('确定删除文件?', '提示', {
  2260. confirmButtonText: '确定',
  2261. cancelButtonText: '取消',
  2262. type: 'warning'
  2263. }).then(() => {
  2264. deleteChangeFile(tempData).then(({data}) => {
  2265. if (data && data.code === 0) {
  2266. this.getChangeFileList()
  2267. this.$message({
  2268. message: '操作成功',
  2269. type: 'success',
  2270. duration: 1500,
  2271. onClose: () => {}
  2272. })
  2273. } else {
  2274. this.$alert(data.msg, '错误', {
  2275. confirmButtonText: '确定'
  2276. })
  2277. }
  2278. })
  2279. })
  2280. },
  2281. // 下载
  2282. downloadFile (row) {
  2283. downLoadQuotationFile(row)
  2284. .then(({data}) => {
  2285. // 不限制文件下载类型
  2286. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  2287. // 下载文件名称
  2288. const fileName = row.fileName
  2289. // a标签下载
  2290. const linkNode = document.createElement('a')
  2291. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  2292. linkNode.style.display = 'none'
  2293. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  2294. document.body.appendChild(linkNode)
  2295. linkNode.click() // 模拟在按钮上的一次鼠标单击
  2296. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  2297. document.body.removeChild(linkNode)
  2298. })
  2299. },
  2300. // 修改变更单模态框
  2301. async updateModal (row) {
  2302. await this.getNodeAuthority(row)
  2303. this.modalData = {
  2304. site: row.site,
  2305. changeNo: row.changeNo,
  2306. applicantId: row.applicantId,
  2307. applicantName: row.applicantName,
  2308. applicationDepartmentId: row.applicationDepartmentId,
  2309. applicationDepartmentName: row.applicationDepartmentName,
  2310. applyDate: row.applyDate,
  2311. ecnType: row.ecnType,
  2312. changeImpact: row.changeImpact,
  2313. changeImpactDesc: row.changeImpactDesc,
  2314. ecnStage: row.ecnStage,
  2315. changeType: row.changeType,
  2316. tpEngineerId: row.tpEngineerId,
  2317. tpEngineerName: row.tpEngineerName,
  2318. changePhaseInDate: row.changePhaseInDate,
  2319. dfIsProduct: row.dfIsProduct,
  2320. printing: row.printing,
  2321. manufacturingCostIsChange: row.manufacturingCostIsChange,
  2322. changeRequestDesc: row.changeRequestDesc,
  2323. isReQuote: row.isReQuote,
  2324. ulCertificationRequirements: row.ulCertificationRequirements,
  2325. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  2326. gpCertificationRequirements: row.gpCertificationRequirements,
  2327. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  2328. updateBy: this.$store.state.user.name,
  2329. detailList: [],
  2330. ecnTypeData: [],
  2331. industrialEngineerId: row.industrialEngineerId,
  2332. industrialEngineerName: row.industrialEngineerName,
  2333. changeStatus: row.changeStatus,
  2334. cqcOperatorId: row.cqcOperatorId,
  2335. cqcOperatorName: row.cqcOperatorName,
  2336. faiOperatorId: row.faiOperatorId,
  2337. faiOperatorName: row.faiOperatorName,
  2338. nodeConclusion: '',
  2339. stepId: row.stepId,
  2340. rejectFlag: row.rejectFlag,
  2341. rejectStepId: row.rejectStepId,
  2342. isReject: row.isReject,
  2343. menuId: this.$route.meta.menuId
  2344. }
  2345. this.changeTitle = '变更申请-' + this.modalData.changeNo
  2346. // 查选择的ECN种类
  2347. this.getChangeChooseEcnType()
  2348. // 查变更单明细
  2349. this.changeRequestDetailSearch()
  2350. // 查变更单库存成本影响
  2351. this.inventoryCostImpactSearch()
  2352. // 查变更单TP&执行信息
  2353. this.tpExecutionInfoSearch()
  2354. // 查变更单会签信息
  2355. this.countersignatureSearch()
  2356. this.activeName = 'basicInformation'
  2357. this.modalFlag = true
  2358. this.modalDisableFlag = true
  2359. },
  2360. // 下达
  2361. issueModal (row) {
  2362. this.$confirm(`是否确认下达?`, '提示', {
  2363. confirmButtonText: '确定',
  2364. cancelButtonText: '取消',
  2365. type: 'warning'
  2366. }).then(() => {
  2367. let tempData = {
  2368. site: row.site,
  2369. userName: this.$store.state.user.name,
  2370. changeNo: row.changeNo,
  2371. menuId: this.$route.meta.menuId
  2372. }
  2373. issueChange(tempData).then(({data}) => {
  2374. if (data && data.code === 0) {
  2375. this.getDataList()
  2376. this.$message({message: '操作成功', type: 'success'})
  2377. } else {
  2378. this.$alert(data.msg, '错误', {
  2379. confirmButtonText: '确定'
  2380. })
  2381. }
  2382. })
  2383. })
  2384. },
  2385. // 打开提交模态框
  2386. submitDataModal () {
  2387. this.modalData.nodeConclusion = 'Y'
  2388. this.submitModalFlag = true
  2389. },
  2390. // 同意提交
  2391. agreeSubmit () {
  2392. this.$confirm(`是否确认提交?`, '提示', {
  2393. confirmButtonText: '确定',
  2394. cancelButtonText: '取消',
  2395. type: 'warning'
  2396. }).then(() => {
  2397. this.modalData.nodeConclusion = 'Y'
  2398. this.submitData()
  2399. })
  2400. },
  2401. // 驳回提交
  2402. rejectSubmit () {
  2403. this.$confirm(`是否确认驳回?`, '提示', {
  2404. confirmButtonText: '确定',
  2405. cancelButtonText: '取消',
  2406. type: 'warning'
  2407. }).then(() => {
  2408. this.modalData.nodeConclusion = 'N'
  2409. this.submitData()
  2410. })
  2411. },
  2412. // 提交
  2413. submitData () {
  2414. if (this.plmChangeRequestArr) {
  2415. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  2416. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  2417. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  2418. return
  2419. }
  2420. }
  2421. }
  2422. if (this.plmChangeRequestDetailArr) {
  2423. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  2424. if (!this.modalData[this.plmChangeRequestDetailArr[i].fieldId] && this.plmChangeRequestDetailArr[i].required === 'Y') {
  2425. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  2426. return
  2427. }
  2428. }
  2429. }
  2430. if (this.plmChangeCostImpactArr) {
  2431. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  2432. if (!this.modalData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  2433. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  2434. return
  2435. }
  2436. }
  2437. }
  2438. if (this.plmChangeFAItemArr) {
  2439. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  2440. if (!this.modalData[this.plmChangeFAItemArr[i].fieldId] && this.plmChangeFAItemArr[i].required === 'Y') {
  2441. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  2442. return
  2443. }
  2444. }
  2445. }
  2446. if (this.plmChangeExecutionInfoArr) {
  2447. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  2448. if (!this.modalData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  2449. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  2450. return
  2451. }
  2452. }
  2453. }
  2454. if (this.plmChangeItemArr) {
  2455. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  2456. if (!this.modalData[this.plmChangeItemArr[i].fieldId] && this.plmChangeItemArr[i].required === 'Y') {
  2457. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  2458. return
  2459. }
  2460. }
  2461. }
  2462. this.costImpactData.changeTotalCost = this.totalCost
  2463. this.executionInfoData.chooseItemList = this.chooseItemList
  2464. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  2465. this.countersignatureData.changeNo = this.modalData.changeNo
  2466. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2467. this.modalData.userName = this.$store.state.user.name
  2468. this.modalData.menuId = this.$route.meta.menuId
  2469. this.modalData.detailList = this.chooseDataList
  2470. this.modalData.ecnTypeData = this.form
  2471. this.modalData.costImpactData = this.costImpactData
  2472. this.modalData.executionInfoData = this.executionInfoData
  2473. this.modalData.countersignatureData = this.countersignatureData
  2474. submitChange(this.modalData).then(({data}) => {
  2475. if (data && data.code === 0) {
  2476. this.getDataList()
  2477. this.$message({message: '操作成功', type: 'success'})
  2478. this.submitModalFlag = false
  2479. this.modalFlag = false
  2480. } else {
  2481. this.$alert(data.msg, '错误', {
  2482. confirmButtonText: '确定'
  2483. })
  2484. }
  2485. })
  2486. },
  2487. // 获取选择的ECN种类
  2488. getChangeChooseEcnType () {
  2489. getChooseEcnType(this.modalData).then(({data}) => {
  2490. if (data && data.code === 0) {
  2491. this.form = data.rows
  2492. } else {
  2493. this.$alert(data.msg, '错误', {
  2494. confirmButtonText: '确定'
  2495. })
  2496. }
  2497. })
  2498. },
  2499. // 打开ECN种类模态框
  2500. chooseEcnTypeModal () {
  2501. this.ecnTypeModalFlag = true
  2502. },
  2503. // 保存ECN种类
  2504. saveEcnTypeData () {
  2505. this.ecnTypeModalFlag = false
  2506. },
  2507. // 查询ECN的模板
  2508. getEcnModel () {
  2509. let tempData = {
  2510. site: this.$store.state.user.site,
  2511. functionType: 'ECN'
  2512. }
  2513. getEcnModel(tempData).then(({data}) => {
  2514. if (data.code === 0) {
  2515. this.modelList = data.rows
  2516. }
  2517. })
  2518. },
  2519. // 查询变更明细表
  2520. changeRequestDetailSearch () {
  2521. requestDetailSearch(this.modalData).then(({data}) => {
  2522. if (data && data.code === 0) {
  2523. this.chooseDataList = data.rows
  2524. } else {
  2525. this.$alert(data.msg, '错误', {
  2526. confirmButtonText: '确定'
  2527. })
  2528. }
  2529. })
  2530. },
  2531. // 查询库存成本影响对象
  2532. inventoryCostImpactSearch () {
  2533. costImpactSearch(this.modalData).then(({data}) => {
  2534. if (data && data.code === 0) {
  2535. this.costImpactData = data.rows
  2536. } else {
  2537. this.$alert(data.msg, '错误', {
  2538. confirmButtonText: '确定'
  2539. })
  2540. }
  2541. })
  2542. },
  2543. // 查询库存成本影响对象
  2544. inventoryCostImpactSearch2 () {
  2545. costImpactSearch(this.currentRow).then(({data}) => {
  2546. if (data && data.code === 0) {
  2547. this.currentCostImpactData = data.rows
  2548. } else {
  2549. this.$alert(data.msg, '错误', {
  2550. confirmButtonText: '确定'
  2551. })
  2552. }
  2553. })
  2554. },
  2555. // 查询执行信息
  2556. tpExecutionInfoSearch () {
  2557. executionInfoSearch(this.modalData).then(({data}) => {
  2558. if (data && data.code === 0) {
  2559. this.executionInfoData = data.rows.executionInfoData
  2560. this.executionInfoData.createBy = this.$store.state.user.name
  2561. this.chooseItemList = data.rows.chooseItemList
  2562. this.chooseItemList2 = data.rows.chooseItemList2
  2563. } else {
  2564. this.$alert(data.msg, '错误', {
  2565. confirmButtonText: '确定'
  2566. })
  2567. }
  2568. })
  2569. },
  2570. // 查询会签信息
  2571. countersignatureSearch () {
  2572. countersignatureSearch(this.modalData).then(({data}) => {
  2573. if (data && data.code === 0) {
  2574. this.chooseCSItemList = data.rows.chooseCSItemList
  2575. } else {
  2576. this.$alert(data.msg, '错误', {
  2577. confirmButtonText: '确定'
  2578. })
  2579. }
  2580. })
  2581. },
  2582. // 删除所选技术参数卡
  2583. deleteChooseDataModal (row) {
  2584. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  2585. confirmButtonText: '确定',
  2586. cancelButtonText: '取消',
  2587. type: 'warning'
  2588. }).then(() => {
  2589. deleteChangeDetail(row).then(({data}) => {
  2590. if (data && data.code === 0) {
  2591. this.changeRequestDetailSearch()
  2592. this.$message({
  2593. message: '操作成功',
  2594. type: 'success',
  2595. duration: 1500,
  2596. onClose: () => {}
  2597. })
  2598. } else {
  2599. this.$alert(data.msg, '错误', {
  2600. confirmButtonText: '确定'
  2601. })
  2602. }
  2603. })
  2604. })
  2605. },
  2606. // 修改变更申请
  2607. saveData () {
  2608. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  2609. this.$message.warning('请选择申请人员!')
  2610. return
  2611. }
  2612. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  2613. this.$message.warning('请选择申请日期!')
  2614. return
  2615. }
  2616. if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  2617. this.$message.warning('请选择ECN变更影响!')
  2618. return
  2619. }
  2620. if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  2621. this.$message.warning('请填写变更影响描述!')
  2622. return
  2623. }
  2624. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  2625. this.$message.warning('请选择ECN阶段!')
  2626. return
  2627. }
  2628. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  2629. this.$message.warning('请选择变更类别!')
  2630. return
  2631. }
  2632. if (this.form.length === 0) {
  2633. this.$message.warning('请选择ECN种类!')
  2634. return
  2635. }
  2636. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  2637. this.$message.warning('请选择审批人员!')
  2638. return
  2639. }
  2640. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  2641. this.$message.warning('请选择变更生效日期!')
  2642. return
  2643. }
  2644. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  2645. this.$message.warning('请选择是否DF产品!')
  2646. return
  2647. }
  2648. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  2649. this.$message.warning('请选择I/E!')
  2650. return
  2651. }
  2652. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  2653. this.$message.warning('请填写变更要求描述!')
  2654. return
  2655. }
  2656. if (this.modalData.printing === '' || this.modalData.printing == null) {
  2657. this.$message.warning('请选择印刷方式!')
  2658. return
  2659. }
  2660. if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
  2661. this.$message.warning('请选择CQC或者FAI人员!')
  2662. return
  2663. }
  2664. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  2665. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  2666. this.$message.warning('请填写在生产品数量!')
  2667. return
  2668. }
  2669. if (this.costImpactData.productionProductNumber <= 0) {
  2670. this.$message.warning('在生产品数量不能小于等于0!')
  2671. return
  2672. }
  2673. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  2674. this.$message.warning('请填写在生产品处理意见!')
  2675. return
  2676. }
  2677. if (this.costImpactData.productionProductScrapAmount === 0) {
  2678. this.$message.warning('请填写在生产品报废金额!')
  2679. return
  2680. }
  2681. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  2682. this.$message.warning('请填写在生产品执行人!')
  2683. return
  2684. }
  2685. }
  2686. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  2687. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  2688. this.$message.warning('请填写成品库存数量!')
  2689. return
  2690. }
  2691. if (this.costImpactData.inventoryProductNumber <= 0) {
  2692. this.$message.warning('成品库存数量不能小于等于0!')
  2693. return
  2694. }
  2695. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  2696. this.$message.warning('请填写成品库存处理意见!')
  2697. return
  2698. }
  2699. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  2700. this.$message.warning('请填写成品库存报废金额!')
  2701. return
  2702. }
  2703. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  2704. this.$message.warning('请填写成品库存执行人!')
  2705. return
  2706. }
  2707. }
  2708. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  2709. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  2710. this.$message.warning('请填写新订单数量!')
  2711. return
  2712. }
  2713. if (this.costImpactData.newOrderNumber <= 0) {
  2714. this.$message.warning('新订单数量不能小于等于0!')
  2715. return
  2716. }
  2717. }
  2718. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  2719. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  2720. this.$message.warning('请填写影响的原材料及其库存量数量!')
  2721. return
  2722. }
  2723. if (this.costImpactData.affectedNumber <= 0) {
  2724. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  2725. return
  2726. }
  2727. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  2728. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  2729. return
  2730. }
  2731. if (this.costImpactData.affectedScrapAmount === 0) {
  2732. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  2733. return
  2734. }
  2735. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  2736. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  2737. return
  2738. }
  2739. }
  2740. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  2741. this.$message.warning('请填写原啤刀编号!')
  2742. return;
  2743. }
  2744. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  2745. this.$message.warning('请填写新啤刀编号!')
  2746. return;
  2747. }
  2748. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  2749. this.$message.warning('请填写原网板/印版编号!')
  2750. return;
  2751. }
  2752. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  2753. this.$message.warning('请填写新网板/印版编号!')
  2754. return;
  2755. }
  2756. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  2757. this.$message.warning('请选择ECN执行日期!')
  2758. return;
  2759. }
  2760. this.costImpactData.changeTotalCost = this.totalCost
  2761. this.executionInfoData.chooseItemList = this.chooseItemList
  2762. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  2763. this.countersignatureData.changeNo = this.modalData.changeNo
  2764. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2765. this.modalData.detailList = this.chooseDataList
  2766. this.modalData.ecnTypeData = this.form
  2767. this.modalData.costImpactData = this.costImpactData
  2768. this.modalData.executionInfoData = this.executionInfoData
  2769. this.modalData.countersignatureData = this.countersignatureData
  2770. changeRequestUpdate(this.modalData).then(({data}) => {
  2771. if (data && data.code === 0) {
  2772. this.modalData = data.rows.modalData
  2773. this.modalData.menuId = this.$route.meta.menuId
  2774. this.changeTitle = '变更申请-' + this.modalData.changeNo
  2775. this.form = data.rows.form
  2776. this.chooseDataList = data.rows.chooseDataList
  2777. this.costImpactData = data.rows.costImpactData
  2778. this.executionInfoData = data.rows.executionInfoData
  2779. this.executionInfoData.createBy = this.$store.state.user.name
  2780. this.chooseItemList = data.rows.chooseItemList
  2781. this.chooseItemList2 = data.rows.chooseItemList2
  2782. this.chooseCSItemList = data.rows.chooseCSItemList
  2783. this.getDataList()
  2784. this.$message({
  2785. message: '操作成功',
  2786. type: 'success',
  2787. duration: 1500,
  2788. onClose: () => {}
  2789. })
  2790. } else {
  2791. this.$alert(data.msg, '错误', {
  2792. confirmButtonText: '确定'
  2793. })
  2794. }
  2795. })
  2796. },
  2797. // 选择模板属性
  2798. chooseModel () {
  2799. this.chooseModelData = {
  2800. site: this.$store.state.user.site,
  2801. itemNo: '',
  2802. itemDesc: '',
  2803. functionType: 'ECN',
  2804. codeNo: this.chooseItemList.length > 0 ? this.chooseItemList[0].codeNo : this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  2805. }
  2806. // 先清空缓存选中
  2807. this.$nextTick(() => this.$refs.itemTable.clearSelection())
  2808. // 查询所有属性
  2809. getItemList(this.chooseModelData).then(({data}) => {
  2810. if (data && data.code === 0) {
  2811. this.itemList = data.rows
  2812. this.itemList.forEach(val => {
  2813. // 回显选中的部门
  2814. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2815. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  2816. }
  2817. })
  2818. } else {
  2819. this.$alert(data.msg, '错误', {
  2820. confirmButtonText: '确定'
  2821. })
  2822. }
  2823. })
  2824. this.chooseModelFlag = true
  2825. },
  2826. // 查询属性
  2827. searchItemList () {
  2828. getItemList(this.chooseModelData).then(({data}) => {
  2829. if (data.code === 0) {
  2830. this.itemList = data.rows
  2831. }
  2832. })
  2833. },
  2834. // 单机选择
  2835. itemClickRow (row) {
  2836. this.$refs.itemTable.toggleRowSelection(row)
  2837. },
  2838. // 复选属性
  2839. selectionItem (val) {
  2840. this.itemSelections = val
  2841. },
  2842. // 确认多选属性
  2843. confirmItem () {
  2844. if (this.itemSelections.length === 0) {
  2845. this.$message.warning("请勾选属性!")
  2846. return
  2847. }
  2848. this.chooseItemList = this.itemSelections
  2849. this.chooseModelFlag = false
  2850. },
  2851. // 执行所选属性
  2852. executeModal (row) {
  2853. row.executeFlag = 'Y'
  2854. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  2855. // row.executor = this.$store.state.user.name
  2856. },
  2857. // 执行所选属性
  2858. executeCSModal (row) {
  2859. row.executeFlag = 'Y'
  2860. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  2861. row.executor = this.$store.state.user.name
  2862. },
  2863. // 执行所选属性
  2864. executeModal2 (row) {
  2865. row.executeFlag = 'Y'
  2866. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  2867. row.executor = this.$store.state.user.name
  2868. },
  2869. // 编辑执行信息
  2870. executionInformationSave () {
  2871. this.executionInfoData.chooseItemList = this.chooseItemList
  2872. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  2873. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  2874. this.$message.warning('请填写原啤刀编号!')
  2875. return;
  2876. }
  2877. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  2878. this.$message.warning('请填写新啤刀编号!')
  2879. return;
  2880. }
  2881. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  2882. this.$message.warning('请填写原网板/印版编号!')
  2883. return;
  2884. }
  2885. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  2886. this.$message.warning('请填写新网板/印版编号!')
  2887. return;
  2888. }
  2889. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  2890. this.$message.warning('请选择ECN执行日期!')
  2891. return;
  2892. }
  2893. executionUpdate(this.executionInfoData).then(({data}) => {
  2894. if (data && data.code === 0) {
  2895. this.executionInfoData = data.rows.executionInfoData
  2896. this.executionInfoData.createBy = this.$store.state.user.name
  2897. this.chooseItemList = data.rows.chooseItemList
  2898. this.chooseItemList2 = data.rows.chooseItemList2
  2899. this.getDataList()
  2900. this.$message({
  2901. message: '操作成功',
  2902. type: 'success',
  2903. duration: 1500,
  2904. onClose: () => {}
  2905. })
  2906. } else {
  2907. this.$alert(data.msg, '错误', {
  2908. confirmButtonText: '确定'
  2909. })
  2910. }
  2911. })
  2912. },
  2913. // 编辑会签信息
  2914. countersignatureSave () {
  2915. this.countersignatureData.changeNo = this.modalData.changeNo
  2916. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  2917. countersignatureUpdate(this.countersignatureData).then(({data}) => {
  2918. if (data && data.code === 0) {
  2919. this.chooseCSItemList = data.rows.chooseCSItemList
  2920. this.getDataList()
  2921. this.$message({
  2922. message: '操作成功',
  2923. type: 'success',
  2924. duration: 1500,
  2925. onClose: () => {}
  2926. })
  2927. } else {
  2928. this.$alert(data.msg, '错误', {
  2929. confirmButtonText: '确定'
  2930. })
  2931. }
  2932. })
  2933. },
  2934. // 回车换行
  2935. focusNextInput (index, type) {
  2936. let aaa = ''
  2937. if (this.chooseDataList.length - 1 === index) {
  2938. aaa = `${type}0`
  2939. } else {
  2940. aaa = `${type}${index + 1}`
  2941. }
  2942. this.$nextTick(() => {
  2943. this.$refs[aaa].focus()
  2944. })
  2945. },
  2946. // 根据人员编码查人员部门
  2947. getDepartmentByUserName () {
  2948. let tempData = {
  2949. site: this.$store.state.user.site,
  2950. username: this.modalData.applicantId
  2951. }
  2952. getDepartmentByUserName(tempData).then(({data}) => {
  2953. if (data.code === 0) {
  2954. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  2955. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  2956. }
  2957. })
  2958. },
  2959. // ======== chooseList相关方法 ========
  2960. // 获取基础数据列表S
  2961. getBaseList (val, type) {
  2962. this.tagNo = val
  2963. this.tagNo1 = type
  2964. this.$nextTick(() => {
  2965. let strVal = ''
  2966. let conSql = ''
  2967. if (val === 103) {
  2968. if (type === 1) {
  2969. strVal = this.modalData.applicantId
  2970. } else if (type === 3) {
  2971. strVal = this.costImpactData.productionProductExecutor
  2972. } else if (type === 4) {
  2973. strVal = this.costImpactData.inventoryProductExecutor
  2974. } else if (type === 5) {
  2975. strVal = this.costImpactData.affectedExecutor
  2976. } else if (type === 7) {
  2977. strVal = this.tempExecutorRow.executor
  2978. }
  2979. }
  2980. if (val === 133) {
  2981. strVal = this.tempPartRow.newPartNo
  2982. }
  2983. if (val === 2005) {
  2984. strVal = this.modalData.tpEngineerId
  2985. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2986. }
  2987. if (val === 2006) {
  2988. strVal = this.modalData.industrialEngineerId
  2989. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2990. }
  2991. if (val === 2007) {
  2992. strVal = this.modalData.cqcOperatorId
  2993. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2994. }
  2995. if (val === 2008) {
  2996. strVal = this.modalData.faiOperatorId
  2997. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  2998. }
  2999. this.$refs.baseList.init(val, strVal, conSql)
  3000. })
  3001. },
  3002. // 列表方法的回调
  3003. getBaseData (val) {
  3004. if (this.tagNo === 103) {
  3005. if (this.tagNo1 === 1) {
  3006. this.modalData.applicantId = val.username
  3007. this.modalData.applicantName = val.user_display
  3008. this.getDepartmentByUserName()
  3009. } else if (this.tagNo1 === 3) {
  3010. this.costImpactData.productionProductExecutor = val.username
  3011. this.costImpactData.productionProductExecutorName = val.user_display
  3012. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  3013. } else if (this.tagNo1 === 4) {
  3014. this.costImpactData.inventoryProductExecutor = val.username
  3015. this.costImpactData.inventoryProductExecutorName = val.user_display
  3016. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  3017. } else if (this.tagNo1 === 5) {
  3018. this.costImpactData.affectedExecutor = val.username
  3019. this.costImpactData.affectedExecutorName = val.user_display
  3020. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  3021. } else if (this.tagNo1 === 7) {
  3022. this.$set(this.tempExecutorRow,'executor',val.username)
  3023. }
  3024. }
  3025. if (this.tagNo === 133) {
  3026. //this.tempPartRow.newPartNo = val.part_no
  3027. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  3028. }
  3029. if (this.tagNo === 2005) {
  3030. this.modalData.tpEngineerId = val.username
  3031. this.modalData.tpEngineerName = val.user_display
  3032. }
  3033. if (this.tagNo === 2006) {
  3034. this.modalData.industrialEngineerId = val.username
  3035. this.modalData.industrialEngineerName = val.user_display
  3036. }
  3037. if (this.tagNo === 2007) {
  3038. this.modalData.cqcOperatorId = val.username
  3039. this.modalData.cqcOperatorName = val.user_display
  3040. }
  3041. if (this.tagNo === 2008) {
  3042. this.modalData.faiOperatorId = val.username
  3043. this.modalData.faiOperatorName = val.user_display
  3044. }
  3045. },
  3046. // ======== 导出相关方法 ========
  3047. /**
  3048. * 导出excel
  3049. */
  3050. async createExportData () {
  3051. this.searchData.limit = -1
  3052. this.searchData.page = 1
  3053. await changeRecordSearch(this.searchData).then(({data}) => {
  3054. this.resultList = data.page.list
  3055. })
  3056. return this.resultList
  3057. },
  3058. startDownload () {},
  3059. finishDownload () {},
  3060. fields () {
  3061. let json = '{'
  3062. this.columnList.forEach((item, index) => {
  3063. if (index === this.columnList.length - 1) {
  3064. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3065. } else {
  3066. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3067. }
  3068. })
  3069. json += '}'
  3070. let s = eval('(' + json + ')')
  3071. return s
  3072. },
  3073. rowStyle ({row}) {
  3074. if (this.currentRow.changeNo === row.changeNo) {
  3075. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  3076. }
  3077. },
  3078. }
  3079. }
  3080. </script>
  3081. <style scoped lang="scss">
  3082. /deep/ .customer-tab .el-tabs__content {
  3083. padding: 0px !important;
  3084. }
  3085. .numInput /deep/ .el-input__inner{
  3086. text-align: right;
  3087. }
  3088. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3089. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3090. -webkit-appearance: none;
  3091. }
  3092. /deep/ .inlineNumber input[type="number"]{
  3093. -moz-appearance: textfield;
  3094. padding-right: 5px !important;
  3095. }
  3096. </style>