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.

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