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.

5692 lines
230 KiB

2 years ago
2 years ago
2 years ago
2 years ago
3 months ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
2 years ago
12 months ago
12 months ago
1 year ago
1 year ago
2 years ago
12 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
3 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
1 year ago
8 months ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData">
  5. <el-form-item label="BU">
  6. <el-select v-model="searchData.buNo" placeholder="请选择" clearable style="width: 130px">
  7. <el-option
  8. v-for = "i in buList"
  9. :key = "i.buNo"
  10. :label = "i.buNo"
  11. :value = "i.buNo">
  12. </el-option>
  13. </el-select>
  14. </el-form-item>
  15. <el-form-item label="申请编码">
  16. <el-input v-model="searchData.changeNo" clearable style="width: 120px"></el-input>
  17. </el-form-item>
  18. <el-form-item label="变更单状态">
  19. <el-select v-model="searchData.changeStatus" clearable style="width: 100px">
  20. <el-option label="草稿" value="草稿"></el-option>
  21. <el-option label="审批中" value="审批中"></el-option>
  22. <el-option label="已完成" value="已完成"></el-option>
  23. </el-select>
  24. </el-form-item>
  25. <el-form-item label="节点审批人">
  26. <el-input v-model="searchData.createBy2" clearable style="width: 120px"></el-input>
  27. </el-form-item>
  28. <el-form-item label="当前节点">
  29. <el-select v-model="searchData.nodeId" placeholder="请选择节点" clearable style="width: 120px">
  30. <el-option
  31. v-for="option in nodeOptions"
  32. :key="option.id"
  33. :label="option.name"
  34. :value="option.id">
  35. </el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="IFS物料编码">
  39. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  40. </el-form-item>
  41. <el-form-item :label="' '">
  42. <el-button v-if="authSearch" @click="getDataList">查询</el-button>
  43. <download-excel
  44. :fields="fields()"
  45. :data="exportData"
  46. type="xls"
  47. :name="exportName"
  48. :header="exportHeader"
  49. :footer="exportFooter"
  50. :fetch="createExportData"
  51. :before-generate="startDownload"
  52. :before-finish="finishDownload"
  53. worksheet="导出信息"
  54. :class="['el-button', 'el-button--primary', 'el-button--medium', {'is-loading': exportLoading}]">
  55. <i v-if="exportLoading" class="el-icon-loading"></i>
  56. <span>{{ "导出" }}</span>
  57. </download-excel>
  58. <el-button @click="filterVisible = true">搜索</el-button>
  59. <el-button type="warning" @click="closeProcessModal()">流程关闭</el-button>
  60. </el-form-item>
  61. </el-form>
  62. <!-- 变更记录列表 -->
  63. <el-table
  64. :height="height"
  65. :data="dataList"
  66. border
  67. :row-style="rowStyle"
  68. ref="changeTable"
  69. @row-click="changeClickRow"
  70. @current-change="currentChange"
  71. @selection-change="selectionChangeHandle"
  72. style="width: 100%;">
  73. <el-table-column
  74. type="selection"
  75. header-align="center"
  76. align="center"
  77. width="50">
  78. </el-table-column>
  79. <el-table-column
  80. v-for="(item,index) in columnList" :key="index"
  81. :sortable="item.columnSortable"
  82. :prop="item.columnProp"
  83. :header-align="item.headerAlign"
  84. :show-overflow-tooltip="item.showOverflowTooltip"
  85. :align="item.align"
  86. :fixed="item.fixed === ''?false:item.fixed"
  87. :min-width="item.columnWidth"
  88. :label="item.columnLabel">
  89. <template slot-scope="scope">
  90. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  91. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column
  95. fixed="right"
  96. header-align="center"
  97. align="center"
  98. width="100"
  99. label="操作">
  100. <template slot-scope="scope">
  101. <el-link v-if="authUpdate && scope.row.changeStatus !== '已完成'" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  102. <el-link v-if="authUpdate && scope.row.changeStatus === '已完成'" style="cursor: pointer" @click="showModal(scope.row)">详情</el-link>
  103. <el-link v-if="authIssue && scope.row.changeStatus === '草稿'" style="cursor: pointer"
  104. :disabled="!!issueLoadingSet[scope.row.changeNo]"
  105. @click="issueModal(scope.row)">
  106. <i v-if="issueLoadingSet[scope.row.changeNo]" class="el-icon-loading"></i>下达
  107. </el-link>
  108. <el-link v-if="authDelete && scope.row.changeStatus === '草稿'" style="cursor: pointer" @click="deleteChangeRecord(scope.row)">删除</el-link>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <!-- 分页插件 -->
  113. <el-pagination style="margin-top: 0px"
  114. @size-change="sizeChangeHandle"
  115. @current-change="currentChangeHandle"
  116. :current-page="pageIndex"
  117. :page-sizes="[20, 50, 100, 200, 500]"
  118. :page-size="pageSize"
  119. :total="totalPage"
  120. layout="total, sizes, prev, pager, next, jumper">
  121. </el-pagination>
  122. <!-- 变更单模态框 -->
  123. <el-dialog :title="changeTitle" :close-on-click-modal="false" top="10vh" v-drag :visible.sync="modalFlag" width="1060px" :showClose="false">
  124. <el-tabs tab-position="left" :disabled="showModalFlag" type="border-card" v-model="activeName" @tab-click="refreshChangeTab" style="width: 100%;height: 720px;">
  125. <el-tab-pane label="基本信息" name="basicInformation" v-loading="submitLoading">
  126. <div style="height: 675px">
  127. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  128. <el-form-item prop="applicantId" :rules="rules.applicantId">
  129. <span v-if="changeRequestFlag('applicantId') === 'N'" slot="label">申请人/Applicant</span>
  130. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(103, 1)"><a herf="#">申请人/Applicant</a></span>
  131. <el-input v-model="modalData.applicantId" @blur="applicantBlur(103)" :disabled="changeRequestFlag('applicantId') === 'N'" style="width: 120px"></el-input>
  132. <el-input v-model="modalData.applicantName" disabled style="width: 293px"></el-input>
  133. </el-form-item>
  134. <el-form-item label="申请部门/Department">
  135. <el-input v-model="modalData.applicationDepartmentId" disabled style="width: 120px"></el-input>
  136. <el-input v-model="modalData.applicationDepartmentName" disabled style="width: 293px"></el-input>
  137. </el-form-item>
  138. </el-form>
  139. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData" :rules="rules">
  140. <el-form-item label="申请日期/Apply Date" prop="applyDate" :rules="rules.applyDate">
  141. <el-date-picker
  142. :disabled="changeRequestFlag('applyDate') === 'N'"
  143. style="width: 205px"
  144. v-model="modalData.applyDate"
  145. type="date"
  146. value-format="yyyy-MM-dd"
  147. placeholder="请选择日期"
  148. :editable=false>
  149. </el-date-picker>
  150. </el-form-item>
  151. <!-- <el-form-item label="ECN变更影响" prop="changeImpact" :rules="rules.changeImpact">-->
  152. <!-- <dict-data-select v-model="modalData.changeImpact" :disabled="changeRequestFlag('changeImpact') === 'N'" style="width: 205px" dict-type="change_change_Impact"></dict-data-select>-->
  153. <!-- </el-form-item>-->
  154. <el-form-item label="变更影响描述/Description">
  155. <el-input v-model="modalData.changeImpactDesc" :disabled="changeRequestFlag('changeImpactDesc') === 'N'" style="width: 629px"></el-input>
  156. </el-form-item>
  157. </el-form>
  158. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData" :rules="rules">
  159. <el-form-item label="ECN阶段/Stage" prop="ecnStage" :rules="rules.ecnStage">
  160. <dict-data-select v-model="modalData.ecnStage" :disabled="changeRequestFlag('ecnStage') === 'N'" style="width: 95px" dict-type="change_ecn_stage"></dict-data-select>
  161. </el-form-item>
  162. <el-form-item label="变更类别/Change Category" prop="changeType" :rules="rules.changeType">
  163. <dict-data-select v-model="modalData.changeType" :disabled="changeRequestFlag('changeType') === 'N'" style="width: 160px" dict-type="change_change_type"></dict-data-select>
  164. </el-form-item>
  165. <el-form-item label="ECN种类/ECN Category" prop="ecnType" :rules="rules.ecnType">
  166. <dict-data-select v-model="modalData.ecnType" :disabled="changeRequestFlag('ecnType') === 'N'" style="width: 160px" dict-type="change_ecn_type"></dict-data-select>
  167. </el-form-item>
  168. <el-form-item label=" " style="margin-left: -10px">
  169. <el-button :disabled="showModalFlag||changeRequestFlag('ecnType') === 'N'" type="primary" @click="chooseEcnTypeModal" style="width: 70px">ECN种类</el-button>
  170. </el-form-item>
  171. <el-form-item label="变更生效日期/Change Effictive Date" prop="changePhaseInDate" :rules="rules.changePhaseInDate" style="margin-left: -10px">
  172. <el-date-picker
  173. :disabled="changeRequestFlag('changePhaseInDate') === 'N'"
  174. style="width: 205px"
  175. v-model="modalData.changePhaseInDate"
  176. type="date"
  177. value-format="yyyy-MM-dd"
  178. placeholder="请选择日期"
  179. :editable=false>
  180. </el-date-picker>
  181. </el-form-item>
  182. <!-- <el-form-item label="印刷方式" prop="printing" :rules="rules.printing">-->
  183. <!-- <dict-data-select v-model="modalData.printing" style="width: 205px" dict-type="change_printing"></dict-data-select>-->
  184. <!-- </el-form-item>-->
  185. <el-form-item label="是否DF产品/DF(Y/N)" prop="dfIsProduct" :rules="rules.dfIsProduct">
  186. <dict-data-select v-model="modalData.dfIsProduct" :disabled="changeRequestFlag('dfIsProduct') === 'N'" style="width: 108px" dict-type="change_df_is_product"></dict-data-select>
  187. </el-form-item>
  188. </el-form>
  189. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData" :rules="rules">
  190. <el-form-item prop="tpEngineerId" :rules="rules.tpEngineerId">
  191. <span v-if="changeRequestFlag('tpEngineerId') === 'N'" slot="label">TP工程师/CS</span>
  192. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师/CS</a></span>
  193. <el-input v-model="modalData.tpEngineerId" @blur="tpEngineerBlur(2005)" :disabled="changeRequestFlag('tpEngineerId') === 'N'" style="width: 120px"></el-input>
  194. <el-input v-model="modalData.tpEngineerName" disabled style="width: 293px"></el-input>
  195. </el-form-item>
  196. <el-form-item label=" " :required="modalData.dfIsProduct === 'I'" prop="industrialEngineerId" :show-message="false">
  197. <span v-if="changeRequestFlag('industrialEngineerId') === 'N'" slot="label">关务人员/Customs</span>
  198. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2006)"><a herf="#">关务人员/Customs</a></span>
  199. <el-input v-model="modalData.industrialEngineerId" @blur="industrialEngineerBlur(2006)" :disabled="changeRequestFlag('industrialEngineerId') === 'N'" style="width: 120px"></el-input>
  200. <el-input v-model="modalData.industrialEngineerName" disabled style="width: 293px"></el-input>
  201. </el-form-item>
  202. <!-- <el-form-item label="制造成本是否变更" prop="manufacturingCostIsChange" :rules="rules.manufacturingCostIsChange">-->
  203. <!-- <dict-data-select v-model="modalData.manufacturingCostIsChange" style="width: 205px" dict-type="change_manufacturing_cost_is_change"></dict-data-select>-->
  204. <!-- </el-form-item>-->
  205. </el-form>
  206. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData">
  207. <el-form-item label=" ">
  208. <span v-if="changeRequestFlag('cqcOperatorId') === 'N'" slot="label">质检人员/CQC</span>
  209. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2007)"><a herf="#">质检人员/CQC</a></span>
  210. <el-input v-model="modalData.cqcOperatorId" @blur="cqcOperatorBlur(2007)" :disabled="changeRequestFlag('cqcOperatorId') === 'N'" style="width: 120px"></el-input>
  211. <el-input v-model="modalData.cqcOperatorName" disabled style="width: 293px"></el-input>
  212. </el-form-item>
  213. <el-form-item label=" ">
  214. <span v-if="changeRequestFlag('faiOperatorId') === 'N'" slot="label">首件检测/FAI</span>
  215. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2008)"><a herf="#">首件检测/FAI</a></span>
  216. <el-input v-model="modalData.faiOperatorId" @blur="faiOperatorBlur(2008)" :disabled="changeRequestFlag('faiOperatorId') === 'N'" style="width: 120px"></el-input>
  217. <el-input v-model="modalData.faiOperatorName" disabled style="width: 293px"></el-input>
  218. </el-form-item>
  219. </el-form>
  220. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData">
  221. <el-form-item label="DelegateAccess">
  222. <span style="cursor: pointer" slot="label" @click="delegateAccessVisible = true"><a herf="#">DelegateAccess</a></span>
  223. <el-input type="textarea" v-model="delegateAccessName" readonly :rows="2" resize='none' style="width: 848px"></el-input>
  224. </el-form-item>
  225. </el-form>
  226. <el-form :inline="true" :disabled="showModalFlag" label-position="top" :model="modalData" :rules="rules" style="margin-top: 30px">
  227. <el-form-item label="变更要求描述/Requirements Desc." prop="changeRequestDesc" :rules="rules.changeRequestDesc">
  228. <el-input type="textarea" v-model="modalData.changeRequestDesc" :disabled="changeRequestFlag('changeRequestDesc') === 'N'" :rows="3" resize='none' show-word-limit style="width: 636px;height: 30px"></el-input>
  229. </el-form-item>
  230. <!-- <el-form-item label="是否重新报价" prop="isReQuote" :rules="rules.isReQuote">-->
  231. <!-- <dict-data-select v-model="modalData.isReQuote" style="width: 205px" dict-type="change_is_re_quote"></dict-data-select>-->
  232. <!-- </el-form-item>-->
  233. <el-form-item label="印刷方式/Print Type" prop="printing" :rules="rules.printing">
  234. <dict-data-select v-model="modalData.printing" :disabled="changeRequestFlag('printing') === 'N'" style="width: 198px" dict-type="change_printing"></dict-data-select>
  235. </el-form-item>
  236. </el-form>
  237. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: 50px">-->
  238. <!-- <el-form-item label="原产品是否UL认证要求" prop="ulCertificationRequirements" :rules="rules.ulCertificationRequirements">-->
  239. <!-- <dict-data-select v-model="modalData.ulCertificationRequirements" style="width: 423px" dict-type="change_ul_certification_requirements"></dict-data-select>-->
  240. <!-- </el-form-item>-->
  241. <!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="ulContinueToMeetDemand" :rules="rules.ulContinueToMeetDemand">-->
  242. <!-- <dict-data-select v-model="modalData.ulContinueToMeetDemand" style="width: 423px" dict-type="change_ul_continue_to_meet_demand"></dict-data-select>-->
  243. <!-- </el-form-item>-->
  244. <!-- </el-form>-->
  245. <!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">-->
  246. <!-- <el-form-item label="原产品是否GP要求" prop="gpCertificationRequirements" :rules="rules.gpCertificationRequirements">-->
  247. <!-- <dict-data-select v-model="modalData.gpCertificationRequirements" style="width: 423px" dict-type="change_gp_certification_requirements"></dict-data-select>-->
  248. <!-- </el-form-item>-->
  249. <!-- <el-form-item label="如果有,变更后能否继续满足此需求" prop="gpContinueToMeetDemand" :rules="rules.gpContinueToMeetDemand">-->
  250. <!-- <dict-data-select v-model="modalData.gpContinueToMeetDemand" style="width: 423px" dict-type="change_gp_continue_to_meet_demand"></dict-data-select>-->
  251. <!-- </el-form-item>-->
  252. <!-- </el-form>-->
  253. <el-form :inline="true" :disabled="showModalFlag" label-position="top" style="margin-top: 50px">
  254. <el-button type="primary" @click="addChangeDetail">新增</el-button>
  255. <div class="rq">
  256. <el-table
  257. :data="chooseDataList"
  258. height="273px"
  259. border
  260. style="width:100%">
  261. <!-- <el-table-column-->
  262. <!-- v-for="(item,index) in columnChooseDataList" :key="index"-->
  263. <!-- :sortable="item.columnSortable"-->
  264. <!-- :prop="item.columnProp"-->
  265. <!-- :header-align="item.headerAlign"-->
  266. <!-- :show-overflow-tooltip="item.showOverflowTooltip"-->
  267. <!-- :align="item.align"-->
  268. <!-- :fixed="item.fixed == ''?false:item.fixed"-->
  269. <!-- :min-width="item.columnWidth"-->
  270. <!-- :label="item.columnLabel">-->
  271. <!-- <template slot-scope="scope">-->
  272. <!-- <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>-->
  273. <!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>-->
  274. <!-- </template>-->
  275. <!-- </el-table-column>-->
  276. <!-- <el-table-column label="PLM物料编码" header-align="center">-->
  277. <!-- <el-table-column-->
  278. <!-- prop="testPartNo"-->
  279. <!-- header-align="center"-->
  280. <!-- align="left"-->
  281. <!-- min-width="120"-->
  282. <!-- label="PLM Part No.">-->
  283. <!-- </el-table-column>-->
  284. <!-- </el-table-column>-->
  285. <el-table-column label="IFS物料编码" header-align="center">
  286. <el-table-column
  287. prop="partNo"
  288. header-align="center"
  289. align="left"
  290. min-width="120"
  291. label="IFS Part No.">
  292. </el-table-column>
  293. </el-table-column>
  294. <el-table-column label="物料名称" header-align="center">
  295. <el-table-column
  296. prop="partDesc"
  297. header-align="center"
  298. align="left"
  299. min-width="180"
  300. label="Part Desc.">
  301. </el-table-column>
  302. </el-table-column>
  303. <!-- <el-table-column label="图纸编码" header-align="center">-->
  304. <!-- <el-table-column-->
  305. <!-- prop="drawingNo"-->
  306. <!-- header-align="center"-->
  307. <!-- align="center"-->
  308. <!-- min-width="100"-->
  309. <!-- label="Drawing No.">-->
  310. <!-- </el-table-column>-->
  311. <!-- </el-table-column>-->
  312. <!-- <el-table-column label="图稿编码" header-align="center">-->
  313. <!-- <el-table-column-->
  314. <!-- prop="draftNo"-->
  315. <!-- header-align="center"-->
  316. <!-- align="center"-->
  317. <!-- min-width="100"-->
  318. <!-- label="Proof No.">-->
  319. <!-- </el-table-column>-->
  320. <!-- </el-table-column>-->
  321. <el-table-column label="新IFS料号" header-align="center">
  322. <el-table-column
  323. prop=""
  324. header-align="center"
  325. align="center"
  326. min-width="170"
  327. label="New IFS Part No.">
  328. <template slot-scope="scope">
  329. <el-input clearable @keydown.native.prevent @clear="scope.row.newPartNo = ''" :ref="`newPartNo${scope.$index}`" v-model="scope.row.finalPartNo" style="width:77%"></el-input>
  330. <el-button :disabled="showModalFlag||changeRequestDetailFlag('newPartNo') === 'N'" type="primary" @click="choosePartNo(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
  331. </template>
  332. </el-table-column>
  333. </el-table-column>
  334. <el-table-column label="图纸编码" header-align="center">
  335. <el-table-column
  336. prop="drawingNo"
  337. header-align="center"
  338. align="center"
  339. min-width="100"
  340. label="Drawing No.">
  341. </el-table-column>
  342. </el-table-column>
  343. <el-table-column label="图稿编码" header-align="center">
  344. <el-table-column
  345. prop="draftNo"
  346. header-align="center"
  347. align="center"
  348. min-width="100"
  349. label="Proof No.">
  350. </el-table-column>
  351. </el-table-column>
  352. <el-table-column label="新图纸编码" header-align="center">
  353. <el-table-column
  354. prop=""
  355. header-align="center"
  356. align="center"
  357. min-width="110"
  358. label="New Drawing No.">
  359. <template slot-scope="scope">
  360. <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>
  361. </template>
  362. </el-table-column>
  363. </el-table-column>
  364. <el-table-column label="新图稿编码" header-align="center">
  365. <el-table-column
  366. prop=""
  367. header-align="center"
  368. align="center"
  369. min-width="100"
  370. label="New Proof No.">
  371. <template slot-scope="scope">
  372. <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>
  373. </template>
  374. </el-table-column>
  375. </el-table-column>
  376. <el-table-column
  377. fixed="right"
  378. header-align="center"
  379. align="center"
  380. width="60"
  381. label="操作">
  382. <template slot-scope="scope">
  383. <el-link style="cursor: pointer" :disabled="showModalFlag" @click="deleteChooseDataModal(scope.row)">删除</el-link>
  384. </template>
  385. </el-table-column>
  386. </el-table>
  387. </div>
  388. </el-form>
  389. </div>
  390. </el-tab-pane>
  391. <el-tab-pane label="库存成本影响" name="inventoryCostImpact" v-loading="submitLoading">
  392. <div style="height: 675px">
  393. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: -5px;">
  394. <el-form-item style="margin-top: 7px;width: 155px">
  395. <el-checkbox :disabled="showModalFlag||changeCostImpactFlag('productionProductFlag') === 'N'" v-model="costImpactData.productionProductFlag" true-label="Y">在制品<br>On-line product</el-checkbox>
  396. </el-form-item>
  397. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  398. <el-input class="inlineNumber numInput" v-model="costImpactData.productionProductNumber" :disabled="costImpactData.productionProductFlag !== 'Y' || changeCostImpactFlag('productionProductNumber') === 'N'" type="number" style="width: 100px"></el-input>
  399. </el-form-item>
  400. <el-form-item label="处理意见/Disposition">
  401. <!-- <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>-->
  402. <el-input v-model="costImpactData.productionProductOpinions" :disabled="costImpactData.productionProductFlag !== 'Y' || changeCostImpactFlag('productionProductOpinions') === 'N'" style="width: 200px"></el-input>
  403. </el-form-item>
  404. <el-form-item label="报废金额/Scrap Amount">
  405. <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>
  406. </el-form-item>
  407. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  408. <!-- <el-input v-model="costImpactData.productionProductRemark" :disabled="costImpactData.productionProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  409. <!-- </el-form-item>-->
  410. <el-form-item>
  411. <span v-if="costImpactData.productionProductFlag !== 'Y' || changeCostImpactFlag('productionProductExecutor') === 'N'" slot="label">执行人/Executor</span>
  412. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(103, 3)"><a herf="#">执行人/Executor</a></span>
  413. <el-input v-model="costImpactData.productionProductExecutorName" readonly :disabled="costImpactData.productionProductFlag !== 'Y' || changeCostImpactFlag('productionProductExecutor') === 'N'" style="width: 130px"></el-input>
  414. </el-form-item>
  415. </el-form>
  416. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  417. <el-form-item style="margin-top: 7px;width: 155px">
  418. <el-checkbox :disabled="showModalFlag||changeCostImpactFlag('inventoryProductFlag') === 'N'" v-model="costImpactData.inventoryProductFlag" true-label="Y">成品库存<br>FG Stock</el-checkbox>
  419. </el-form-item>
  420. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  421. <el-input class="inlineNumber numInput" v-model="costImpactData.inventoryProductNumber" :disabled="costImpactData.inventoryProductFlag !== 'Y' || changeCostImpactFlag('inventoryProductNumber') === 'N'" type="number" style="width: 100px"></el-input>
  422. </el-form-item>
  423. <el-form-item label="处理意见/Disposition">
  424. <!-- <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>-->
  425. <el-input v-model="costImpactData.inventoryProductOpinions" :disabled="costImpactData.inventoryProductFlag !== 'Y' || changeCostImpactFlag('inventoryProductOpinions') === 'N'" style="width: 200px"></el-input>
  426. </el-form-item>
  427. <el-form-item label="报废金额/Scrap Amount">
  428. <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>
  429. </el-form-item>
  430. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  431. <!-- <el-input v-model="costImpactData.inventoryProductRemark" :disabled="costImpactData.inventoryProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  432. <!-- </el-form-item>-->
  433. <el-form-item>
  434. <span v-if="costImpactData.inventoryProductFlag !== 'Y' || changeCostImpactFlag('inventoryProductExecutor') === 'N'" slot="label">执行人/Executor</span>
  435. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(103, 4)"><a herf="#">执行人/Executor</a></span>
  436. <el-input v-model="costImpactData.inventoryProductExecutorName" readonly :disabled="costImpactData.inventoryProductFlag !== 'Y' || changeCostImpactFlag('inventoryProductExecutor') === 'N'" style="width: 130px"></el-input>
  437. </el-form-item>
  438. </el-form>
  439. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  440. <el-form-item style="margin-top: 7px;width: 155px">
  441. <el-checkbox :disabled="showModalFlag||changeCostImpactFlag('newOrderFlag') === 'N'" v-model="costImpactData.newOrderFlag" true-label="Y">新订单<br>New Order</el-checkbox>
  442. </el-form-item>
  443. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  444. <el-input class="inlineNumber numInput" v-model="costImpactData.newOrderNumber" :disabled="costImpactData.newOrderFlag !== 'Y' || changeCostImpactFlag('newOrderNumber') === 'N'" type="number" style="width: 100px"></el-input>
  445. </el-form-item>
  446. </el-form>
  447. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  448. <el-form-item style="margin-top: 7px;width: 155px">
  449. <el-checkbox :disabled="showModalFlag||changeCostImpactFlag('affectedFlag') === 'N'" v-model="costImpactData.affectedFlag" true-label="Y">影响的原材料及其库存量<br>Raw material influencing and stock</el-checkbox>
  450. </el-form-item>
  451. <el-form-item style="margin-left: 50px" label="数量/Qty.">
  452. <el-input class="inlineNumber numInput" v-model="costImpactData.affectedNumber" :disabled="costImpactData.affectedFlag !== 'Y' || changeCostImpactFlag('affectedNumber') === 'N'" type="number" style="width: 100px"></el-input>
  453. </el-form-item>
  454. <el-form-item label="处理意见/Disposition">
  455. <!-- <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>-->
  456. <el-input v-model="costImpactData.affectedOpinions" :disabled="costImpactData.affectedFlag !== 'Y' || changeCostImpactFlag('affectedOpinions') === 'N'" style="width: 200px"></el-input>
  457. </el-form-item>
  458. <el-form-item label="报废金额/Scrap Amount">
  459. <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>
  460. </el-form-item>
  461. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  462. <!-- <el-input v-model="costImpactData.affectedRemark" :disabled="costImpactData.affectedFlag !== 'Y'" style="width: 300px"></el-input>-->
  463. <!-- </el-form-item>-->
  464. <el-form-item>
  465. <span v-if="costImpactData.affectedFlag !== 'Y' || changeCostImpactFlag('affectedExecutor') === 'N'" slot="label">执行人/Executor</span>
  466. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(103, 5)"><a herf="#">执行人/Executor</a></span>
  467. <el-input v-model="costImpactData.affectedExecutorName" readonly :disabled="costImpactData.affectedFlag !== 'Y' || changeCostImpactFlag('affectedExecutor') === 'N'" style="width: 130px"></el-input>
  468. </el-form-item>
  469. </el-form>
  470. <el-form :inline="true" label-position="top" :model="costImpactData" style="margin-top: 10px;">
  471. <el-form-item label="ECN变更总成本/Total ECN Cost">
  472. <el-input class="inlineNumber numInput" :disabled="showModalFlag" v-model="totalCost" type="number" readonly style="width: 205px"></el-input>
  473. </el-form-item>
  474. <el-form-item label="备注/Remark">
  475. <el-input v-model="costImpactData.remark" :disabled="showModalFlag||changeCostImpactFlag('remark') === 'N'" style="width: 611px"></el-input>
  476. </el-form-item>
  477. </el-form>
  478. <div>
  479. <h3 class="large-bold-text">制造成本变更</h3>
  480. </div>
  481. <el-form ref="dataForm" label-position="right">
  482. <el-row style="padding-top: 10px;height: 150px" :style="{borderTop:'1px solid #ccc'}">
  483. <el-col :span="8">
  484. <el-form-item label="制造成本是否变更">
  485. <el-checkbox v-model="modalData.manuFacturingFlag" true-label="Y"></el-checkbox>
  486. </el-form-item>
  487. </el-col>
  488. <el-col :span="16">
  489. <el-form-item label="If yes,Please write down the detail in information"></el-form-item>
  490. <el-checkbox-group v-model="selectedOptions1" @change="selectedOptions1Change">
  491. <el-checkbox label="工艺变更费用">工艺变更费用</el-checkbox>
  492. <el-checkbox label="材料变更费用">材料变更费用</el-checkbox>
  493. <el-checkbox label="模具变更费用">模具变更费用</el-checkbox>
  494. <el-checkbox label="其他">其他</el-checkbox>
  495. </el-checkbox-group>
  496. <el-form-item label="备注/remark">
  497. <el-input type="textarea" v-model="modalData.manuFacturingCostRemark1" :rows="3" resize='none'></el-input>
  498. </el-form-item>
  499. </el-col>
  500. </el-row>
  501. <el-row style="padding-top: 10px;height: 150px" :style="{borderTop:'1px solid #ccc'}">
  502. <el-col :span="8">
  503. <el-form-item label="是否需要重新报价">
  504. <el-checkbox v-model="modalData.quotationFlag" true-label="Y"></el-checkbox>
  505. </el-form-item>
  506. <el-form-item label="If yes,Please write down the detail in information"></el-form-item>
  507. </el-col>
  508. <el-col :span="16">
  509. <el-form-item label="备注/remark">
  510. <el-input type="textarea" v-model="modalData.manuFacturingCostRemark2" :rows="3" resize='none'></el-input>
  511. </el-form-item>
  512. </el-col>
  513. </el-row>
  514. </el-form>
  515. <!-- <el-form :inline="true" label-position="top" style="margin-top: 10px;">-->
  516. <!-- <el-form-item label=" ">-->
  517. <!-- <el-button type="primary" :disabled="showModalFlag" @click="chooseManuFacturingCostModal" style="width: 95px">制造成本变更</el-button>-->
  518. <!-- </el-form-item>-->
  519. <!-- </el-form>-->
  520. </div>
  521. </el-tab-pane >
  522. <el-tab-pane label="TP&执行信息" name="actionInformation" v-loading="submitLoading">
  523. <div style="height: 670px">
  524. <el-button type="primary" :disabled="showModalFlag" @click="chooseFeasibilityAssessmentModel">选择评估信息</el-button>
  525. <div class="rq">
  526. <el-table
  527. :data="chooseItemList2"
  528. height="232px"
  529. border
  530. style="width: 100%">
  531. <el-table-column
  532. v-for="(item,index) in columnChooseItemList2" :key="index"
  533. :sortable="item.columnSortable"
  534. :prop="item.columnProp"
  535. :header-align="item.headerAlign"
  536. :show-overflow-tooltip="item.showOverflowTooltip"
  537. :align="item.align"
  538. :fixed="item.fixed == ''?false:item.fixed"
  539. :min-width="item.columnWidth"
  540. :label="item.columnLabel">
  541. <template slot-scope="scope">
  542. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  543. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  544. </template>
  545. </el-table-column>
  546. <el-table-column
  547. header-align="center"
  548. align="center"
  549. min-width="60"
  550. label="可选值">
  551. <template slot-scope="scope">
  552. <el-select :disabled="showModalFlag||changeFAItemFlag('chooseValue') === 'N'" v-model="scope.row.chooseValue" placeholder="请选择">
  553. <el-option v-for="item in scope.row.availableValueList" :key="item.availableValue" :label="item.availableValue" :value="item.availableValue"></el-option>
  554. </el-select>
  555. </template>
  556. </el-table-column>
  557. <el-table-column
  558. header-align="center"
  559. align="center"
  560. min-width="120"
  561. label="备注">
  562. <template slot-scope="scope">
  563. <el-input :disabled="showModalFlag||changeFAItemFlag('itemRemark') === 'N'" v-model="scope.row.itemRemark"></el-input>
  564. </template>
  565. </el-table-column>
  566. <!-- <el-table-column-->
  567. <!-- fixed="right"-->
  568. <!-- header-align="center"-->
  569. <!-- align="center"-->
  570. <!-- width="60"-->
  571. <!-- label="操作">-->
  572. <!-- <template slot-scope="scope">-->
  573. <!-- <el-link v-if="scope.row.executeFlag !== 'Y'" style="cursor: pointer" @click="executeModal2(scope.row)">执行</el-link>-->
  574. <!-- </template>-->
  575. <!-- </el-table-column>-->
  576. </el-table>
  577. </div>
  578. <div style="text-align: center;font-size: 11px;margin-top: 5px">
  579. <span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
  580. </div>
  581. <el-form :inline="true" label-position="top" :model="executionInfoData">
  582. <el-form-item label="原菲林编号/Original Film No.">
  583. <el-input :disabled="changeExecutionInfoFlag('originalFilmNo') === 'N'" v-model="executionInfoData.originalFilmNo" style="width: 226px"></el-input>
  584. </el-form-item>
  585. <el-form-item label="原碑刀编号/Original Cutter No.">
  586. <el-input :disabled="changeExecutionInfoFlag('originalDieCuttingRuleNo') === 'N'" v-model="executionInfoData.originalDieCuttingRuleNo" style="width: 226px"></el-input>
  587. </el-form-item>
  588. <el-form-item label="原网板/印版编号/Original Plate No.">
  589. <el-input :disabled="changeExecutionInfoFlag('originalStencilNo') === 'N'" v-model="executionInfoData.originalStencilNo" style="width: 226px"></el-input>
  590. </el-form-item>
  591. <el-form-item label="ECN执行日期/Exec Date">
  592. <el-date-picker :disabled="changeExecutionInfoFlag('executionDate') === 'N'" style="width: 135px" v-model="executionInfoData.executionDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :editable=false></el-date-picker>
  593. </el-form-item>
  594. </el-form>
  595. <el-form :inline="true" label-position="top" :model="executionInfoData" style="margin-top: -5px;">
  596. <el-form-item label="新菲林编号/New Film No.">
  597. <el-input :disabled="changeExecutionInfoFlag('newFilmNo') === 'N'" v-model="executionInfoData.newFilmNo" style="width: 226px"></el-input>
  598. </el-form-item>
  599. <el-form-item label="新碑刀编号/New Cutter No.">
  600. <el-input :disabled="changeExecutionInfoFlag('newDieCuttingRuleNo') === 'N'" v-model="executionInfoData.newDieCuttingRuleNo" style="width: 226px"></el-input>
  601. </el-form-item>
  602. <el-form-item label="新网板/印版编号/New Plate No.">
  603. <el-input :disabled="changeExecutionInfoFlag('newStencilNo') === 'N'" v-model="executionInfoData.newStencilNo" style="width: 226px"></el-input>
  604. </el-form-item>
  605. </el-form>
  606. <div style="text-align: center ;font-size: 11px">
  607. <span> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- </span>
  608. </div>
  609. <el-button type="primary" :disabled="showModalFlag" @click="chooseModel">选择执行信息</el-button>
  610. <div class="rq">
  611. <el-table
  612. :data="chooseItemList"
  613. height="265px"
  614. border
  615. style="width: 100%">
  616. <el-table-column
  617. v-for="(item,index) in columnChooseItemList" :key="index"
  618. :sortable="item.columnSortable"
  619. :prop="item.columnProp"
  620. :header-align="item.headerAlign"
  621. :show-overflow-tooltip="item.showOverflowTooltip"
  622. :align="item.align"
  623. :fixed="item.fixed == ''?false:item.fixed"
  624. :min-width="item.columnWidth"
  625. :label="item.columnLabel">
  626. <template slot-scope="scope">
  627. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  628. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  629. </template>
  630. </el-table-column>
  631. <el-table-column
  632. prop=""
  633. header-align="center"
  634. align="center"
  635. min-width="130"
  636. label="执行人">
  637. <template slot-scope="scope">
  638. <el-input :disabled="showModalFlag||changeItemFlag('executor') === 'N'" @input="(val)=>executorInput(scope.row, val)" v-model="scope.row.executor" style="width:77%"></el-input>
  639. <el-button :disabled="showModalFlag||changeItemFlag('executor') === 'N'" type="primary" @click="chooseExecutor(scope.row)" style="width:18%;padding: 3px 7px">·&nbsp;·&nbsp;·</el-button>
  640. </template>
  641. </el-table-column>
  642. <el-table-column
  643. prop=""
  644. header-align="center"
  645. align="center"
  646. min-width="150"
  647. label="备注">
  648. <template slot-scope="scope">
  649. <el-input :disabled="showModalFlag||changeItemFlag('itemRemark') === 'N'" v-model="scope.row.itemRemark" style="width:98%"></el-input>
  650. </template>
  651. </el-table-column>
  652. <el-table-column
  653. header-align="center"
  654. align="center"
  655. min-width="50"
  656. label="操作">
  657. <template slot-scope="scope">
  658. <el-link v-if="scope.row.executeFlag !== 'Y' && $store.state.user.name === scope.row.executor && modalData.changeStatus === '审批中'" style="cursor: pointer" @click="executeModal(scope.row)">执行</el-link>
  659. </template>
  660. </el-table-column>
  661. </el-table>
  662. </div>
  663. </div>
  664. </el-tab-pane>
  665. <el-tab-pane label="会签信息" name="countersignature" v-loading="submitLoading">
  666. <div style="height: 705px">
  667. <el-form :inline="true" label-position="top" style="margin-top: -19px">
  668. <el-form-item label=" ">
  669. <el-button type="primary" :disabled="showModalFlag" @click="chooseCSModel">选择会签信息</el-button>
  670. </el-form-item>
  671. <el-form-item label="印刷方式/Print Type">
  672. <dict-data-select v-model="modalData.printing" disabled style="width: 198px" dict-type="change_printing"></dict-data-select>
  673. </el-form-item>
  674. </el-form>
  675. <div class="rq">
  676. <el-table
  677. :data="chooseCSItemList"
  678. height="675px"
  679. border
  680. style="width: 100%">
  681. <el-table-column
  682. v-for="(item,index) in columnCSChooseItemList" :key="index"
  683. :sortable="item.columnSortable"
  684. :prop="item.columnProp"
  685. :header-align="item.headerAlign"
  686. :show-overflow-tooltip="item.showOverflowTooltip"
  687. :align="item.align"
  688. :fixed="item.fixed == ''?false:item.fixed"
  689. :min-width="item.columnWidth"
  690. :label="item.columnLabel">
  691. <template slot-scope="scope">
  692. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  693. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  694. </template>
  695. </el-table-column>
  696. <el-table-column
  697. header-align="center"
  698. align="center"
  699. min-width="200"
  700. label="备注">
  701. <template slot-scope="scope">
  702. <el-input :disabled="showModalFlag||changeCountersignatureItemFlag('itemRemark') === 'N'" v-model="scope.row.itemRemark" style="width:98%"></el-input>
  703. </template>
  704. </el-table-column>
  705. <el-table-column
  706. fixed="right"
  707. header-align="center"
  708. align="center"
  709. width="60"
  710. label="操作">
  711. <template slot-scope="scope">
  712. <el-link v-if="scope.row.executeFlag !== 'Y' && $store.state.user.name === scope.row.itemDesc && modalData.changeStatus === '审批中'" :disabled="showModalFlag" style="cursor: pointer" @click="executeCSModal(scope.row)">会签</el-link>
  713. </template>
  714. </el-table-column>
  715. </el-table>
  716. </div>
  717. </div>
  718. </el-tab-pane>
  719. </el-tabs>
  720. <el-footer style="height:35px;margin-top: 15px;text-align:center">
  721. <template v-if="!showModalFlag&&(modalData.changeStatus === '草稿' || (modalData.changeStatus === '审批中' && ((modalData.createBy2 && modalData.createBy2.split(';').includes(createBy2)) || superAdmin)))">
  722. <el-button type="primary" :loading="saveLoading" @click="saveData">保存</el-button>
  723. </template>
  724. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  725. <template v-if="authSubmit">
  726. <template v-if="superAdmin || (modalData.createBy2 && modalData.createBy2.split(';').includes(createBy2))">
  727. <el-button v-if="modalData.changeStatus === '审批中' && modalData.tpProcessControl !== 'Y' && modalData.csProcessControl !== 'Y'" type="primary" :loading="submitLoading" @click="agreeSubmit">同意</el-button>
  728. </template>
  729. </template>
  730. <template v-if="authReject">
  731. <template v-if="superAdmin || (modalData.createBy2 && modalData.createBy2.split(';').includes(createBy2))">
  732. <el-button v-if="modalData.changeStatus === '审批中' && modalData.isReject === 'Y'" type="primary" :loading="submitLoading" @click="submitDataModal">驳回</el-button>
  733. </template>
  734. </template>
  735. </el-footer>
  736. </el-dialog>
  737. <el-dialog title="制造成本变更" :close-on-click-modal="false" v-drag :visible.sync="manuFacturingCostFlag" width="900px">
  738. <el-form ref="dataForm" label-position="right">
  739. <el-row style="padding-top: 10px;height: 150px" :style="{borderTop:'1px solid #ccc'}">
  740. <el-col :span="8">
  741. <el-form-item label="制造成本是否变更">
  742. <el-checkbox v-model="modalData.manuFacturingFlag" true-label="Y"></el-checkbox>
  743. </el-form-item>
  744. </el-col>
  745. <el-col :span="16">
  746. <el-form-item label="If yes,Please write down the detail in information"></el-form-item>
  747. <el-checkbox-group v-model="selectedOptions1" @change="selectedOptions1Change">
  748. <el-checkbox label="工艺变更费用">工艺变更费用</el-checkbox>
  749. <el-checkbox label="材料变更费用">材料变更费用</el-checkbox>
  750. <el-checkbox label="模具变更费用">模具变更费用</el-checkbox>
  751. <el-checkbox label="其他">其他</el-checkbox>
  752. </el-checkbox-group>
  753. <el-form-item label="备注/remark">
  754. <el-input type="textarea" v-model="modalData.manuFacturingCostRemark1" :rows="3" resize='none'></el-input>
  755. </el-form-item>
  756. </el-col>
  757. </el-row>
  758. <el-row style="padding-top: 10px;height: 150px" :style="{borderTop:'1px solid #ccc'}">
  759. <el-col :span="8">
  760. <el-form-item label="是否需要重新报价">
  761. <el-checkbox v-model="modalData.quotationFlag" true-label="Y"></el-checkbox>
  762. </el-form-item>
  763. <el-form-item label="If yes,Please write down the detail in information"></el-form-item>
  764. </el-col>
  765. <el-col :span="16">
  766. <el-form-item label="备注/remark">
  767. <el-input type="textarea" v-model="modalData.manuFacturingCostRemark2" :rows="3" resize='none'></el-input>
  768. </el-form-item>
  769. </el-col>
  770. </el-row>
  771. </el-form>
  772. <el-footer style="height:30px;text-align:center">
  773. <el-button type="primary" @click="saveManuFacturingCostData">保存</el-button>
  774. <el-button type="primary" @click="manuFacturingCostFlag = false">关闭</el-button>
  775. </el-footer>
  776. </el-dialog>
  777. <!-- 页签 -->
  778. <el-tabs v-model="activeTable" style="width: 100%; height: 100%;" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab">
  779. <!-- 基本信息页签 -->
  780. <el-tab-pane label="基本信息" name="basicInformation">
  781. <el-table
  782. :data="detailList"
  783. :height="secondHeight"
  784. border
  785. ref="detailTable"
  786. style="width: 100%;">
  787. <el-table-column
  788. v-for="(item,index) in detailColumnList" :key="index"
  789. :sortable="item.columnSortable"
  790. :prop="item.columnProp"
  791. :header-align="item.headerAlign"
  792. :show-overflow-tooltip="item.showOverflowTooltip"
  793. :align="item.align"
  794. :fixed="item.fixed === '' ? false : item.fixed"
  795. :min-width="item.columnWidth"
  796. :label="item.columnLabel">
  797. <template slot-scope="scope">
  798. <div v-if="item.columnProp === 'oriCodeNo'">
  799. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toMenu(scope.row)"> {{ scope.row[item.columnProp] }}</el-link>
  800. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  801. </div>
  802. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  803. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  804. </template>
  805. </el-table-column>
  806. </el-table>
  807. </el-tab-pane>
  808. <!-- 库存成本影响页签 -->
  809. <el-tab-pane label="库存成本影响" name="inventoryCostImpact">
  810. <div :style="{height: secondHeight - 5 + 'px'}" style="margin-left: 20px;margin-top: 10px">
  811. <el-form :inline="true" label-position="top" :model="currentCostImpactData">
  812. <el-form-item style="margin-top: 20px;width: 155px">
  813. <el-checkbox v-model="currentCostImpactData.productionProductFlag" disabled true-label="Y">在生产品</el-checkbox>
  814. </el-form-item>
  815. <el-form-item label="数量">
  816. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.productionProductNumber" readonly :disabled="currentCostImpactData.productionProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  817. </el-form-item>
  818. <el-form-item label="处理意见">
  819. <!-- <dict-data-select v-model="currentCostImpactData.productionProductOpinions" :disabled="currentCostImpactData.productionProductFlag !== 'Y'" style="width: 130px" dict-type="change_production_product_opinions"></dict-data-select>-->
  820. <el-input v-model="currentCostImpactData.productionProductOpinions" :disabled="currentCostImpactData.productionProductFlag !== 'Y'" style="width: 130px"></el-input>
  821. </el-form-item>
  822. <el-form-item label="报废金额">
  823. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.productionProductScrapAmount" :disabled="currentCostImpactData.productionProductFlag !== 'Y'" type="number" style="width: 140px"></el-input>
  824. </el-form-item>
  825. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  826. <!-- <el-input v-model="currentCostImpactData.productionProductRemark" readonly :disabled="currentCostImpactData.productionProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  827. <!-- </el-form-item>-->
  828. <el-form-item label="执行人">
  829. <el-input v-model="currentCostImpactData.productionProductExecutorName" readonly :disabled="currentCostImpactData.productionProductFlag !== 'Y'" style="width: 130px"></el-input>
  830. </el-form-item>
  831. </el-form>
  832. <el-form :inline="true" label-position="top" :model="currentCostImpactData" style="margin-top: 5px;">
  833. <el-form-item style="margin-top: 20px;width: 155px">
  834. <el-checkbox v-model="currentCostImpactData.inventoryProductFlag" disabled true-label="Y">成品库存</el-checkbox>
  835. </el-form-item>
  836. <el-form-item label="数量">
  837. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.inventoryProductNumber" readonly :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  838. </el-form-item>
  839. <el-form-item label="处理意见">
  840. <!-- <dict-data-select v-model="currentCostImpactData.inventoryProductOpinions" :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" style="width: 130px" dict-type="change_inventory_product_opinions"></dict-data-select>-->
  841. <el-input v-model="currentCostImpactData.inventoryProductOpinions" :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" style="width: 130px"></el-input>
  842. </el-form-item>
  843. <el-form-item label="报废金额">
  844. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.inventoryProductScrapAmount" :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" type="number" style="width: 140px"></el-input>
  845. </el-form-item>
  846. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  847. <!-- <el-input v-model="currentCostImpactData.inventoryProductRemark" readonly :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" style="width: 300px"></el-input>-->
  848. <!-- </el-form-item>-->
  849. <el-form-item label="执行人">
  850. <el-input v-model="currentCostImpactData.inventoryProductExecutorName" :disabled="currentCostImpactData.inventoryProductFlag !== 'Y'" style="width: 130px"></el-input>
  851. </el-form-item>
  852. </el-form>
  853. <el-form :inline="true" label-position="top" :model="currentCostImpactData" style="margin-top: 5px;">
  854. <el-form-item style="margin-top: 20px;width: 155px">
  855. <el-checkbox v-model="currentCostImpactData.newOrderFlag" disabled true-label="Y">新订单</el-checkbox>
  856. </el-form-item>
  857. <el-form-item label="数量">
  858. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.newOrderNumber" readonly :disabled="currentCostImpactData.newOrderFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  859. </el-form-item>
  860. </el-form>
  861. <el-form :inline="true" label-position="top" :model="currentCostImpactData" style="margin-top: 5px;">
  862. <el-form-item style="margin-top: 20px;width: 155px">
  863. <el-checkbox v-model="currentCostImpactData.affectedFlag" disabled true-label="Y">影响的原材料及其库存量</el-checkbox>
  864. </el-form-item>
  865. <el-form-item label="数量">
  866. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.affectedNumber" readonly :disabled="currentCostImpactData.affectedFlag !== 'Y'" type="number" style="width: 100px"></el-input>
  867. </el-form-item>
  868. <el-form-item label="处理意见">
  869. <!-- <dict-data-select v-model="currentCostImpactData.affectedOpinions" :disabled="currentCostImpactData.affectedFlag !== 'Y'" style="width: 130px" dict-type="change_affected_opinions"></dict-data-select>-->
  870. <el-input v-model="currentCostImpactData.affectedOpinions" :disabled="currentCostImpactData.affectedFlag !== 'Y'" style="width: 130px"></el-input>
  871. </el-form-item>
  872. <el-form-item label="报废金额">
  873. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.affectedScrapAmount" :disabled="currentCostImpactData.affectedFlag !== 'Y'" type="number" style="width: 140px"></el-input>
  874. </el-form-item>
  875. <!-- <el-form-item label=" " style="margin-left: -10px">-->
  876. <!-- <el-input v-model="currentCostImpactData.affectedRemark" readonly :disabled="currentCostImpactData.affectedFlag !== 'Y'" style="width: 300px"></el-input>-->
  877. <!-- </el-form-item>-->
  878. <el-form-item label="执行人">
  879. <el-input v-model="currentCostImpactData.affectedExecutorName" :disabled="currentCostImpactData.affectedFlag !== 'Y'" style="width: 130px"></el-input>
  880. </el-form-item>
  881. </el-form>
  882. <el-form :inline="true" label-position="top" :model="currentCostImpactData" style="margin-top: 5px;">
  883. <el-form-item label="ECN变更总成本" style="width: 155px">
  884. <el-input class="inlineNumber numInput" v-model="currentCostImpactData.changeTotalCost" readonly type="number" style="width: 125px"></el-input>
  885. </el-form-item>
  886. <el-form-item label="备注">
  887. <el-input v-model="currentCostImpactData.remark" readonly style="width: 300px"></el-input>
  888. </el-form-item>
  889. </el-form>
  890. </div>
  891. </el-tab-pane>
  892. <!-- TP&执行信息 -->
  893. <el-tab-pane label="TP&执行信息" name="actionInformation">
  894. <el-row :gutter="5">
  895. <el-col :span="9">
  896. <div >
  897. <el-table
  898. :data="currentChooseItemList2"
  899. :height="secondHeight"
  900. border>
  901. <el-table-column
  902. v-for="(item,index) in columnChooseItemList2" :key="index"
  903. :sortable="item.columnSortable"
  904. :prop="item.columnProp"
  905. :header-align="item.headerAlign"
  906. :show-overflow-tooltip="item.showOverflowTooltip"
  907. :align="item.align"
  908. :fixed="item.fixed == ''?false:item.fixed"
  909. :min-width="item.columnWidth"
  910. :label="item.columnLabel">
  911. <template slot-scope="scope">
  912. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  913. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  914. </template>
  915. </el-table-column>
  916. <el-table-column
  917. prop="chooseValue"
  918. header-align="center"
  919. align="center"
  920. min-width="60"
  921. label="可选值">
  922. </el-table-column>
  923. <el-table-column
  924. prop="itemRemark"
  925. header-align="center"
  926. align="center"
  927. min-width="120"
  928. label="备注">
  929. </el-table-column>
  930. </el-table>
  931. </div>
  932. </el-col>
  933. <el-col :span="4">
  934. <div>
  935. <el-form label-position="top" :model="currentExecutionInfoData">
  936. <el-row :gutter="5">
  937. <el-col :span="12">
  938. <el-form-item label="原菲林编号">
  939. <el-input disabled v-model="currentExecutionInfoData.originalFilmNo" ></el-input>
  940. </el-form-item>
  941. </el-col>
  942. <el-col :span="12">
  943. <el-form-item label="新菲林编号">
  944. <el-input disabled v-model="currentExecutionInfoData.newFilmNo" ></el-input>
  945. </el-form-item>
  946. </el-col>
  947. <el-col :span="12">
  948. <el-form-item label="原碑刀编号">
  949. <el-input disabled v-model="currentExecutionInfoData.originalDieCuttingRuleNo" ></el-input>
  950. </el-form-item>
  951. </el-col>
  952. <el-col :span="12">
  953. <el-form-item label="新碑刀编号">
  954. <el-input disabled v-model="currentExecutionInfoData.newDieCuttingRuleNo" ></el-input>
  955. </el-form-item>
  956. </el-col>
  957. <el-col :span="12">
  958. <el-form-item label="原网板/印版编号">
  959. <el-input disabled v-model="currentExecutionInfoData.originalStencilNo" ></el-input>
  960. </el-form-item>
  961. </el-col>
  962. <el-col :span="12">
  963. <el-form-item label="新网板/印版编号">
  964. <el-input disabled v-model="currentExecutionInfoData.newStencilNo" ></el-input>
  965. </el-form-item>
  966. </el-col>
  967. <el-col :span="12">
  968. <el-form-item label="ECN执行日期">
  969. <el-date-picker disabled style="width: 100%" v-model="currentExecutionInfoData.executionDate" type="date" value-format="yyyy-MM-dd" :editable=false></el-date-picker>
  970. </el-form-item>
  971. </el-col>
  972. </el-row>
  973. </el-form>
  974. </div>
  975. </el-col>
  976. <el-col :span="11">
  977. <div>
  978. <el-table
  979. :data="currentChooseItemList"
  980. :height="secondHeight"
  981. border>
  982. <el-table-column
  983. v-for="(item,index) in columnChooseItemList" :key="index"
  984. :sortable="item.columnSortable"
  985. :prop="item.columnProp"
  986. :header-align="item.headerAlign"
  987. :show-overflow-tooltip="item.showOverflowTooltip"
  988. :align="item.align"
  989. :fixed="item.fixed == ''?false:item.fixed"
  990. :min-width="item.columnWidth"
  991. :label="item.columnLabel">
  992. <template slot-scope="scope">
  993. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  994. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  995. </template>
  996. </el-table-column>
  997. <el-table-column
  998. prop="executor"
  999. header-align="center"
  1000. align="center"
  1001. min-width="130"
  1002. label="执行人">
  1003. </el-table-column>
  1004. <el-table-column
  1005. prop="itemRemark"
  1006. header-align="center"
  1007. align="center"
  1008. min-width="150"
  1009. label="备注">
  1010. </el-table-column>
  1011. </el-table>
  1012. </div>
  1013. </el-col>
  1014. </el-row>
  1015. </el-tab-pane>
  1016. <!-- 会签信息 -->
  1017. <el-tab-pane label="会签信息" name="countersignature">
  1018. <el-table
  1019. :data="currentChooseCSItemList"
  1020. :height="secondHeight"
  1021. border
  1022. style="width: 100%">
  1023. <el-table-column
  1024. v-for="(item,index) in columnCSChooseItemList" :key="index"
  1025. :sortable="item.columnSortable"
  1026. :prop="item.columnProp"
  1027. :header-align="item.headerAlign"
  1028. :show-overflow-tooltip="item.showOverflowTooltip"
  1029. :align="item.align"
  1030. :fixed="item.fixed == ''?false:item.fixed"
  1031. :min-width="item.columnWidth"
  1032. :label="item.columnLabel">
  1033. <template slot-scope="scope">
  1034. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1035. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1036. </template>
  1037. </el-table-column>
  1038. <el-table-column
  1039. prop="itemRemark"
  1040. header-align="center"
  1041. align="center"
  1042. min-width="200"
  1043. label="备注">
  1044. </el-table-column>
  1045. </el-table>
  1046. </el-tab-pane>
  1047. <!-- 附件信息页签 -->
  1048. <el-tab-pane label="附件信息" name="fileInformation">
  1049. <oss-components
  1050. :save-visible="authFileSave"
  1051. :download-visible="authFileDownLoad"
  1052. :remove-visible="authFileRemove"
  1053. :preview-visible="authFilePreview"
  1054. :disabled="currentRow.changeStatus === '已完成'"
  1055. label="变更单号"
  1056. :height="secondHeight - 25"
  1057. style="margin-top: 2px"
  1058. :columns="fileColumnList"
  1059. :order-ref2="currentRow.changeNo"
  1060. :order-ref1="currentRow.site">
  1061. </oss-components>
  1062. </el-tab-pane>
  1063. <!-- 审批信息 -->
  1064. <el-tab-pane label="审批信息" name="approvalInformation">
  1065. <approval-information ref="approvalTable" v-model:data-list="approvalList" :height="secondHeight"></approval-information>
  1066. </el-tab-pane>
  1067. </el-tabs>
  1068. <!-- ECN种类模态框 -->
  1069. <el-dialog title="ECN种类" :close-on-click-modal="false" v-drag :visible.sync="ecnTypeModalFlag" width="900px">
  1070. <el-form ref="dataForm" label-position="right">
  1071. <el-row v-for="(item, index) in form" :key="index" style="padding-top: 10px;" :style="{borderTop:index === 0?'':'1px solid #ccc'}">
  1072. <el-col :span="8">
  1073. <el-form-item :prop="'input.'+index+'.value'">
  1074. <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>
  1075. </el-form-item>
  1076. </el-col>
  1077. <el-col :span="16">
  1078. <div v-for="i in item.list">
  1079. <el-form-item :prop="'input.'+index+'.value'">
  1080. <el-checkbox v-model="i.flag" @change="(val)=>ecnTypeDetailChange(val,index)" true-label="Y">{{i.value}}</el-checkbox>
  1081. </el-form-item>
  1082. </div>
  1083. </el-col>
  1084. </el-row>
  1085. </el-form>
  1086. <el-footer style="height:30px;text-align:center">
  1087. <el-button type="primary" @click="saveEcnTypeData">保存</el-button>
  1088. <el-button type="primary" @click="ecnTypeModalFlag = false">关闭</el-button>
  1089. </el-footer>
  1090. </el-dialog>
  1091. <!-- ECN模板属性清单 -->
  1092. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag" width="820px">
  1093. <div class="rq">
  1094. <el-form :inline="true" label-position="top" :model="chooseModelData">
  1095. <el-form-item :label="'模板'">
  1096. <el-select value="roleName" v-model="chooseModelData.codeNo" placeholder="请选择" style="width: 120px">
  1097. <el-option
  1098. v-for = "i in modelList"
  1099. :key = "i.codeNo"
  1100. :label = "i.codeDesc"
  1101. :value = "i.codeNo">
  1102. </el-option>
  1103. </el-select>
  1104. </el-form-item>
  1105. <el-form-item label="属性编码">
  1106. <el-input v-model="chooseModelData.itemNo" clearable style="width: 120px"></el-input>
  1107. </el-form-item>
  1108. <el-form-item label="属性名称">
  1109. <el-input v-model="chooseModelData.itemDesc" clearable style="width: 120px"></el-input>
  1110. </el-form-item>
  1111. <el-form-item :label="' '">
  1112. <el-button type="primary" @click="searchItemList">查询</el-button>
  1113. </el-form-item>
  1114. </el-form>
  1115. <el-table
  1116. :height="300"
  1117. :data="itemList"
  1118. ref="itemTable"
  1119. @row-click="itemClickRow"
  1120. @selection-change="selectionItem"
  1121. border
  1122. style="width: 100%;">
  1123. <el-table-column
  1124. type="selection"
  1125. header-align="center"
  1126. align="center"
  1127. width="50">
  1128. </el-table-column>
  1129. <el-table-column
  1130. v-for="(item,index) in columnItemList" :key="index"
  1131. :sortable="item.columnSortable"
  1132. :prop="item.columnProp"
  1133. :header-align="item.headerAlign"
  1134. :show-overflow-tooltip="item.showOverflowTooltip"
  1135. :align="item.align"
  1136. :fixed="item.fixed==''?false:item.fixed"
  1137. :min-width="item.columnWidth"
  1138. :label="item.columnLabel">
  1139. <template slot-scope="scope">
  1140. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1141. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1142. </template>
  1143. </el-table-column>
  1144. </el-table>
  1145. </div>
  1146. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1147. <el-button type="primary" @click="confirmItem">确认</el-button>
  1148. <el-button type="primary" @click="chooseModelFlag = false">关闭</el-button>
  1149. </el-footer>
  1150. </el-dialog>
  1151. <!-- ECN模板属性清单 -->
  1152. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseModelFlag2" width="820px">
  1153. <div class="rq">
  1154. <el-form :inline="true" label-position="top" :model="chooseModelData2">
  1155. <el-form-item :label="'模板'">
  1156. <el-select v-model="chooseModelData2.codeNo" placeholder="请选择" style="width: 120px">
  1157. <el-option
  1158. v-for = "i in modelList2"
  1159. :key = "i.codeNo"
  1160. :label = "i.codeDesc"
  1161. :value = "i.codeNo">
  1162. </el-option>
  1163. </el-select>
  1164. </el-form-item>
  1165. <el-form-item label="属性编码">
  1166. <el-input v-model="chooseModelData2.itemNo" clearable style="width: 120px"></el-input>
  1167. </el-form-item>
  1168. <el-form-item label="属性名称">
  1169. <el-input v-model="chooseModelData2.itemDesc" clearable style="width: 120px"></el-input>
  1170. </el-form-item>
  1171. <el-form-item :label="' '">
  1172. <el-button type="primary" @click="searchItemList2">查询</el-button>
  1173. </el-form-item>
  1174. </el-form>
  1175. <el-table
  1176. :height="300"
  1177. :data="itemList2"
  1178. ref="itemTable2"
  1179. @row-click="itemClickRow2"
  1180. @selection-change="selectionItem2"
  1181. border
  1182. style="width: 100%;">
  1183. <el-table-column
  1184. type="selection"
  1185. header-align="center"
  1186. align="center"
  1187. width="50">
  1188. </el-table-column>
  1189. <el-table-column
  1190. v-for="(item,index) in columnItemList2" :key="index"
  1191. :sortable="item.columnSortable"
  1192. :prop="item.columnProp"
  1193. :header-align="item.headerAlign"
  1194. :show-overflow-tooltip="item.showOverflowTooltip"
  1195. :align="item.align"
  1196. :fixed="item.fixed==''?false:item.fixed"
  1197. :min-width="item.columnWidth"
  1198. :label="item.columnLabel">
  1199. <template slot-scope="scope">
  1200. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1201. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1202. </template>
  1203. </el-table-column>
  1204. </el-table>
  1205. </div>
  1206. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1207. <el-button type="primary" @click="confirmItem2">确认</el-button>
  1208. <el-button type="primary" @click="chooseModelFlag2 = false">关闭</el-button>
  1209. </el-footer>
  1210. </el-dialog>
  1211. <!-- 会签模板属性清单 -->
  1212. <el-dialog title="属性清单" :close-on-click-modal="false" v-drag :visible.sync="chooseCSModelFlag" width="820px">
  1213. <div class="rq">
  1214. <el-form :inline="true" label-position="top" :model="chooseCSModelData">
  1215. <el-form-item :label="'模板'">
  1216. <el-select value="roleName" v-model="chooseCSModelData.codeNo" placeholder="请选择" style="width: 120px">
  1217. <el-option
  1218. v-for = "i in modelCSList"
  1219. :key = "i.codeNo"
  1220. :label = "i.codeDesc"
  1221. :value = "i.codeNo">
  1222. </el-option>
  1223. </el-select>
  1224. </el-form-item>
  1225. <el-form-item label="属性编码">
  1226. <el-input v-model="chooseCSModelData.itemNo" clearable style="width: 120px"></el-input>
  1227. </el-form-item>
  1228. <el-form-item label="属性名称">
  1229. <el-input v-model="chooseCSModelData.itemDesc" clearable style="width: 120px"></el-input>
  1230. </el-form-item>
  1231. <el-form-item :label="' '">
  1232. <el-button type="primary" @click="searchCSItemList()">查询</el-button>
  1233. </el-form-item>
  1234. </el-form>
  1235. <el-table
  1236. :height="300"
  1237. :data="itemCSList"
  1238. ref="itemCSTable"
  1239. @row-click="itemCSClickRow"
  1240. @selection-change="selectionCSItem"
  1241. border
  1242. style="width: 100%;">
  1243. <el-table-column
  1244. type="selection"
  1245. header-align="center"
  1246. align="center"
  1247. width="50">
  1248. </el-table-column>
  1249. <el-table-column
  1250. v-for="(item,index) in columnCSItemList" :key="index"
  1251. :sortable="item.columnSortable"
  1252. :prop="item.columnProp"
  1253. :header-align="item.headerAlign"
  1254. :show-overflow-tooltip="item.showOverflowTooltip"
  1255. :align="item.align"
  1256. :fixed="item.fixed==''?false:item.fixed"
  1257. :min-width="item.columnWidth"
  1258. :label="item.columnLabel">
  1259. <template slot-scope="scope">
  1260. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1261. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1262. </template>
  1263. </el-table-column>
  1264. </el-table>
  1265. </div>
  1266. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1267. <el-button type="primary" @click="confirmCSItem">确认</el-button>
  1268. <el-button type="primary" @click="chooseCSModelFlag = false">关闭</el-button>
  1269. </el-footer>
  1270. </el-dialog>
  1271. <!-- 提交 -->
  1272. <el-dialog title="驳回" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="submitModalFlag" width="500px">
  1273. <el-form :inline="true" label-position="top">
  1274. <el-form-item :label="'驳回意见'">
  1275. <el-input type="textarea" v-model="rejectOpinion" :rows="3" resize='none' show-word-limit style="width: 479px;height: 30px"></el-input>
  1276. </el-form-item>
  1277. </el-form>
  1278. <el-footer style="height:30px;margin-top: 50px;text-align:center">
  1279. <el-button type="primary" @click="rejectSubmit">确定</el-button>
  1280. <el-button type="primary" @click="submitModalFlag = false">取消</el-button>
  1281. </el-footer>
  1282. </el-dialog>
  1283. <!-- 可选技术参数卡清单 -->
  1284. <el-dialog title="技术参数卡清单" :close-on-click-modal="false" v-drag :visible.sync="addDetailModal" width="881px">
  1285. <div class="rq">
  1286. <el-form :inline="true" label-position="top" :model="searchData2">
  1287. <el-form-item :label="'BU'">
  1288. <el-select v-model="searchData2.buNo" disabled style="width: 70px">
  1289. <el-option
  1290. v-for = "i in buList"
  1291. :key = "i.buNo"
  1292. :label = "i.buNo"
  1293. :value = "i.buNo">
  1294. </el-option>
  1295. </el-select>
  1296. </el-form-item>
  1297. <el-form-item label="技术参数卡编码">
  1298. <el-input v-model="searchData2.codeNo" clearable style="width: 120px"></el-input>
  1299. </el-form-item>
  1300. <el-form-item label="PLM物料编码">
  1301. <el-input v-model="searchData2.testPartNo" clearable style="width: 120px"></el-input>
  1302. </el-form-item>
  1303. <el-form-item label="IFS物料编码">
  1304. <el-input v-model="searchData2.partNo" clearable style="width: 120px"></el-input>
  1305. </el-form-item>
  1306. <el-form-item label="客户编码">
  1307. <el-input v-model="searchData2.customerId" clearable style="width: 120px"></el-input>
  1308. </el-form-item>
  1309. <el-form-item label="项目号">
  1310. <el-input v-model="searchData2.projectId" clearable style="width: 120px"></el-input>
  1311. </el-form-item>
  1312. <el-form-item :label="' '">
  1313. <el-button type="primary" @click="addChangeDetail()">查询</el-button>
  1314. </el-form-item>
  1315. </el-form>
  1316. <el-table
  1317. :height="300"
  1318. :data="dataList2"
  1319. @selection-change="selectionData2"
  1320. border
  1321. style="width: 100%;">
  1322. <el-table-column
  1323. type="selection"
  1324. header-align="center"
  1325. align="center"
  1326. width="50">
  1327. </el-table-column>
  1328. <el-table-column
  1329. v-for="(item,index) in columnList2" :key="index"
  1330. :sortable="item.columnSortable"
  1331. :prop="item.columnProp"
  1332. :header-align="item.headerAlign"
  1333. :show-overflow-tooltip="item.showOverflowTooltip"
  1334. :align="item.align"
  1335. :fixed="item.fixed==''?false:item.fixed"
  1336. :min-width="item.columnWidth"
  1337. :label="item.columnLabel">
  1338. <template slot-scope="scope">
  1339. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1340. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1341. </template>
  1342. </el-table-column>
  1343. </el-table>
  1344. </div>
  1345. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1346. <el-button type="primary" @click="addDetail">确认</el-button>
  1347. <el-button type="primary" @click="addDetailModal = false">关闭</el-button>
  1348. </el-footer>
  1349. </el-dialog>
  1350. <!-- 物料模态框 -->
  1351. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="940px">
  1352. <div class="rq">
  1353. <el-form :inline="true" label-position="top" :model="partData">
  1354. <el-form-item :label="'IFS物料编码'">
  1355. <el-input v-model="partData.finalPartNo" clearable style="width: 120px"></el-input>
  1356. </el-form-item>
  1357. <el-form-item :label="'PLM物料编码'">
  1358. <el-input v-model="partData.testPartNo" clearable style="width: 120px"></el-input>
  1359. </el-form-item>
  1360. <el-form-item :label="'客户料号'">
  1361. <el-input v-model="partData.customerPartNo" clearable style="width: 120px"></el-input>
  1362. </el-form-item>
  1363. <el-form-item :label="'物料名称'">
  1364. <el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
  1365. </el-form-item>
  1366. <el-form-item :label="' '">
  1367. <el-button type="primary" @click="queryPartList()">查询</el-button>
  1368. </el-form-item>
  1369. </el-form>
  1370. <el-table
  1371. :height="300"
  1372. :data="partList"
  1373. @row-dblclick="getRowData"
  1374. border
  1375. style="width: 100%;">
  1376. <el-table-column
  1377. v-for="(item,index) in partColumnList" :key="index"
  1378. :sortable="item.columnSortable"
  1379. :prop="item.columnProp"
  1380. :header-align="item.headerAlign"
  1381. :show-overflow-tooltip="item.showOverflowTooltip"
  1382. :align="item.align"
  1383. :fixed="item.fixed==''?false:item.fixed"
  1384. :min-width="item.columnWidth"
  1385. :label="item.columnLabel">
  1386. <template slot-scope="scope">
  1387. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  1388. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  1389. </template>
  1390. </el-table-column>
  1391. </el-table>
  1392. <!-- 分页插件 -->
  1393. <el-pagination
  1394. style="margin-top: 5px"
  1395. @size-change="sizeChangeHandle2"
  1396. @current-change="currentChangeHandle2"
  1397. :current-page="pageIndex2"
  1398. :page-sizes="[20, 50, 100, 200, 500]"
  1399. :page-size="pageSize2"
  1400. :total="totalPage2"
  1401. layout="total, sizes, prev, pager, next, jumper">
  1402. </el-pagination>
  1403. </div>
  1404. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  1405. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  1406. </el-footer>
  1407. </el-dialog>
  1408. <el-dialog title="人员选择" @open="openDelegateAccess" @close="closeDelegateAccess" v-drag :visible.sync="delegateAccessVisible" width="40vw">
  1409. <el-form :inline="true" label-position="top" :model="changeDelegateAccess">
  1410. <el-form-item label="编码">
  1411. <el-input v-model="changeDelegateAccess.delegateAccess" clearable style="width: 120px"></el-input>
  1412. </el-form-item>
  1413. <el-form-item label="名称">
  1414. <el-input v-model="changeDelegateAccess.delegateAccessName" clearable style="width: 120px"></el-input>
  1415. </el-form-item>
  1416. <el-form-item label=" ">
  1417. <el-button type="primary" @click="searchDelegateAccessByUser()">查询</el-button>
  1418. </el-form-item>
  1419. </el-form>
  1420. <el-table
  1421. v-if="delegateAccessVisible"
  1422. :height="300"
  1423. :data="baseDelegateAccessList"
  1424. @selection-change="handleSelectionChange"
  1425. @row-click="(row,column, event)=>handleTableClick(row,column, event,'delegateAccesstTable')"
  1426. ref="delegateAccesstTable"
  1427. border row-key="delegateAccess"
  1428. style="width: 100%;">
  1429. <el-table-column
  1430. type="selection"
  1431. header-align="center"
  1432. align="center"
  1433. :reserve-selection="true"
  1434. width="50">
  1435. </el-table-column>
  1436. <el-table-column label="编码" property="delegateAccess" align="left" header-align="center"/>
  1437. <el-table-column label="名称" property="delegateAccessName" align="left" header-align="center"/>
  1438. </el-table>
  1439. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1440. <el-button type="primary" @click="confirmDelegateAccess">确定</el-button>
  1441. <el-button type="primary" @click="delegateAccessVisible=false">关闭</el-button>
  1442. </el-footer>
  1443. </el-dialog>
  1444. <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
  1445. <!-- 上传文件的modal -->
  1446. <changeUploadFile ref="changeUploadFile" @refreshPageTables="getChangeFileList" v-drag></changeUploadFile>
  1447. <upload-file-list title="工程变更文件上传" :label="'变更单号'" :no="currentRow.changeNo" :file-list.sync="chooseFileList" :upload-dialog.sync="uploadDialog" path="/upload/test"></upload-file-list>
  1448. <filter-search :visible.sync="filterVisible" @search="queryByAnyField"></filter-search>
  1449. </div>
  1450. </template>
  1451. <script>
  1452. import {
  1453. changeRecordSearch, // 获取工程变更记录列表
  1454. changeDetailSearch, // 变更单详情的列表
  1455. changeFileSearch, // 变更单文件的列表
  1456. deleteChangeFile, // 删除变更单文件
  1457. costImpactSearch, // 查询库存成本影响
  1458. costImpactUpdate, // 编辑库存成本影响
  1459. executionInfoSearch, // 查询执行信息
  1460. requestDetailSearch, // 查询变更明细
  1461. deleteChangeDetail, // 删除变更明细
  1462. getDepartmentByUserName, // 根据用户编码获得用户部门
  1463. changeRequestUpdate, // 编辑变更单基础信息
  1464. getEcnModel, // 查询ECN的模板
  1465. getChooseEcnType, // 查询所选择的ECN种类
  1466. getItemList, // 查询模板属性
  1467. executionUpdate, // 修改执行信息
  1468. countersignatureSearch, // 查询会签信息
  1469. countersignatureUpdate, // 编辑会签信息
  1470. issueChange, // 下达
  1471. submitChange, // 提交
  1472. tpExecute, // TP执行
  1473. csExecute, // 会签执行
  1474. checkProcessControl, // 校验流程节点特殊管控权限
  1475. getNodeAuthority, // 获取节点权限
  1476. getApprovalList, // 查询审批信息
  1477. getBuBySite, // 根据site查bu
  1478. technicalSpecificationSearch2, // 获取技术参数卡列表
  1479. choosePartNoList, // 根据视图查物料计划
  1480. checkSuperAdmin, // 校验是否为超级管理员
  1481. searchDelegateAccess,
  1482. deleteTempChangeInfo, // 删除临时变更数据
  1483. closeProcess,
  1484. } from '@/api/changeManagement/changeManagement.js'
  1485. import {
  1486. getNodeList
  1487. } from "@/api/sampleManagement/technicalSpecificationList.js"
  1488. import ChooseList from '@/views/modules/common/Chooselist'
  1489. import {verifyData} from "@/api/chooselist/chooselist.js"
  1490. import changeUploadFile from "../base/upload_file.vue"
  1491. import {downLoadQuotationFile} from '@/api/quotation/quotationInformation.js'
  1492. import DictDataSelect from "../sys/dict-data-select.vue"
  1493. import UploadFileList from "../common/uploadFileList.vue"
  1494. import ApprovalInformation from "./approvalInformation.vue";
  1495. import OssComponents from "../oss/ossComponents.vue";
  1496. import FilterSearch from "../../common/filterSearch.vue";
  1497. import {changeRecordSearchAny, technicalSpecificationSearchAny} from "../../../api/changeManagement/changeManagement";
  1498. import {searchDelegateAccessByUser} from "@/api/proofing/proofingInformation.js"
  1499. export default {
  1500. components: {
  1501. FilterSearch,
  1502. OssComponents,
  1503. ApprovalInformation,
  1504. UploadFileList,
  1505. DictDataSelect,
  1506. changeUploadFile,
  1507. ChooseList,
  1508. },
  1509. computed: {
  1510. delegateAccessName: {
  1511. get() {
  1512. return this.selectionDelegateAccess.map(item => item.delegateAccessName).join(';')
  1513. },
  1514. set(val) {
  1515. }
  1516. },
  1517. totalCost: {
  1518. get () {
  1519. let total = 0
  1520. if (this.costImpactData.productionProductFlag === 'Y') {
  1521. total += +this.costImpactData.productionProductScrapAmount
  1522. }
  1523. if (this.costImpactData.inventoryProductFlag === 'Y') {
  1524. total += +this.costImpactData.inventoryProductScrapAmount
  1525. }
  1526. if (this.costImpactData.affectedFlag === 'Y') {
  1527. total += +this.costImpactData.affectedScrapAmount
  1528. }
  1529. return total
  1530. }
  1531. },
  1532. changeRequestFlag () {
  1533. return (value) => {
  1534. if (!this.plmChangeRequestArr){
  1535. return 'N'
  1536. }
  1537. let arr = this.plmChangeRequestArr.filter(a => a.fieldId === value)
  1538. if (arr.length > 0) {
  1539. return arr[0].updateFlag
  1540. }
  1541. return 'N'
  1542. }
  1543. },
  1544. changeRequestDetailFlag () {
  1545. return (value) => {
  1546. if (!this.plmChangeRequestDetailArr){
  1547. return 'N'
  1548. }
  1549. let arr = this.plmChangeRequestDetailArr.filter(a => a.fieldId === value)
  1550. if (arr.length > 0) {
  1551. return arr[0].updateFlag
  1552. }
  1553. return 'N'
  1554. }
  1555. },
  1556. changeCostImpactFlag () {
  1557. return (value) => {
  1558. if (!this.plmChangeCostImpactArr){
  1559. return 'N'
  1560. }
  1561. let arr = this.plmChangeCostImpactArr.filter(a => a.fieldId === value)
  1562. if (arr.length > 0) {
  1563. return arr[0].updateFlag
  1564. }
  1565. return 'N'
  1566. }
  1567. },
  1568. changeFAItemFlag () {
  1569. return (value) => {
  1570. if (!this.plmChangeFAItemArr){
  1571. return 'N'
  1572. }
  1573. let arr = this.plmChangeFAItemArr.filter(a => a.fieldId === value)
  1574. if (arr.length > 0) {
  1575. return arr[0].updateFlag
  1576. }
  1577. return 'N'
  1578. }
  1579. },
  1580. changeExecutionInfoFlag () {
  1581. return (value) => {
  1582. if (!this.plmChangeExecutionInfoArr){
  1583. return 'N'
  1584. }
  1585. let arr = this.plmChangeExecutionInfoArr.filter(a => a.fieldId === value)
  1586. if (arr.length > 0) {
  1587. return arr[0].updateFlag
  1588. }
  1589. return 'N'
  1590. }
  1591. },
  1592. changeItemFlag () {
  1593. return (value) => {
  1594. if (!this.plmChangeItemArr){
  1595. return 'N'
  1596. }
  1597. let arr = this.plmChangeItemArr.filter(a => a.fieldId === value)
  1598. if (arr.length > 0) {
  1599. return arr[0].updateFlag
  1600. }
  1601. return 'N'
  1602. }
  1603. },
  1604. changeCountersignatureItemFlag () {
  1605. return (value) => {
  1606. if (!this.plmChangeCountersignatureItemArr){
  1607. return 'N'
  1608. }
  1609. let arr = this.plmChangeCountersignatureItemArr.filter(a => a.fieldId === value)
  1610. if (arr.length > 0) {
  1611. return arr[0].updateFlag
  1612. }
  1613. return 'N'
  1614. }
  1615. },
  1616. },
  1617. watch: {
  1618. modalData: {
  1619. deep: true,
  1620. handler: function (newV, oldV) {
  1621. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  1622. this.modalData.tpEngineerName = ''
  1623. }
  1624. if (this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) {
  1625. this.modalData.industrialEngineerName = ''
  1626. }
  1627. if (this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) {
  1628. this.modalData.cqcOperatorName = ''
  1629. }
  1630. if (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null) {
  1631. this.modalData.faiOperatorName = ''
  1632. }
  1633. }
  1634. },
  1635. uploadDialog (newValue,oldValue) {
  1636. if (newValue === false) {
  1637. this.getChangeFileList()
  1638. }
  1639. },
  1640. 'costImpactData.productionProductFlag': function(newVal) {
  1641. if (newVal !== 'Y') {
  1642. this.costImpactData.productionProductNumber = ''
  1643. this.costImpactData.productionProductOpinions = ''
  1644. this.costImpactData.productionProductScrapAmount = 0
  1645. this.costImpactData.productionProductExecutor = ''
  1646. this.costImpactData.productionProductExecutorName = ''
  1647. }
  1648. },
  1649. 'costImpactData.inventoryProductFlag': function(newVal) {
  1650. if (newVal !== 'Y') {
  1651. this.costImpactData.inventoryProductNumber = ''
  1652. this.costImpactData.inventoryProductOpinions = ''
  1653. this.costImpactData.inventoryProductScrapAmount = 0
  1654. this.costImpactData.inventoryProductExecutor = ''
  1655. this.costImpactData.inventoryProductExecutorName = ''
  1656. }
  1657. },
  1658. 'costImpactData.newOrderFlag': function(newVal) {
  1659. if (newVal !== 'Y') {
  1660. this.costImpactData.newOrderNumber = ''
  1661. }
  1662. },
  1663. 'costImpactData.affectedFlag': function(newVal) {
  1664. if (newVal !== 'Y') {
  1665. this.costImpactData.affectedNumber = ''
  1666. this.costImpactData.affectedOpinions = ''
  1667. this.costImpactData.affectedScrapAmount = 0
  1668. this.costImpactData.affectedExecutor = ''
  1669. this.costImpactData.affectedExecutorName = ''
  1670. }
  1671. },
  1672. },
  1673. data () {
  1674. return {
  1675. exportLoading: false,
  1676. buList: [],
  1677. // DelegateAccess 相关
  1678. selectionDelegateAccess: [],
  1679. selectionDelegateAccess2: [],
  1680. delegateAccessVisible: false,
  1681. baseDelegateAccessList: [],
  1682. changeDelegateAccess: {
  1683. delegateAccess: '',
  1684. delegateAccessName: '',
  1685. },
  1686. // 导出
  1687. exportData: [],
  1688. exportName: '工程变更记录' + this.dayjs().format('YYYYMMDDHHmmss'),
  1689. exportHeader: ['工程变更记录'],
  1690. exportFooter: [],
  1691. resultList: [],
  1692. changeSelections: [],
  1693. // ======== 行高 ========
  1694. height: 200,
  1695. secondHeight: 200,
  1696. // ======== 分页 ========
  1697. pageIndex: 1,
  1698. pageSize: 50,
  1699. totalPage: 0,
  1700. pageIndex2: 1,
  1701. pageSize2: 20,
  1702. totalPage2: 0,
  1703. // 条件查询
  1704. searchData: {
  1705. site: this.$store.state.user.site,
  1706. changeNo: '',
  1707. changeStatus: '',
  1708. menuId: this.$route.meta.menuId,
  1709. buNo: '',
  1710. page: 1,
  1711. limit: 10,
  1712. nodeId: '',
  1713. createBy2: '',
  1714. partNo: ''
  1715. },
  1716. searchData2: {
  1717. site: this.$store.state.user.site,
  1718. partNo: '',
  1719. testPartNo: '',
  1720. partDesc: '',
  1721. customerId: '',
  1722. customerDesc: '',
  1723. projectId: '',
  1724. projectDesc: '',
  1725. codeNo: '',
  1726. buNo: '',
  1727. },
  1728. // 初始页签
  1729. activeTable: 'basicInformation',
  1730. activeName: 'basicInformation',
  1731. rejectOpinion: '',
  1732. tempPartRow: {},
  1733. tempExecutorRow: {},
  1734. changeTitle: '',
  1735. plmChangeRequestArr: [],
  1736. plmChangeRequestDetailArr: [],
  1737. plmChangeCostImpactArr: [],
  1738. plmChangeFAItemArr: [],
  1739. plmChangeExecutionInfoArr: [],
  1740. plmChangeItemArr: [],
  1741. plmChangeCountersignatureItemArr: [],
  1742. selectedOptions1:[],
  1743. // ======== 数据对象 ========
  1744. modalData: {
  1745. site: this.$store.state.user.site,
  1746. changeNo: '',
  1747. applicantId: '',
  1748. applicantName: '',
  1749. applicationDepartmentId: '',
  1750. applicationDepartmentName: '',
  1751. applyDate: '',
  1752. ecnType: '',
  1753. changeImpact: '',
  1754. changeImpactDesc: '',
  1755. ecnStage: '',
  1756. changeType: '',
  1757. tpEngineerId: '',
  1758. tpEngineerName: '',
  1759. changePhaseInDate: '',
  1760. dfIsProduct: '',
  1761. printing: '',
  1762. manufacturingCostIsChange: '',
  1763. changeRequestDesc: '',
  1764. isReQuote: '',
  1765. ulCertificationRequirements: '',
  1766. ulContinueToMeetDemand: '',
  1767. gpCertificationRequirements: '',
  1768. gpContinueToMeetDemand: '',
  1769. detailList: [],
  1770. ecnTypeData: [],
  1771. industrialEngineerId: '',
  1772. industrialEngineerName: '',
  1773. changeStatus: '',
  1774. cqcOperatorId: '',
  1775. cqcOperatorName: '',
  1776. faiOperatorId: '',
  1777. faiOperatorName: '',
  1778. nodeConclusion: '',
  1779. stepId: '',
  1780. rejectFlag: '',
  1781. rejectStepId: '',
  1782. isReject: '',
  1783. menuId: this.$route.meta.menuId,
  1784. userName: this.$store.state.user.name,
  1785. rejectOpinion: '',
  1786. nodeId: '',
  1787. buNo: '',
  1788. createBy2: '',
  1789. tpProcessControl: '',
  1790. csProcessControl: ''
  1791. },
  1792. costImpactData: {
  1793. site: this.$store.state.user.site,
  1794. changeNo: '',
  1795. productionProductFlag: '',
  1796. inventoryProductFlag: '',
  1797. newOrderFlag: '',
  1798. affectedFlag: '',
  1799. productionProductNumber: '',
  1800. productionProductOpinions: '',
  1801. productionProductScrapAmount: 0,
  1802. productionProductRemark: '',
  1803. productionProductExecutor: '',
  1804. productionProductExecutorName: '',
  1805. inventoryProductNumber: '',
  1806. inventoryProductOpinions: '',
  1807. inventoryProductScrapAmount: 0,
  1808. inventoryProductRemark: '',
  1809. inventoryProductExecutor: '',
  1810. inventoryProductExecutorName: '',
  1811. newOrderNumber: '',
  1812. affectedNumber: '',
  1813. affectedOpinions: '',
  1814. affectedScrapAmount: 0,
  1815. affectedRemark: '',
  1816. affectedExecutor: '',
  1817. affectedExecutorName: '',
  1818. changeTotalCost: '',
  1819. remark: '',
  1820. createBy: '',
  1821. updateBy: ''
  1822. },
  1823. executionInfoData: {
  1824. site: this.$store.state.user.site,
  1825. changeNo: '',
  1826. originalFilmNo: '',
  1827. newFilmNo: '',
  1828. originalDieCuttingRuleNo: '',
  1829. newDieCuttingRuleNo: '',
  1830. originalStencilNo: '',
  1831. newStencilNo: '',
  1832. executionDate: '',
  1833. createBy: '',
  1834. updateBy: '',
  1835. chooseItemList: [],
  1836. chooseItemList2: []
  1837. },
  1838. chooseModelData: {
  1839. site: this.$store.state.user.site,
  1840. functionType: 'ECN',
  1841. itemNo: '',
  1842. itemDesc: '',
  1843. codeNo: ''
  1844. },
  1845. chooseModelData2: {
  1846. site: this.$store.state.user.site,
  1847. functionType: 'ECN',
  1848. itemNo: '',
  1849. itemDesc: '',
  1850. codeNo: ''
  1851. },
  1852. chooseCSModelData: {
  1853. site: this.$store.state.user.site,
  1854. functionType: 'ECN',
  1855. itemNo: '',
  1856. itemDesc: '',
  1857. codeNo: ''
  1858. },
  1859. countersignatureData: {
  1860. site: this.$store.state.user.site,
  1861. changeNo: '',
  1862. createBy: '',
  1863. updateBy: '',
  1864. chooseCSItemList: []
  1865. },
  1866. partData: {
  1867. site: '',
  1868. buNo: '',
  1869. finalPartNo: '',
  1870. testPartNo: '',
  1871. customerPartNo: '',
  1872. partDesc: '',
  1873. page: 1,
  1874. limit: 10
  1875. },
  1876. // ======== 数据列表 ========
  1877. dataList: [],
  1878. dataList2: [],
  1879. detailList: [],
  1880. fileList: [],
  1881. chooseItemList: [],
  1882. chooseItemList2: [],
  1883. chooseCSItemList: [],
  1884. chooseDataList: [],
  1885. form: [],
  1886. modelList: [],
  1887. modelList2: [],
  1888. modelCSList: [],
  1889. itemList: [],
  1890. itemList2: [],
  1891. itemCSList: [],
  1892. chooseFileList: [],
  1893. approvalList: [],
  1894. partList: [],
  1895. nodeOptions: [],
  1896. // ======== 列表表头 ========
  1897. columnList: [
  1898. {
  1899. userId: this.$store.state.user.name,
  1900. functionId: 108002,
  1901. serialNumber: '108002Table1BuNo',
  1902. tableId: '108002Table1',
  1903. tableName: '工程变更记录表',
  1904. columnProp: 'buNo',
  1905. headerAlign: 'center',
  1906. align: 'center',
  1907. columnLabel: 'BU',
  1908. columnHidden: false,
  1909. columnImage: false,
  1910. status: true,
  1911. fixed: '',
  1912. columnWidth: 80
  1913. },
  1914. {
  1915. userId: this.$store.state.user.name,
  1916. functionId: 108002,
  1917. serialNumber: '108002Table1ChangeNo',
  1918. tableId: '108002Table1',
  1919. tableName: '工程变更记录表',
  1920. columnProp: 'changeNo',
  1921. headerAlign: 'center',
  1922. align: 'left',
  1923. columnLabel: '申请编号',
  1924. columnHidden: false,
  1925. columnImage: false,
  1926. status: true,
  1927. fixed: '',
  1928. columnWidth: 120
  1929. },
  1930. {
  1931. userId: this.$store.state.user.name,
  1932. functionId: 108002,
  1933. serialNumber: '108002Table1ApplicantName',
  1934. tableId: '108002Table1',
  1935. tableName: '工程变更记录表',
  1936. columnProp: 'applicantName',
  1937. headerAlign: 'center',
  1938. align: 'left',
  1939. columnLabel: '申请人',
  1940. columnHidden: false,
  1941. columnImage: false,
  1942. status: true,
  1943. fixed: '',
  1944. columnWidth: 120
  1945. },
  1946. {
  1947. userId: this.$store.state.user.name,
  1948. functionId: 108002,
  1949. serialNumber: '108002Table1DepartmentName',
  1950. tableId: '108002Table1',
  1951. tableName: '工程变更记录表',
  1952. columnProp: 'applicationDepartmentName',
  1953. headerAlign: 'center',
  1954. align: 'left',
  1955. columnLabel: '申请部门',
  1956. columnHidden: false,
  1957. columnImage: false,
  1958. status: true,
  1959. fixed: '',
  1960. columnWidth: 120
  1961. },
  1962. {
  1963. userId: this.$store.state.user.name,
  1964. functionId: 108002,
  1965. serialNumber: '108002Table1ChangeStatus',
  1966. tableId: '108002Table1',
  1967. tableName: '工程变更记录表',
  1968. columnProp: 'changeStatus',
  1969. headerAlign: 'center',
  1970. align: 'left',
  1971. columnLabel: '变更单状态',
  1972. columnHidden: false,
  1973. columnImage: false,
  1974. status: true,
  1975. fixed: '',
  1976. columnWidth: 100
  1977. },
  1978. {
  1979. userId: this.$store.state.user.name,
  1980. functionId: 108002,
  1981. serialNumber: '108002Table1NodeName',
  1982. tableId: '108002Table1',
  1983. tableName: '工程变更记录表',
  1984. columnProp: 'nodeName',
  1985. headerAlign: 'center',
  1986. align: 'left',
  1987. columnLabel: '当前节点',
  1988. columnHidden: false,
  1989. columnImage: false,
  1990. status: true,
  1991. fixed: '',
  1992. columnWidth: 150
  1993. },
  1994. {
  1995. userId: this.$store.state.user.name,
  1996. functionId: 108002,
  1997. serialNumber: '108002Table1EcnStage',
  1998. tableId: '108002Table1',
  1999. tableName: '工程变更记录表',
  2000. columnProp: 'ecnStage',
  2001. headerAlign: 'center',
  2002. align: 'left',
  2003. columnLabel: 'ECN阶段',
  2004. columnHidden: false,
  2005. columnImage: false,
  2006. status: true,
  2007. fixed: '',
  2008. columnWidth: 100
  2009. },
  2010. {
  2011. userId: this.$store.state.user.name,
  2012. functionId: 108002,
  2013. serialNumber: '108002Table1ChangeType',
  2014. tableId: '108002Table1',
  2015. tableName: '工程变更记录表',
  2016. columnProp: 'changeType',
  2017. headerAlign: 'center',
  2018. align: 'left',
  2019. columnLabel: '变更类别',
  2020. columnHidden: false,
  2021. columnImage: false,
  2022. status: true,
  2023. fixed: '',
  2024. columnWidth: 100
  2025. },
  2026. {
  2027. userId: this.$store.state.user.name,
  2028. functionId: 108002,
  2029. serialNumber: '108002Table1EcnType',
  2030. tableId: '108002Table1',
  2031. tableName: '工程变更记录表',
  2032. columnProp: 'ecnType',
  2033. headerAlign: 'center',
  2034. align: 'left',
  2035. columnLabel: 'ECN种类',
  2036. columnHidden: false,
  2037. columnImage: false,
  2038. status: true,
  2039. fixed: '',
  2040. columnWidth: 100
  2041. },
  2042. {
  2043. userId: this.$store.state.user.name,
  2044. functionId: 108002,
  2045. serialNumber: '108002Table1ApplyDate',
  2046. tableId: '108002Table1',
  2047. tableName: '工程变更记录表',
  2048. columnProp: 'applyDate',
  2049. headerAlign: 'center',
  2050. align: 'center',
  2051. columnLabel: '申请日期',
  2052. columnHidden: false,
  2053. columnImage: false,
  2054. status: true,
  2055. fixed: '',
  2056. columnWidth: 100
  2057. },
  2058. {
  2059. userId: this.$store.state.user.name,
  2060. functionId: 108002,
  2061. serialNumber: '108002Table1ChangePhaseInDate',
  2062. tableId: '108002Table1',
  2063. tableName: '工程变更记录表',
  2064. columnProp: 'changePhaseInDate',
  2065. headerAlign: 'center',
  2066. align: 'center',
  2067. columnLabel: '变更生效日期',
  2068. columnHidden: false,
  2069. columnImage: false,
  2070. status: true,
  2071. fixed: '',
  2072. columnWidth: 100
  2073. },
  2074. // {
  2075. // userId: this.$store.state.user.name,
  2076. // functionId: 108002,
  2077. // serialNumber: '108002Table1xxx',
  2078. // tableId: '108002Table1',
  2079. // tableName: '工程变更记录表',
  2080. // columnProp: 'xxx',
  2081. // headerAlign: 'center',
  2082. // align: 'center',
  2083. // columnLabel: 'ECN执行日期',
  2084. // columnHidden: false,
  2085. // columnImage: false,
  2086. // status: true,
  2087. // fixed: '',
  2088. // columnWidth: 100
  2089. // },
  2090. {
  2091. userId: this.$store.state.user.name,
  2092. functionId: 108002,
  2093. serialNumber: '108002Table1CreateBy2',
  2094. tableId: '108002Table1',
  2095. tableName: '工程变更记录表',
  2096. columnProp: 'createBy2',
  2097. headerAlign: 'center',
  2098. align: 'left',
  2099. columnLabel: '当前节点审批人',
  2100. columnHidden: false,
  2101. columnImage: false,
  2102. status: true,
  2103. fixed: '',
  2104. columnWidth: 100
  2105. },
  2106. ],
  2107. columnList2: [
  2108. {
  2109. columnProp: 'buNo',
  2110. headerAlign: 'center',
  2111. align: 'center',
  2112. columnLabel: 'BU',
  2113. columnHidden: false,
  2114. columnImage: false,
  2115. status: true,
  2116. fixed: '',
  2117. columnWidth: 70
  2118. },
  2119. {
  2120. columnProp: 'testPartNo',
  2121. headerAlign: 'center',
  2122. align: 'left',
  2123. columnLabel: 'PLM物料编码',
  2124. columnHidden: false,
  2125. columnImage: false,
  2126. status: true,
  2127. fixed: '',
  2128. columnWidth: 120
  2129. },
  2130. {
  2131. columnProp: 'partNo',
  2132. headerAlign: 'center',
  2133. align: 'left',
  2134. columnLabel: 'IFS物料编码',
  2135. columnHidden: false,
  2136. columnImage: false,
  2137. status: true,
  2138. fixed: '',
  2139. columnWidth: 120
  2140. },
  2141. {
  2142. columnProp: 'partDesc',
  2143. headerAlign: 'center',
  2144. align: 'left',
  2145. columnLabel: '物料名称',
  2146. columnHidden: false,
  2147. columnImage: false,
  2148. status: true,
  2149. fixed: '',
  2150. columnWidth: 200
  2151. },
  2152. {
  2153. columnProp: 'projectId',
  2154. headerAlign: 'center',
  2155. align: 'center',
  2156. columnLabel: '项目号',
  2157. columnHidden: false,
  2158. columnImage: false,
  2159. status: true,
  2160. fixed: '',
  2161. columnWidth: 120
  2162. },
  2163. {
  2164. columnProp: 'projectDesc',
  2165. headerAlign: 'center',
  2166. align: 'left',
  2167. columnLabel: '项目名称',
  2168. columnHidden: false,
  2169. columnImage: false,
  2170. status: true,
  2171. fixed: '',
  2172. columnWidth: 180
  2173. },
  2174. {
  2175. columnProp: 'customerId',
  2176. headerAlign: 'center',
  2177. align: 'center',
  2178. columnLabel: '客户编码',
  2179. columnHidden: false,
  2180. columnImage: false,
  2181. status: true,
  2182. fixed: '',
  2183. columnWidth: 120
  2184. },
  2185. {
  2186. columnProp: 'customerDesc',
  2187. headerAlign: 'center',
  2188. align: 'left',
  2189. columnLabel: '客户名称',
  2190. columnHidden: false,
  2191. columnImage: false,
  2192. status: true,
  2193. fixed: '',
  2194. columnWidth: 180
  2195. },
  2196. {
  2197. columnProp: 'oriCodeNo',
  2198. headerAlign: 'center',
  2199. align: 'center',
  2200. columnLabel: '技术参数卡',
  2201. columnHidden: false,
  2202. columnImage: false,
  2203. status: true,
  2204. fixed: '',
  2205. columnWidth: 120
  2206. },
  2207. {
  2208. columnProp: 'ecnFlag',
  2209. headerAlign: 'center',
  2210. align: 'center',
  2211. columnLabel: '状态',
  2212. columnHidden: false,
  2213. columnImage: false,
  2214. status: true,
  2215. fixed: '',
  2216. columnWidth: 100
  2217. },
  2218. {
  2219. columnProp: 'revNo',
  2220. headerAlign: 'center',
  2221. align: 'center',
  2222. columnLabel: '版本号',
  2223. columnHidden: false,
  2224. columnImage: false,
  2225. status: true,
  2226. fixed: '',
  2227. columnWidth: 80
  2228. },
  2229. ],
  2230. detailColumnList: [
  2231. // {
  2232. // userId: this.$store.state.user.name,
  2233. // functionId: 108002,
  2234. // serialNumber: '108002Table2PlmPartNo',
  2235. // tableId: '108002Table2',
  2236. // tableName: '变更单基本信息表',
  2237. // columnProp: 'testPartNo',
  2238. // headerAlign: 'center',
  2239. // align: 'left',
  2240. // columnLabel: 'PLM物料编码',
  2241. // columnHidden: false,
  2242. // columnImage: false,
  2243. // status: true,
  2244. // fixed: '',
  2245. // columnWidth: 120
  2246. // },
  2247. {
  2248. userId: this.$store.state.user.name,
  2249. functionId: 108002,
  2250. serialNumber: '108002Table2PartNo',
  2251. tableId: '108002Table2',
  2252. tableName: '变更单基本信息表',
  2253. columnProp: 'partNo',
  2254. headerAlign: 'center',
  2255. align: 'left',
  2256. columnLabel: 'IFS物料编码',
  2257. columnHidden: false,
  2258. columnImage: false,
  2259. status: true,
  2260. fixed: '',
  2261. columnWidth: 120
  2262. },
  2263. {
  2264. userId: this.$store.state.user.name,
  2265. functionId: 108002,
  2266. serialNumber: '108002Table2PartDesc',
  2267. tableId: '108002Table2',
  2268. tableName: '变更单基本信息表',
  2269. columnProp: 'partDesc',
  2270. headerAlign: 'center',
  2271. align: 'left',
  2272. columnLabel: '物料名称',
  2273. columnHidden: false,
  2274. columnImage: false,
  2275. status: true,
  2276. fixed: '',
  2277. columnWidth: 200
  2278. },
  2279. {
  2280. userId: this.$store.state.user.name,
  2281. functionId: 108002,
  2282. serialNumber: '108002Table2NewPartNo',
  2283. tableId: '108002Table2',
  2284. tableName: '变更单基本信息表',
  2285. columnProp: 'newPartNo',
  2286. headerAlign: 'center',
  2287. align: 'left',
  2288. columnLabel: '新IFS料号',
  2289. columnHidden: false,
  2290. columnImage: false,
  2291. status: true,
  2292. fixed: '',
  2293. columnWidth: 120
  2294. },
  2295. {
  2296. userId: this.$store.state.user.name,
  2297. functionId: 108002,
  2298. serialNumber: '108002Table2OriCodeNo',
  2299. tableId: '108002Table2',
  2300. tableName: '变更单基本信息表',
  2301. columnProp: 'oriCodeNo',
  2302. headerAlign: 'center',
  2303. align: 'center',
  2304. columnLabel: '技术参数卡编码',
  2305. columnHidden: false,
  2306. columnImage: false,
  2307. status: true,
  2308. fixed: '',
  2309. columnWidth: 120
  2310. },
  2311. {
  2312. userId: this.$store.state.user.name,
  2313. functionId: 108002,
  2314. serialNumber: '108002Table2RevNo',
  2315. tableId: '108002Table2',
  2316. tableName: '变更单基本信息表',
  2317. columnProp: 'revNo',
  2318. headerAlign: 'center',
  2319. align: 'right',
  2320. columnLabel: '版本号',
  2321. columnHidden: false,
  2322. columnImage: false,
  2323. status: true,
  2324. fixed: '',
  2325. columnWidth: 60
  2326. },
  2327. {
  2328. userId: this.$store.state.user.name,
  2329. functionId: 108002,
  2330. serialNumber: '108002Table2NewDrawingNo',
  2331. tableId: '108002Table2',
  2332. tableName: '变更单基本信息表',
  2333. columnProp: 'newDrawingNo',
  2334. headerAlign: 'center',
  2335. align: 'center',
  2336. columnLabel: '新图纸编码',
  2337. columnHidden: false,
  2338. columnImage: false,
  2339. status: true,
  2340. fixed: '',
  2341. columnWidth: 100
  2342. },
  2343. {
  2344. userId: this.$store.state.user.name,
  2345. functionId: 108002,
  2346. serialNumber: '108002Table2NewDraftNo',
  2347. tableId: '108002Table2',
  2348. tableName: '变更单基本信息表',
  2349. columnProp: 'newDraftNo',
  2350. headerAlign: 'center',
  2351. align: 'center',
  2352. columnLabel: '新图稿编码',
  2353. columnHidden: false,
  2354. columnImage: false,
  2355. status: true,
  2356. fixed: '',
  2357. columnWidth: 100
  2358. },
  2359. {
  2360. userId: this.$store.state.user.name,
  2361. functionId: 108002,
  2362. serialNumber: '108002Table2CustomerDesc',
  2363. tableId: '108002Table2',
  2364. tableName: '变更单基本信息表',
  2365. columnProp: 'customerDesc',
  2366. headerAlign: 'center',
  2367. align: 'right',
  2368. columnLabel: '客户名称',
  2369. columnHidden: false,
  2370. columnImage: false,
  2371. status: true,
  2372. fixed: '',
  2373. columnWidth: 60
  2374. },
  2375. {
  2376. userId: this.$store.state.user.name,
  2377. functionId: 108002,
  2378. serialNumber: '108002Table2BuDesc',
  2379. tableId: '108002Table2',
  2380. tableName: '变更单基本信息表',
  2381. columnProp: 'buDesc',
  2382. headerAlign: 'center',
  2383. align: 'right',
  2384. columnLabel: 'BU',
  2385. columnHidden: false,
  2386. columnImage: false,
  2387. status: true,
  2388. fixed: '',
  2389. columnWidth: 60
  2390. },
  2391. {
  2392. userId: this.$store.state.user.name,
  2393. functionId: 108002,
  2394. serialNumber: '108002Table2DirectCustomer',
  2395. tableId: '108002Table2',
  2396. tableName: '变更单基本信息表',
  2397. columnProp: 'directCustomer',
  2398. headerAlign: 'center',
  2399. align: 'right',
  2400. columnLabel: '直接客户',
  2401. columnHidden: false,
  2402. columnImage: false,
  2403. status: true,
  2404. fixed: '',
  2405. columnWidth: 60
  2406. },
  2407. {
  2408. userId: this.$store.state.user.name,
  2409. functionId: 108002,
  2410. serialNumber: '108002Table2PartCategory',
  2411. tableId: '108002Table2',
  2412. tableName: '变更单基本信息表',
  2413. columnProp: 'partCategory',
  2414. headerAlign: 'center',
  2415. align: 'right',
  2416. columnLabel: '产品类别',
  2417. columnHidden: false,
  2418. columnImage: false,
  2419. status: true,
  2420. fixed: '',
  2421. columnWidth: 60
  2422. }
  2423. ],
  2424. fileColumnList: [
  2425. {
  2426. userId: this.$store.state.user.name,
  2427. functionId: 108002,
  2428. serialNumber: '108002Table3FileName',
  2429. tableId: '108002Table2',
  2430. tableName: '文件信息表',
  2431. columnProp: 'fileName',
  2432. headerAlign: 'center',
  2433. align: 'center',
  2434. columnLabel: '文件名称',
  2435. columnHidden: false,
  2436. columnImage: false,
  2437. columnSortable: false,
  2438. sortLv: 0,
  2439. status: true,
  2440. fixed: '',
  2441. columnWidth: 140
  2442. },
  2443. {
  2444. userId: this.$store.state.user.name,
  2445. functionId: 108002,
  2446. serialNumber: '108002Table3FileRemark',
  2447. tableId: '108002Table2',
  2448. tableName: '文件信息表',
  2449. columnProp: 'fileRemark',
  2450. headerAlign: 'center',
  2451. align: 'center',
  2452. columnLabel: '备注',
  2453. columnHidden: false,
  2454. columnImage: false,
  2455. columnSortable: false,
  2456. sortLv: 0,
  2457. status: true,
  2458. fixed: '',
  2459. columnWidth: 240
  2460. },
  2461. // {
  2462. // userId: this.$store.state.user.name,
  2463. // functionId: 108002,
  2464. // serialNumber: '108002Table2OrderRef3',
  2465. // tableId: '108002Table2',
  2466. // tableName: '文件信息表',
  2467. // columnProp: 'orderRef3',
  2468. // headerAlign: 'center',
  2469. // align: 'center',
  2470. // columnLabel: '文件描述',
  2471. // columnHidden: false,
  2472. // columnImage: false,
  2473. // columnSortable: false,
  2474. // sortLv: 0,
  2475. // status: true,
  2476. // fixed: '',
  2477. // columnWidth: 120
  2478. // },
  2479. {
  2480. userId: this.$store.state.user.name,
  2481. functionId: 108002,
  2482. serialNumber: '108002Table3CreateDate',
  2483. tableId: '108002Table2',
  2484. tableName: '文件信息表',
  2485. columnProp: 'createDate',
  2486. headerAlign: 'center',
  2487. align: 'center',
  2488. columnLabel: '上传时间',
  2489. columnHidden: false,
  2490. columnImage: false,
  2491. columnSortable: false,
  2492. sortLv: 0,
  2493. status: true,
  2494. fixed: '',
  2495. columnWidth: 140
  2496. },
  2497. {
  2498. userId: this.$store.state.user.name,
  2499. functionId: 108002,
  2500. serialNumber: '108002Table3CreatedBy',
  2501. tableId: '108002Table2',
  2502. tableName: '文件信息表',
  2503. columnProp: 'createBy',
  2504. headerAlign: 'center',
  2505. align: 'center',
  2506. columnLabel: '上传人',
  2507. columnHidden: false,
  2508. columnImage: false,
  2509. columnSortable: false,
  2510. sortLv: 0,
  2511. status: true,
  2512. fixed: '',
  2513. columnWidth: 140
  2514. },
  2515. ],
  2516. columnChooseDataList: [
  2517. {
  2518. userId: this.$store.state.user.name,
  2519. functionId: 108002,
  2520. serialNumber: '108002Table4PlmPartNo',
  2521. tableId: '108002Table4',
  2522. tableName: '所选变更列表',
  2523. columnProp: 'plmPartNo',
  2524. headerAlign: 'center',
  2525. align: 'left',
  2526. columnLabel: 'PLM物料编码/PLM Part No.',
  2527. columnHidden: false,
  2528. columnImage: false,
  2529. status: true,
  2530. fixed: '',
  2531. columnWidth: 120
  2532. },
  2533. {
  2534. userId: this.$store.state.user.name,
  2535. functionId: 108002,
  2536. serialNumber: '108002Table4PartNo',
  2537. tableId: '108002Table4',
  2538. tableName: '所选变更列表',
  2539. columnProp: 'partNo',
  2540. headerAlign: 'center',
  2541. align: 'left',
  2542. columnLabel: 'IFS物料编码/IFS Part No.',
  2543. columnHidden: false,
  2544. columnImage: false,
  2545. status: true,
  2546. fixed: '',
  2547. columnWidth: 120
  2548. },
  2549. {
  2550. userId: this.$store.state.user.name,
  2551. functionId: 108002,
  2552. serialNumber: '108002Table4PartDesc',
  2553. tableId: '108002Table4',
  2554. tableName: '所选变更列表',
  2555. columnProp: 'partDesc',
  2556. headerAlign: 'center',
  2557. align: 'left',
  2558. columnLabel: '物料名称/Part Desc.',
  2559. columnHidden: false,
  2560. columnImage: false,
  2561. status: true,
  2562. fixed: '',
  2563. columnWidth: 180
  2564. },
  2565. {
  2566. userId: this.$store.state.user.name,
  2567. functionId: 108002,
  2568. serialNumber: '108002Table4DrawingNo',
  2569. tableId: '108002Table4',
  2570. tableName: '所选变更列表',
  2571. columnProp: 'drawingNo',
  2572. headerAlign: 'center',
  2573. align: 'center',
  2574. columnLabel: '图纸编码/Drawing No.',
  2575. columnHidden: false,
  2576. columnImage: false,
  2577. status: true,
  2578. fixed: '',
  2579. columnWidth: 90
  2580. },
  2581. {
  2582. userId: this.$store.state.user.name,
  2583. functionId: 108002,
  2584. serialNumber: '108002Table4DraftNo',
  2585. tableId: '108002Table4',
  2586. tableName: '所选变更列表',
  2587. columnProp: 'draftNo',
  2588. headerAlign: 'center',
  2589. align: 'center',
  2590. columnLabel: '图稿编码/Proof No.',
  2591. columnHidden: false,
  2592. columnImage: false,
  2593. status: true,
  2594. fixed: '',
  2595. columnWidth: 90
  2596. },
  2597. ],
  2598. columnChooseItemList: [
  2599. {
  2600. columnProp: 'itemNo',
  2601. headerAlign: 'center',
  2602. align: 'center',
  2603. columnLabel: '属性编码',
  2604. columnHidden: false,
  2605. columnImage: false,
  2606. status: true,
  2607. fixed: '',
  2608. columnWidth: 80
  2609. },
  2610. {
  2611. columnProp: 'itemDesc',
  2612. headerAlign: 'center',
  2613. align: 'center',
  2614. columnLabel: '属性名称',
  2615. columnHidden: false,
  2616. columnImage: false,
  2617. status: true,
  2618. fixed: '',
  2619. columnWidth: 150
  2620. },
  2621. {
  2622. columnProp: 'itemExecutionDate',
  2623. headerAlign: 'center',
  2624. align: 'center',
  2625. columnLabel: '执行时间',
  2626. columnHidden: false,
  2627. columnImage: false,
  2628. status: true,
  2629. fixed: '',
  2630. columnWidth: 130
  2631. }
  2632. ],
  2633. columnChooseItemList2: [
  2634. {
  2635. columnProp: 'itemNo',
  2636. headerAlign: 'center',
  2637. align: 'center',
  2638. columnLabel: '属性编码',
  2639. columnHidden: false,
  2640. columnImage: false,
  2641. status: true,
  2642. fixed: '',
  2643. columnWidth: 80
  2644. },
  2645. {
  2646. columnProp: 'itemDesc',
  2647. headerAlign: 'center',
  2648. align: 'center',
  2649. columnLabel: '属性名称',
  2650. columnHidden: false,
  2651. columnImage: false,
  2652. status: true,
  2653. fixed: '',
  2654. columnWidth: 150
  2655. },
  2656. // {
  2657. // columnProp: 'executeFlag',
  2658. // headerAlign: 'center',
  2659. // align: 'center',
  2660. // columnLabel: '是否执行',
  2661. // columnHidden: false,
  2662. // columnImage: false,
  2663. // status: true,
  2664. // fixed: '',
  2665. // columnWidth: 80
  2666. // },
  2667. // {
  2668. // columnProp: 'executor',
  2669. // headerAlign: 'center',
  2670. // align: 'center',
  2671. // columnLabel: '执行人',
  2672. // columnHidden: false,
  2673. // columnImage: false,
  2674. // status: true,
  2675. // fixed: '',
  2676. // columnWidth: 100
  2677. // },
  2678. // {
  2679. // columnProp: 'itemExecutionDate',
  2680. // headerAlign: 'center',
  2681. // align: 'center',
  2682. // columnLabel: '执行时间',
  2683. // columnHidden: false,
  2684. // columnImage: false,
  2685. // status: true,
  2686. // fixed: '',
  2687. // columnWidth: 150
  2688. // }
  2689. ],
  2690. columnItemList: [
  2691. {
  2692. userId: this.$store.state.user.name,
  2693. functionId: 108002,
  2694. serialNumber: '108002Table6ItemNo',
  2695. tableId: '108002Table6',
  2696. tableName: '执行属性表',
  2697. columnProp: 'itemNo',
  2698. headerAlign: 'center',
  2699. align: 'center',
  2700. columnLabel: '属性编码',
  2701. columnHidden: false,
  2702. columnImage: false,
  2703. status: true,
  2704. fixed: '',
  2705. columnWidth: 80
  2706. },
  2707. {
  2708. userId: this.$store.state.user.name,
  2709. functionId: 108002,
  2710. serialNumber: '108002Table6ItemDesc',
  2711. tableId: '108002Table6',
  2712. tableName: '执行属性表',
  2713. columnProp: 'itemDesc',
  2714. headerAlign: 'center',
  2715. align: 'center',
  2716. columnLabel: '属性名称',
  2717. columnHidden: false,
  2718. columnImage: false,
  2719. status: true,
  2720. fixed: '',
  2721. columnWidth: 150
  2722. },
  2723. ],
  2724. columnItemList2: [
  2725. {
  2726. columnProp: 'itemNo',
  2727. headerAlign: 'center',
  2728. align: 'center',
  2729. columnLabel: '属性编码',
  2730. columnHidden: false,
  2731. columnImage: false,
  2732. status: true,
  2733. fixed: '',
  2734. columnWidth: 80
  2735. },
  2736. {
  2737. columnProp: 'itemDesc',
  2738. headerAlign: 'center',
  2739. align: 'center',
  2740. columnLabel: '属性名称',
  2741. columnHidden: false,
  2742. columnImage: false,
  2743. status: true,
  2744. fixed: '',
  2745. columnWidth: 150
  2746. },
  2747. ],
  2748. columnCSItemList: [
  2749. {
  2750. userId: this.$store.state.user.name,
  2751. functionId: 108001,
  2752. serialNumber: '108001Table5ItemNo',
  2753. tableId: '108001Table5',
  2754. tableName: '执行属性表',
  2755. columnProp: 'itemNo',
  2756. headerAlign: 'center',
  2757. align: 'center',
  2758. columnLabel: '属性编码',
  2759. columnHidden: false,
  2760. columnImage: false,
  2761. status: true,
  2762. fixed: '',
  2763. columnWidth: 80
  2764. },
  2765. {
  2766. userId: this.$store.state.user.name,
  2767. functionId: 108001,
  2768. serialNumber: '108001Table5ItemDesc',
  2769. tableId: '108001Table5',
  2770. tableName: '执行属性表',
  2771. columnProp: 'itemDesc',
  2772. headerAlign: 'center',
  2773. align: 'center',
  2774. columnLabel: '属性名称',
  2775. columnHidden: false,
  2776. columnImage: false,
  2777. status: true,
  2778. fixed: '',
  2779. columnWidth: 150
  2780. },
  2781. ],
  2782. columnCSChooseItemList: [
  2783. {
  2784. userId: this.$store.state.user.name,
  2785. functionId: 108002,
  2786. serialNumber: '108002Table7ItemNo',
  2787. tableId: '108002Table7',
  2788. tableName: '执行属性表',
  2789. columnProp: 'itemNo',
  2790. headerAlign: 'center',
  2791. align: 'left',
  2792. columnLabel: '属性编码',
  2793. columnHidden: false,
  2794. columnImage: false,
  2795. status: true,
  2796. fixed: '',
  2797. columnWidth: 100
  2798. },
  2799. {
  2800. userId: this.$store.state.user.name,
  2801. functionId: 108002,
  2802. serialNumber: '108002Table7ItemDesc',
  2803. tableId: '108002Table7',
  2804. tableName: '执行属性表',
  2805. columnProp: 'itemDesc',
  2806. headerAlign: 'center',
  2807. align: 'left',
  2808. columnLabel: '属性名称',
  2809. columnHidden: false,
  2810. columnImage: false,
  2811. status: true,
  2812. fixed: '',
  2813. columnWidth: 150
  2814. },
  2815. {
  2816. userId: this.$store.state.user.name,
  2817. functionId: 108002,
  2818. serialNumber: '108002Table7ExecuteDate',
  2819. tableId: '108002Table7',
  2820. tableName: '执行属性表',
  2821. columnProp: 'itemExecutionDate',
  2822. headerAlign: 'center',
  2823. align: 'center',
  2824. columnLabel: '会签时间',
  2825. columnHidden: false,
  2826. columnImage: false,
  2827. status: true,
  2828. fixed: '',
  2829. columnWidth: 150
  2830. },
  2831. ],
  2832. approvalColumnList: [
  2833. {
  2834. userId: this.$store.state.user.name,
  2835. functionId: 108002,
  2836. serialNumber: '108002Table8ClassificationNo',
  2837. tableId: '108002Table8',
  2838. tableName: '审批信息',
  2839. columnProp: 'classificationNo',
  2840. headerAlign: 'center',
  2841. align: 'center',
  2842. columnLabel: '流程分类编码',
  2843. columnHidden: false,
  2844. columnImage: false,
  2845. status: true,
  2846. fixed: '',
  2847. columnWidth: 120
  2848. },
  2849. {
  2850. userId: this.$store.state.user.name,
  2851. functionId: 108002,
  2852. serialNumber: '108002Table8ItemDesc',
  2853. tableId: '108002Table8',
  2854. tableName: '审批信息',
  2855. columnProp: 'nodeName',
  2856. headerAlign: 'center',
  2857. align: 'left',
  2858. columnLabel: '节点名称',
  2859. columnHidden: false,
  2860. columnImage: false,
  2861. status: true,
  2862. fixed: '',
  2863. columnWidth: 200
  2864. },
  2865. {
  2866. userId: this.$store.state.user.name,
  2867. functionId: 108002,
  2868. serialNumber: '108002Table8RejectFlag',
  2869. tableId: '108002Table8',
  2870. tableName: '审批信息',
  2871. columnProp: 'rejectFlagDesc',
  2872. headerAlign: 'center',
  2873. align: 'center',
  2874. columnLabel: '是否被驳回',
  2875. columnHidden: false,
  2876. columnImage: false,
  2877. status: true,
  2878. fixed: '',
  2879. columnWidth: 100
  2880. },
  2881. {
  2882. userId: this.$store.state.user.name,
  2883. functionId: 108002,
  2884. serialNumber: '108002Table8RejectNodeName',
  2885. tableId: '108002Table8',
  2886. tableName: '审批信息',
  2887. columnProp: 'rejectNodeName',
  2888. headerAlign: 'center',
  2889. align: 'center',
  2890. columnLabel: '被驳回节点名称',
  2891. columnHidden: false,
  2892. columnImage: false,
  2893. status: true,
  2894. fixed: '',
  2895. columnWidth: 200
  2896. },
  2897. {
  2898. userId: this.$store.state.user.name,
  2899. functionId: 108002,
  2900. serialNumber: '108002Table8NodeConclusionDesc',
  2901. tableId: '108002Table8',
  2902. tableName: '审批信息',
  2903. columnProp: 'nodeConclusionDesc',
  2904. headerAlign: 'center',
  2905. align: 'center',
  2906. columnLabel: '节点结论',
  2907. columnHidden: false,
  2908. columnImage: false,
  2909. status: true,
  2910. fixed: '',
  2911. columnWidth: 100
  2912. },
  2913. {
  2914. userId: this.$store.state.user.name,
  2915. functionId: 108002,
  2916. serialNumber: '108002Table8CreateDate',
  2917. tableId: '108002Table8',
  2918. tableName: '审批信息',
  2919. columnProp: 'createDate',
  2920. headerAlign: 'center',
  2921. align: 'center',
  2922. columnLabel: '提交时间',
  2923. columnHidden: false,
  2924. columnImage: false,
  2925. status: true,
  2926. fixed: '',
  2927. columnWidth: 170
  2928. },
  2929. {
  2930. userId: this.$store.state.user.name,
  2931. functionId: 108002,
  2932. serialNumber: '108002Table8CreateBy',
  2933. tableId: '108002Table8',
  2934. tableName: '审批信息',
  2935. columnProp: 'createBy',
  2936. headerAlign: 'center',
  2937. align: 'center',
  2938. columnLabel: '提交人员',
  2939. columnHidden: false,
  2940. columnImage: false,
  2941. status: true,
  2942. fixed: '',
  2943. columnWidth: 100
  2944. },
  2945. {
  2946. userId: this.$store.state.user.name,
  2947. functionId: 108002,
  2948. serialNumber: '108002Table8RejectOpinion',
  2949. tableId: '108002Table8',
  2950. tableName: '审批信息',
  2951. columnProp: 'rejectOpinion',
  2952. headerAlign: 'center',
  2953. align: 'left',
  2954. columnLabel: '驳回意见',
  2955. columnHidden: false,
  2956. columnImage: false,
  2957. status: true,
  2958. fixed: '',
  2959. columnWidth: 300
  2960. },
  2961. ],
  2962. partColumnList: [
  2963. {
  2964. columnProp: 'testPartNo',
  2965. headerAlign: "center",
  2966. align: "left",
  2967. columnLabel: 'PLM物料编码',
  2968. columnHidden: false,
  2969. columnImage: false,
  2970. columnSortable: false,
  2971. sortLv: 0,
  2972. status: true,
  2973. fixed: '',
  2974. columnWidth: 120
  2975. },
  2976. {
  2977. columnProp: 'finalPartNo',
  2978. headerAlign: "center",
  2979. align: "left",
  2980. columnLabel: 'IFS物料编码',
  2981. columnHidden: false,
  2982. columnImage: false,
  2983. columnSortable: false,
  2984. sortLv: 0,
  2985. status: true,
  2986. fixed: '',
  2987. columnWidth: 120
  2988. },
  2989. {
  2990. columnProp: 'customerPartNo',
  2991. headerAlign: "center",
  2992. align: "left",
  2993. columnLabel: '客户料号',
  2994. columnHidden: false,
  2995. columnImage: false,
  2996. columnSortable: false,
  2997. sortLv: 0,
  2998. status: true,
  2999. fixed: '',
  3000. columnWidth: 120
  3001. },
  3002. {
  3003. columnProp: 'partDesc',
  3004. headerAlign: "center",
  3005. align: "left",
  3006. columnLabel: '物料名称',
  3007. columnHidden: false,
  3008. columnImage: false,
  3009. status: true,
  3010. fixed: '',
  3011. columnWidth: 200
  3012. },
  3013. ],
  3014. // ======== 必填规则 ========
  3015. rules: {
  3016. applicantId: [
  3017. {
  3018. required: true,
  3019. message: ' ',
  3020. trigger: ['blur','change']
  3021. }
  3022. ],
  3023. applyDate: [
  3024. {
  3025. required: true,
  3026. message: ' ',
  3027. trigger: ['blur','change']
  3028. }
  3029. ],
  3030. changeImpact: [
  3031. {
  3032. required: true,
  3033. message: ' ',
  3034. trigger: ['blur','change']
  3035. }
  3036. ],
  3037. ecnStage: [
  3038. {
  3039. required: true,
  3040. message: ' ',
  3041. trigger: ['blur','change']
  3042. }
  3043. ],
  3044. changeType: [
  3045. {
  3046. required: true,
  3047. message: ' ',
  3048. trigger: ['blur','change']
  3049. }
  3050. ],
  3051. tpEngineerId: [
  3052. {
  3053. required: true,
  3054. message: ' ',
  3055. trigger: ['blur','change']
  3056. }
  3057. ],
  3058. changePhaseInDate: [
  3059. {
  3060. required: true,
  3061. message: ' ',
  3062. trigger: ['blur','change']
  3063. }
  3064. ],
  3065. dfIsProduct: [
  3066. {
  3067. required: true,
  3068. message: ' ',
  3069. trigger: ['blur','change']
  3070. }
  3071. ],
  3072. printing: [
  3073. {
  3074. required: true,
  3075. message: ' ',
  3076. trigger: ['blur','change']
  3077. }
  3078. ],
  3079. manufacturingCostIsChange: [
  3080. {
  3081. required: true,
  3082. message: ' ',
  3083. trigger: ['blur','change']
  3084. }
  3085. ],
  3086. changeRequestDesc: [
  3087. {
  3088. required: true,
  3089. message: ' ',
  3090. trigger: ['blur','change']
  3091. }
  3092. ],
  3093. isReQuote: [
  3094. {
  3095. required: true,
  3096. message: ' ',
  3097. trigger: ['blur','change']
  3098. }
  3099. ],
  3100. ulCertificationRequirements: [
  3101. {
  3102. required: true,
  3103. message: ' ',
  3104. trigger: ['blur','change']
  3105. }
  3106. ],
  3107. ulContinueToMeetDemand: [
  3108. {
  3109. required: true,
  3110. message: ' ',
  3111. trigger: ['blur','change']
  3112. }
  3113. ],
  3114. gpCertificationRequirements: [
  3115. {
  3116. required: true,
  3117. message: ' ',
  3118. trigger: ['blur','change']
  3119. }
  3120. ],
  3121. gpContinueToMeetDemand: [
  3122. {
  3123. required: true,
  3124. message: ' ',
  3125. trigger: ['blur','change']
  3126. }
  3127. ],
  3128. ecnType: [
  3129. {
  3130. required: true,
  3131. message: ' ',
  3132. trigger: ['blur','change']
  3133. }
  3134. ],
  3135. },
  3136. // ======== 复选数据集 ========
  3137. fileSelections: [],
  3138. itemSelections: [],
  3139. dataSelections2: [],
  3140. // ======== 选中的当前行数据 ========
  3141. currentRow: {},
  3142. currentCostImpactData: {},
  3143. currentExecutionInfoData: {},
  3144. currentChooseItemList: [],
  3145. currentChooseItemList2: [],
  3146. currentChooseCSItemList: [],
  3147. // ======== 模态框开关控制 ========
  3148. modalFlag: false,
  3149. showModalFlag: false,
  3150. modalDisableFlag: false,
  3151. manuFacturingCostFlag: false,
  3152. ecnTypeModalFlag: false,
  3153. chooseModelFlag: false,
  3154. chooseModelFlag2: false,
  3155. chooseCSModelFlag: false,
  3156. uploadDialog: false,
  3157. submitModalFlag: false,
  3158. addDetailModal: false,
  3159. saveLoading: false,
  3160. submitLoading: false,
  3161. issueLoadingSet: {},
  3162. menuId: this.$route.meta.menuId,
  3163. authSearch: false,
  3164. authUpdate: false,
  3165. authIssue: false,
  3166. authSubmit: false,
  3167. authReject: false,
  3168. authFileSave: false,
  3169. authFileDownLoad: false,
  3170. authFileRemove: false,
  3171. authFilePreview: false,
  3172. authDelete: false,
  3173. partModelFlag: false,
  3174. createBy2: this.$store.state.user.name,
  3175. superAdmin: false,
  3176. filterVisible: false,
  3177. isFilterSearch: false,
  3178. filterSearchData: {},
  3179. }
  3180. },
  3181. mounted () {
  3182. this.$nextTick(() => {
  3183. this.height = window.innerHeight / 2 - 30
  3184. /*第二个表格高度的动态调整*/
  3185. this.secondHeight = window.innerHeight / 2 - 186
  3186. })
  3187. this.fetchNodeOptions()
  3188. },
  3189. activated () {
  3190. if (this.authSearch) {
  3191. if (this.$route.params.type === 'tokenLogin') {
  3192. if (this.$route.params.docNo) {
  3193. this.searchData.changeNo = this.$route.params.docNo
  3194. }
  3195. this.searchData.limit = this.pageSize
  3196. this.searchData.page = this.pageIndex
  3197. changeRecordSearch(this.searchData).then(({data}) => {
  3198. if (data.code === 0) {
  3199. this.dataList = data.page.list
  3200. this.pageIndex = data.page.currPage
  3201. this.pageSize = data.page.pageSize
  3202. this.totalPage = data.page.totalCount
  3203. // 判断是否全部存在数据
  3204. if (this.dataList.length > 0) {
  3205. // 设置选中行
  3206. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  3207. this.updateModal(this.dataList[0])
  3208. } else {
  3209. this.$refs.changeTable.setCurrentRow()
  3210. }
  3211. }
  3212. })
  3213. } else {
  3214. if (this.$route.params.changeNo) {
  3215. this.searchData.changeNo = this.$route.params.changeNo
  3216. }
  3217. this.getDataList()
  3218. }
  3219. }
  3220. },
  3221. created () {
  3222. // 按钮控制
  3223. this.getButtonAuthData()
  3224. this.getEcnModel()
  3225. this.getEcnModel2()
  3226. this.getEcnCSModel()
  3227. this.getBuBySite()
  3228. this.checkSuperAdmin()
  3229. },
  3230. methods: {
  3231. fetchNodeOptions() {
  3232. getNodeList(this.searchData).then(({ data }) => {
  3233. if (data && data.code === 0) {
  3234. this.nodeOptions = data.rows.map(item => ({
  3235. id: item.nodeId,
  3236. name: item.nodeName
  3237. }));
  3238. } else {
  3239. this.$message.error('获取节点列表失败');
  3240. }
  3241. }).catch(error => {
  3242. this.$message.error('请求失败:' + error);
  3243. });
  3244. },
  3245. // 校验是否为超级管理员
  3246. checkSuperAdmin () {
  3247. checkSuperAdmin().then(({data}) => {
  3248. this.superAdmin = data.superAdmin
  3249. })
  3250. },
  3251. // 获取用户的bu
  3252. getBuBySite () {
  3253. let tempData = {
  3254. site: this.$store.state.user.site,
  3255. }
  3256. getBuBySite(tempData).then(({data}) => {
  3257. if (data.code === 0) {
  3258. this.buList = data.rows
  3259. }
  3260. })
  3261. },
  3262. // 查询ECN的评估模板
  3263. getEcnModel2 () {
  3264. let tempData = {
  3265. site: this.$store.state.user.site,
  3266. functionType: 'ECN',
  3267. codeNo: 'E002'
  3268. }
  3269. getEcnModel(tempData).then(({data}) => {
  3270. if (data.code === 0) {
  3271. this.modelList2 = data.rows
  3272. }
  3273. })
  3274. },
  3275. // 查询会签的模板
  3276. getEcnCSModel () {
  3277. let tempData = {
  3278. site: this.$store.state.user.site,
  3279. functionType: 'ECN',
  3280. codeNo: 'E003'
  3281. }
  3282. getEcnModel(tempData).then(({data}) => {
  3283. if (data.code === 0) {
  3284. this.modelCSList = data.rows
  3285. }
  3286. })
  3287. },
  3288. // 选择模板属性
  3289. chooseFeasibilityAssessmentModel () {
  3290. const doOpen = () => {
  3291. this.chooseModelData2 = {
  3292. site: this.$store.state.user.site,
  3293. itemNo: '',
  3294. itemDesc: '',
  3295. functionType: 'ECN',
  3296. codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : ''
  3297. }
  3298. getItemList(this.chooseModelData2).then(({data}) => {
  3299. if (data && data.code === 0) {
  3300. this.itemList2 = data.rows
  3301. this.itemList2.forEach(val => {
  3302. if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) {
  3303. this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true))
  3304. }
  3305. })
  3306. } else {
  3307. this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
  3308. }
  3309. })
  3310. this.chooseModelFlag2 = true
  3311. }
  3312. if (this.modalData.changeStatus === '草稿') {
  3313. doOpen()
  3314. return
  3315. }
  3316. checkProcessControl({ site: this.$store.state.user.site, changeNo: this.modalData.changeNo, roleId: 9 }).then(({data}) => {
  3317. if (data && data.code === 0) {
  3318. doOpen()
  3319. } else {
  3320. this.$alert(data.msg, '权限不足', { confirmButtonText: '确定' })
  3321. }
  3322. })
  3323. },
  3324. chooseManuFacturingCostModal () {
  3325. this.manuFacturingCostFlag = true
  3326. },
  3327. // 选择变更费用
  3328. selectedOptions1Change(){
  3329. this.modalData.manuFacturingType = this.selectedOptions1.join(';')
  3330. },
  3331. // 保存 制造费用变更
  3332. saveManuFacturingCostData(){
  3333. if (this.modalData.manuFacturingFlag === 'Y' && !this.selectedOptions1.length > 0){
  3334. this.$message.warning('请选择制造费用变更项!')
  3335. return
  3336. }
  3337. if (this.modalData.quotationFlag === 'Y' && (this.modalData.manuFacturingCostRemark2 == '' ||this.modalData.manuFacturingCostRemark2 == null)) {
  3338. this.$message.warning('请填写重新报价说明!')
  3339. return
  3340. }
  3341. this.manuFacturingCostFlag = false
  3342. console.log(this.modalData.manuFacturingFlag)
  3343. console.log(this.modalData.manuFacturingType)
  3344. console.log(this.modalData.manuFacturingCostRemark1)
  3345. console.log(this.modalData.quotationFlag)
  3346. console.log(this.modalData.manuFacturingCostRemark2)
  3347. },
  3348. // 选择会签模板属性
  3349. chooseCSModel () {
  3350. const doOpen = () => {
  3351. this.chooseCSModelData = {
  3352. site: this.$store.state.user.site,
  3353. itemNo: '',
  3354. itemDesc: '',
  3355. functionType: 'ECN',
  3356. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  3357. }
  3358. this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  3359. getItemList(this.chooseCSModelData).then(({data}) => {
  3360. if (data && data.code === 0) {
  3361. this.itemCSList = data.rows
  3362. this.itemCSList.forEach(val => {
  3363. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  3364. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  3365. }
  3366. })
  3367. } else {
  3368. this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
  3369. }
  3370. })
  3371. this.chooseCSModelFlag = true
  3372. }
  3373. if (this.modalData.changeStatus === '草稿') {
  3374. doOpen()
  3375. return
  3376. }
  3377. checkProcessControl({ site: this.$store.state.user.site, changeNo: this.modalData.changeNo, roleId: 12 }).then(({data}) => {
  3378. if (data && data.code === 0) {
  3379. doOpen()
  3380. } else {
  3381. this.$alert(data.msg, '权限不足', { confirmButtonText: '确定' })
  3382. }
  3383. })
  3384. },
  3385. // 确认多选属性
  3386. confirmItem2 () {
  3387. if (this.itemSelections2.length === 0) {
  3388. this.$message.warning("请勾选属性!")
  3389. return
  3390. }
  3391. // 临时集合
  3392. let temp = []
  3393. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3394. this.chooseItemList2.forEach(itemA => {
  3395. if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3396. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3397. temp.push(itemA)
  3398. }
  3399. })
  3400. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3401. this.itemSelections2.forEach(itemB => {
  3402. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3403. // 如果b中的对象名字不在结果中,则添加到结果中
  3404. temp.push(itemB)
  3405. }
  3406. })
  3407. this.chooseItemList2 = temp.map(item => {
  3408. if (item.availableValueList.length > 0) {
  3409. item.chooseValue = item.availableValueList[0].availableValue
  3410. }
  3411. return item
  3412. })
  3413. this.chooseModelFlag2 = false
  3414. },
  3415. // 确认多选CS属性
  3416. confirmCSItem () {
  3417. if (this.itemCSSelections.length === 0) {
  3418. this.$message.warning("请勾选属性!")
  3419. return
  3420. }
  3421. // 临时集合
  3422. let temp = []
  3423. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3424. this.chooseCSItemList.forEach(itemA => {
  3425. if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3426. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3427. temp.push(itemA)
  3428. }
  3429. })
  3430. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3431. this.itemCSSelections.forEach(itemB => {
  3432. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3433. // 如果b中的对象名字不在结果中,则添加到结果中
  3434. temp.push(itemB)
  3435. }
  3436. })
  3437. this.chooseCSItemList = temp
  3438. this.chooseCSModelFlag = false
  3439. },
  3440. // 查询属性
  3441. searchItemList2 () {
  3442. getItemList(this.chooseModelData2).then(({data}) => {
  3443. if (data.code === 0) {
  3444. this.itemList2 = data.rows
  3445. }
  3446. })
  3447. },
  3448. // 查询CS属性
  3449. searchCSItemList () {
  3450. getItemList(this.chooseCSModelData).then(({data}) => {
  3451. if (data.code === 0) {
  3452. this.itemCSList = data.rows
  3453. }
  3454. })
  3455. },
  3456. // 单机选择
  3457. itemClickRow2 (row) {
  3458. this.$refs.itemTable2.toggleRowSelection(row)
  3459. },
  3460. // 单击选择
  3461. itemCSClickRow (row) {
  3462. this.$refs.itemCSTable.toggleRowSelection(row)
  3463. },
  3464. // 复选属性
  3465. selectionItem2 (val) {
  3466. this.itemSelections2 = val
  3467. },
  3468. // 复选CS属性
  3469. selectionCSItem (val) {
  3470. this.itemCSSelections = val
  3471. },
  3472. // 获取流程的配置权限
  3473. async getNodeAuthority (row) {
  3474. let tempData = {
  3475. site: row.site,
  3476. changeNo: row.changeNo,
  3477. stepId: row.stepId,
  3478. menuId: this.$route.meta.menuId
  3479. }
  3480. await getNodeAuthority(tempData).then(({data}) => {
  3481. if (data && data.code === 0) {
  3482. this.plmChangeRequestArr = data.rows.plm_change_request
  3483. this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  3484. this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  3485. this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  3486. this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  3487. this.plmChangeItemArr = data.rows.plm_change_item
  3488. this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  3489. }
  3490. })
  3491. },
  3492. // ======= 正则校验 =======
  3493. handleInput (value, type) {
  3494. // 大于等于0,且只能输入16位小数
  3495. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  3496. if (val === null || val === undefined || val === '') {
  3497. val = 0
  3498. }
  3499. if (type === 1) {
  3500. this.costImpactData.productionProductScrapAmount = val
  3501. } else if (type === 2) {
  3502. this.costImpactData.inventoryProductScrapAmount = val
  3503. } else if (type === 3) {
  3504. this.costImpactData.affectedScrapAmount = val
  3505. }
  3506. },
  3507. partInput (row, val) {
  3508. row.newPartNo = val.toUpperCase()
  3509. },
  3510. executorInput (row, val) {
  3511. //row.executor = val.toUpperCase()
  3512. },
  3513. choosePartNo (row) {
  3514. this.partData.site = row.site
  3515. this.partData.buNo = row.buNo
  3516. this.tempPartRow = row
  3517. if (this.tempPartRow.newPartNo == null) {
  3518. this.tempPartRow.newPartNo = ''
  3519. }
  3520. this.queryPartList()
  3521. //this.getBaseList(133)
  3522. },
  3523. // 查询物料
  3524. queryPartList () {
  3525. this.partData.limit = this.pageSize2
  3526. this.partData.page = this.pageIndex2
  3527. choosePartNoList(this.partData).then(({data}) => {
  3528. if (data && data.code === 0) {
  3529. this.partList = data.page.list
  3530. this.pageIndex2 = data.page.currPage
  3531. this.pageSize2 = data.page.pageSize
  3532. this.totalPage2 = data.page.totalCount
  3533. this.partModelFlag = true
  3534. } else {
  3535. this.partList = []
  3536. }
  3537. })
  3538. },
  3539. // 双击选中物料
  3540. getRowData (row) {
  3541. // newPartNo保存PLM物料编码(用于存储到数据库)
  3542. this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
  3543. // finalPartNo用于前端显示IFS物料编码
  3544. this.$set(this.tempPartRow,'finalPartNo', row.finalPartNo)
  3545. this.partModelFlag = false
  3546. },
  3547. // 每页数
  3548. sizeChangeHandle2 (val) {
  3549. this.pageSize2 = val
  3550. this.pageIndex2 = 1
  3551. this.queryPartList()
  3552. },
  3553. // 当前页
  3554. currentChangeHandle2 (val) {
  3555. this.pageIndex2 = val
  3556. this.queryPartList()
  3557. },
  3558. chooseExecutor (row) {
  3559. const doOpen = () => {
  3560. this.tempExecutorRow = row
  3561. if (this.tempExecutorRow.executor == null) {
  3562. this.tempExecutorRow.executor = ''
  3563. }
  3564. this.getBaseList(2010)
  3565. }
  3566. if (this.modalData.changeStatus === '草稿') {
  3567. doOpen()
  3568. return
  3569. }
  3570. checkProcessControl({ site: this.$store.state.user.site, changeNo: this.modalData.changeNo, roleId: 11 }).then(({data}) => {
  3571. if (data && data.code === 0) {
  3572. doOpen()
  3573. } else {
  3574. this.$alert(data.msg, '权限不足', { confirmButtonText: '确定' })
  3575. }
  3576. })
  3577. },
  3578. ecnTypeHeaderChange (val,index) {
  3579. if (val === 'Y') {
  3580. for (let i = 0; i < this.form[index].list.length; i++) {
  3581. this.form[index].list[i].flag = 'Y'
  3582. }
  3583. } else {
  3584. for (let i = 0; i < this.form[index].list.length; i++) {
  3585. this.form[index].list[i].flag = 'N'
  3586. }
  3587. }
  3588. },
  3589. ecnTypeDetailChange (val,index) {
  3590. if (this.form[index].list.every(x => x.flag === 'Y')) {
  3591. this.form[index].flag = 'Y'
  3592. }else {
  3593. this.form[index].flag = 'N'
  3594. }
  3595. },
  3596. // ======== 分页相关方法 ========
  3597. // 每页数
  3598. sizeChangeHandle (val) {
  3599. this.pageSize = val
  3600. this.pageIndex = 1
  3601. if ( this.isFilterSearch === false){
  3602. this.getDataList()
  3603. } else {
  3604. this.queryByAnyField(this.filterSearchData)
  3605. }
  3606. },
  3607. // 当前页
  3608. currentChangeHandle (val) {
  3609. this.pageIndex = val
  3610. if ( this.isFilterSearch === false){
  3611. this.getDataList()
  3612. } else {
  3613. this.queryByAnyField(this.filterSearchData)
  3614. }
  3615. },
  3616. // ======== 列表选择相关方法 ========
  3617. selectFlag () {
  3618. return true
  3619. },
  3620. // ======== 页签切换相关方法 ========
  3621. // 单机选中询价信息
  3622. changeClickRow (row) {
  3623. this.$refs.changeTable.toggleRowSelection(row)
  3624. this.currentRow = JSON.parse(JSON.stringify(row))
  3625. },
  3626. // // 列表表格选择替换
  3627. // tabClick (tab, event) {
  3628. // // 刷新列表数据
  3629. // this.refreshCurrentTabTable()
  3630. // },
  3631. // 当前值发生变化的时候修改
  3632. currentChange (row, oldRow) {
  3633. // 判断是否是获取焦点的事件
  3634. if (row) {
  3635. this.currentRow = JSON.parse(JSON.stringify(row))
  3636. // 刷新当前页表
  3637. this.refreshCurrentTabTable()
  3638. } else {
  3639. this.currentRow = {}
  3640. this.detailList = []
  3641. this.fileList = []
  3642. this.currentCostImpactData = {}
  3643. this.currentExecutionInfoData = {}
  3644. this.currentChooseItemList = []
  3645. this.currentChooseItemList2 = []
  3646. this.currentChooseCSItemList = []
  3647. this.approvalList = []
  3648. }
  3649. },
  3650. // 刷新页签的table数据
  3651. refreshChangeTab () {},
  3652. // 新增库存成本影响
  3653. inventoryCostImpactSave () {
  3654. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3655. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  3656. this.$message.warning('请填写在生产品数量!')
  3657. return
  3658. }
  3659. if (this.costImpactData.productionProductNumber <= 0) {
  3660. this.$message.warning('在生产品数量不能小于等于0!')
  3661. return
  3662. }
  3663. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3664. this.$message.warning('请填写在生产品处理意见!')
  3665. return
  3666. }
  3667. if (this.costImpactData.productionProductScrapAmount === 0) {
  3668. this.$message.warning('请填写在生产品报废金额!')
  3669. return
  3670. }
  3671. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3672. this.$message.warning('请填写在生产品执行人!')
  3673. return
  3674. }
  3675. }
  3676. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3677. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  3678. this.$message.warning('请填写成品库存数量!')
  3679. return
  3680. }
  3681. if (this.costImpactData.inventoryProductNumber <= 0) {
  3682. this.$message.warning('成品库存数量不能小于等于0!')
  3683. return
  3684. }
  3685. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3686. this.$message.warning('请填写成品库存处理意见!')
  3687. return
  3688. }
  3689. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  3690. this.$message.warning('请填写成品库存报废金额!')
  3691. return
  3692. }
  3693. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3694. this.$message.warning('请填写成品库存执行人!')
  3695. return
  3696. }
  3697. }
  3698. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  3699. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  3700. this.$message.warning('请填写新订单数量!')
  3701. return
  3702. }
  3703. if (this.costImpactData.newOrderNumber <= 0) {
  3704. this.$message.warning('新订单数量不能小于等于0!')
  3705. return
  3706. }
  3707. }
  3708. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3709. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  3710. this.$message.warning('请填写影响的原材料及其库存量数量!')
  3711. return
  3712. }
  3713. if (this.costImpactData.affectedNumber <= 0) {
  3714. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  3715. return
  3716. }
  3717. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3718. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3719. return
  3720. }
  3721. if (this.costImpactData.affectedScrapAmount === 0) {
  3722. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  3723. return
  3724. }
  3725. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3726. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3727. return
  3728. }
  3729. }
  3730. this.costImpactData.changeTotalCost = this.totalCost
  3731. costImpactUpdate(this.costImpactData).then(({data}) => {
  3732. if (data && data.code === 0) {
  3733. this.costImpactData = data.rows.costImpactData
  3734. this.getDataList()
  3735. this.$message({
  3736. message: '操作成功',
  3737. type: 'success',
  3738. duration: 1500,
  3739. onClose: () => {}
  3740. })
  3741. } else {
  3742. this.$alert(data.msg, '错误', {
  3743. confirmButtonText: '确定'
  3744. })
  3745. }
  3746. })
  3747. },
  3748. // 刷新页签的table数据
  3749. refreshCurrentTabTable () {
  3750. if (this.activeTable === 'basicInformation') {
  3751. this.getChangeDetailList()
  3752. } else if (this.activeTable === 'fileInformation') {
  3753. this.getChangeFileList()
  3754. } else if (this.activeTable === 'inventoryCostImpact') {
  3755. this.inventoryCostImpactSearch2()
  3756. } else if (this.activeTable === 'actionInformation') {
  3757. this.tpExecutionInfoSearch2()
  3758. } else if (this.activeTable === 'countersignature') {
  3759. this.countersignatureSearch2()
  3760. } else if (this.activeTable === 'approvalInformation') {
  3761. this.getApprovalList()
  3762. }
  3763. },
  3764. selectionChangeHandle(val) {
  3765. this.changeSelections = val
  3766. },
  3767. closeProcessModal() {
  3768. const approvedRows = this.changeSelections.filter(row => row.changeStatus === '审批中')
  3769. if (approvedRows.length === 0) {
  3770. this.$message.warning('请勾选状态为"审批中"的单据!')
  3771. return
  3772. }
  3773. this.$confirm(`确定关闭这 ${approvedRows.length} 条工程变更申请的OA流程?关闭后状态将变为"草稿"。`, '流程关闭', {
  3774. confirmButtonText: '确定',
  3775. cancelButtonText: '取消',
  3776. type: 'warning'
  3777. }).then(() => {
  3778. closeProcess({
  3779. site: this.$store.state.user.site,
  3780. documentNos: approvedRows.map(row => row.changeNo),
  3781. documentType: 'ECN'
  3782. }).then(({data}) => {
  3783. if (data && data.code === 0) {
  3784. this.$message.success('流程关闭成功')
  3785. this.getDataList()
  3786. } else {
  3787. this.$message.error(data.msg)
  3788. }
  3789. }).catch(err => {
  3790. this.$message.error(err.message || '流程关闭失败')
  3791. })
  3792. }).catch(() => {})
  3793. },
  3794. // ======== 列表数据刷新方法 ========
  3795. // 获取数据列表
  3796. getDataList () {
  3797. if(localStorage.getItem('ecnData')!=undefined){
  3798. let data=JSON.parse(localStorage.getItem('ecnData'));
  3799. this.searchData.changeNo=data.ecnNo
  3800. localStorage.removeItem('ecnData');
  3801. }
  3802. this.searchData.limit = this.pageSize
  3803. this.searchData.page = this.pageIndex
  3804. changeRecordSearch(this.searchData).then(({data}) => {
  3805. if (data.code === 0) {
  3806. this.dataList = data.page.list
  3807. this.pageIndex = data.page.currPage
  3808. this.pageSize = data.page.pageSize
  3809. this.totalPage = data.page.totalCount
  3810. // 判断是否全部存在数据
  3811. if (this.dataList.length > 0) {
  3812. // 设置选中行
  3813. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  3814. } else {
  3815. this.$refs.changeTable.setCurrentRow()
  3816. }
  3817. }
  3818. })
  3819. this.isFilterSearch = false
  3820. },
  3821. // 变更单详情的列表
  3822. getChangeDetailList () {
  3823. let tempData = {
  3824. site: this.$store.state.user.site,
  3825. changeNo: this.currentRow.changeNo
  3826. }
  3827. changeDetailSearch(tempData).then(({data}) => {
  3828. if (data && data.code === 0) {
  3829. this.detailList = data.rows
  3830. } else {
  3831. this.detailList = []
  3832. }
  3833. })
  3834. },
  3835. // 变更单文件的列表
  3836. getChangeFileList () {
  3837. let tempData = {
  3838. orderRef1: this.$store.state.user.site,
  3839. orderRef2: this.currentRow.changeNo
  3840. }
  3841. changeFileSearch(tempData).then(({data}) => {
  3842. if (data && data.code === 0) {
  3843. this.fileList = data.rows
  3844. } else {
  3845. this.fileList = []
  3846. }
  3847. })
  3848. },
  3849. // 复选变更单文件
  3850. selectionFile (val) {
  3851. this.fileSelections = val
  3852. },
  3853. // 上传文件
  3854. uploadFileModal () {
  3855. let currentData = {
  3856. titleCon: '工程变更文件上传',
  3857. site: this.currentRow.site,
  3858. createBy: this.$store.state.user.name,
  3859. dataNo: this.currentRow.changeNo,
  3860. fileRemark: '',
  3861. folder: 'change',
  3862. }
  3863. this.uploadDialog = true
  3864. //打开组件 去做新增业务
  3865. // this.$nextTick(() => {
  3866. // this.$refs.changeUploadFile.init(currentData);
  3867. // })
  3868. },
  3869. // 删除变更单文件
  3870. deleteChangeFile () {
  3871. if (this.fileSelections.length === 0) {
  3872. this.$message.warning('请选择要删除的文件!')
  3873. return
  3874. }
  3875. let tempData = {
  3876. fileList: this.fileSelections
  3877. }
  3878. this.$confirm('确定删除文件?', '提示', {
  3879. confirmButtonText: '确定',
  3880. cancelButtonText: '取消',
  3881. type: 'warning'
  3882. }).then(() => {
  3883. deleteChangeFile(tempData).then(({data}) => {
  3884. if (data && data.code === 0) {
  3885. this.getChangeFileList()
  3886. this.$message({
  3887. message: '操作成功',
  3888. type: 'success',
  3889. duration: 1500,
  3890. onClose: () => {}
  3891. })
  3892. } else {
  3893. this.$alert(data.msg, '错误', {
  3894. confirmButtonText: '确定'
  3895. })
  3896. }
  3897. })
  3898. })
  3899. },
  3900. // 下载
  3901. downloadFile (row) {
  3902. downLoadQuotationFile(row)
  3903. .then(({data}) => {
  3904. // 不限制文件下载类型
  3905. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3906. // 下载文件名称
  3907. const fileName = row.fileName
  3908. // a标签下载
  3909. const linkNode = document.createElement('a')
  3910. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3911. linkNode.style.display = 'none'
  3912. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3913. document.body.appendChild(linkNode)
  3914. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3915. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3916. document.body.removeChild(linkNode)
  3917. })
  3918. },
  3919. // 修改变更单模态框
  3920. async updateModal (row) {
  3921. await this.getNodeAuthority(row)
  3922. this.modalData = {
  3923. site: row.site,
  3924. changeNo: row.changeNo,
  3925. applicantId: row.applicantId,
  3926. applicantName: row.applicantName,
  3927. applicationDepartmentId: row.applicationDepartmentId,
  3928. applicationDepartmentName: row.applicationDepartmentName,
  3929. applyDate: row.applyDate,
  3930. ecnType: row.ecnType,
  3931. changeImpact: row.changeImpact,
  3932. changeImpactDesc: row.changeImpactDesc,
  3933. ecnStage: row.ecnStage,
  3934. changeType: row.changeType,
  3935. tpEngineerId: row.tpEngineerId,
  3936. tpEngineerName: row.tpEngineerName,
  3937. changePhaseInDate: row.changePhaseInDate,
  3938. dfIsProduct: row.dfIsProduct,
  3939. printing: row.printing,
  3940. manufacturingCostIsChange: row.manufacturingCostIsChange,
  3941. changeRequestDesc: row.changeRequestDesc,
  3942. isReQuote: row.isReQuote,
  3943. ulCertificationRequirements: row.ulCertificationRequirements,
  3944. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  3945. gpCertificationRequirements: row.gpCertificationRequirements,
  3946. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  3947. updateBy: this.$store.state.user.name,
  3948. detailList: [],
  3949. ecnTypeData: [],
  3950. industrialEngineerId: row.industrialEngineerId,
  3951. industrialEngineerName: row.industrialEngineerName,
  3952. changeStatus: row.changeStatus,
  3953. cqcOperatorId: row.cqcOperatorId,
  3954. cqcOperatorName: row.cqcOperatorName,
  3955. faiOperatorId: row.faiOperatorId,
  3956. faiOperatorName: row.faiOperatorName,
  3957. nodeConclusion: '',
  3958. rejectOpinion: '',
  3959. stepId: row.stepId,
  3960. rejectFlag: row.rejectFlag,
  3961. rejectStepId: row.rejectStepId,
  3962. isReject: row.isReject,
  3963. menuId: this.$route.meta.menuId,
  3964. userName: this.$store.state.user.name,
  3965. nodeId: row.nodeId,
  3966. buNo: row.buNo,
  3967. createBy2: row.createBy2,
  3968. tpProcessControl: row.tpProcessControl,
  3969. csProcessControl: row.csProcessControl
  3970. }
  3971. this.changeTitle = '变更申请-' + this.modalData.changeNo
  3972. // 查选择的ECN种类
  3973. this.getChangeChooseEcnType()
  3974. // 查变更单明细
  3975. this.changeRequestDetailSearch()
  3976. // 查变更单库存成本影响
  3977. this.inventoryCostImpactSearch()
  3978. // 查变更单TP&执行信息
  3979. this.tpExecutionInfoSearch()
  3980. // 查变更单会签信息
  3981. this.countersignatureSearch()
  3982. // 查询DelegateAccess人员列表
  3983. this.searchDelegateAccessByUser()
  3984. // 回显已选择的DelegateAccess人员
  3985. this.searchDelegateAccess()
  3986. this.activeName = 'basicInformation'
  3987. this.modalFlag = true
  3988. this.modalDisableFlag = true
  3989. this.showModalFlag = false
  3990. },
  3991. // 详情模态框(只读模式,参考编辑功能加载数据)
  3992. showModal (row) {
  3993. this.modalData = {
  3994. site: row.site,
  3995. changeNo: row.changeNo,
  3996. applicantId: row.applicantId,
  3997. applicantName: row.applicantName,
  3998. applicationDepartmentId: row.applicationDepartmentId,
  3999. applicationDepartmentName: row.applicationDepartmentName,
  4000. applyDate: row.applyDate,
  4001. ecnType: row.ecnType,
  4002. changeImpact: row.changeImpact,
  4003. changeImpactDesc: row.changeImpactDesc,
  4004. ecnStage: row.ecnStage,
  4005. changeType: row.changeType,
  4006. tpEngineerId: row.tpEngineerId,
  4007. tpEngineerName: row.tpEngineerName,
  4008. changePhaseInDate: row.changePhaseInDate,
  4009. dfIsProduct: row.dfIsProduct,
  4010. printing: row.printing,
  4011. manufacturingCostIsChange: row.manufacturingCostIsChange,
  4012. changeRequestDesc: row.changeRequestDesc,
  4013. isReQuote: row.isReQuote,
  4014. ulCertificationRequirements: row.ulCertificationRequirements,
  4015. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  4016. gpCertificationRequirements: row.gpCertificationRequirements,
  4017. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  4018. updateBy: this.$store.state.user.name,
  4019. detailList: [],
  4020. ecnTypeData: [],
  4021. industrialEngineerId: row.industrialEngineerId,
  4022. industrialEngineerName: row.industrialEngineerName,
  4023. changeStatus: row.changeStatus,
  4024. cqcOperatorId: row.cqcOperatorId,
  4025. cqcOperatorName: row.cqcOperatorName,
  4026. faiOperatorId: row.faiOperatorId,
  4027. faiOperatorName: row.faiOperatorName,
  4028. nodeConclusion: '',
  4029. rejectOpinion: '',
  4030. stepId: row.stepId,
  4031. rejectFlag: row.rejectFlag,
  4032. rejectStepId: row.rejectStepId,
  4033. isReject: row.isReject,
  4034. menuId: this.$route.meta.menuId,
  4035. userName: this.$store.state.user.name,
  4036. nodeId: row.nodeId,
  4037. buNo: row.buNo,
  4038. createBy2: row.createBy2,
  4039. tpProcessControl: row.tpProcessControl,
  4040. csProcessControl: row.csProcessControl
  4041. }
  4042. this.changeTitle = '变更申请详情-' + this.modalData.changeNo
  4043. // 查选择的ECN种类
  4044. this.getChangeChooseEcnType()
  4045. // 查变更单明细
  4046. this.changeRequestDetailSearch()
  4047. // 查变更单库存成本影响
  4048. this.inventoryCostImpactSearch()
  4049. // 查变更单TP&执行信息
  4050. this.tpExecutionInfoSearch()
  4051. // 查变更单会签信息
  4052. this.countersignatureSearch()
  4053. // 查询DelegateAccess人员列表
  4054. this.searchDelegateAccessByUser()
  4055. // 回显已选择的DelegateAccess人员
  4056. this.searchDelegateAccess()
  4057. this.activeName = 'basicInformation'
  4058. // 设置为只读模式
  4059. this.showModalFlag = true
  4060. this.modalFlag = true
  4061. this.modalDisableFlag = true
  4062. },
  4063. // 下达
  4064. issueModal (row) {
  4065. this.$confirm(`是否确认下达?`, '提示', {
  4066. confirmButtonText: '确定',
  4067. cancelButtonText: '取消',
  4068. type: 'warning'
  4069. }).then(() => {
  4070. this.$set(this.issueLoadingSet, row.changeNo, true)
  4071. let tempData = {
  4072. site: row.site,
  4073. userName: this.$store.state.user.name,
  4074. changeNo: row.changeNo,
  4075. menuId: this.$route.meta.menuId
  4076. }
  4077. issueChange(tempData).then(({data}) => {
  4078. if (data && data.code === 0) {
  4079. this.getDataList()
  4080. this.$message({message: '操作成功', type: 'success'})
  4081. } else {
  4082. this.$alert(data.msg, '错误', {
  4083. confirmButtonText: '确定'
  4084. })
  4085. }
  4086. }).finally(() => {
  4087. this.$set(this.issueLoadingSet, row.changeNo, false)
  4088. })
  4089. })
  4090. },
  4091. // 删除变更申请模态框
  4092. deleteChangeRecord (row) {
  4093. this.$confirm(`是否删除该变更记录?`, '提示', {
  4094. confirmButtonText: '确定',
  4095. cancelButtonText: '取消',
  4096. type: 'warning'
  4097. }).then(() => {
  4098. let tempData = {
  4099. ...row
  4100. }
  4101. deleteTempChangeInfo(tempData).then(({data}) => {
  4102. if (data && data.code === 0) {
  4103. this.getDataList()
  4104. this.$message({message: '操作成功', type: 'success'})
  4105. } else {
  4106. this.$alert(data.msg, '错误', {
  4107. confirmButtonText: '确定'
  4108. })
  4109. }
  4110. })
  4111. })
  4112. },
  4113. // 打开提交模态框
  4114. submitDataModal () {
  4115. this.rejectOpinion = ''
  4116. this.submitModalFlag = true
  4117. },
  4118. // 同意提交
  4119. agreeSubmit () {
  4120. this.$confirm(`是否确认提交?`, '提示', {
  4121. confirmButtonText: '确定',
  4122. cancelButtonText: '取消',
  4123. type: 'warning'
  4124. }).then(() => {
  4125. this.modalData.nodeConclusion = 'Y'
  4126. this.submitData()
  4127. })
  4128. },
  4129. // 驳回提交
  4130. rejectSubmit () {
  4131. this.$confirm(`是否确认驳回?`, '提示', {
  4132. confirmButtonText: '确定',
  4133. cancelButtonText: '取消',
  4134. type: 'warning'
  4135. }).then(() => {
  4136. this.modalData.rejectOpinion = this.rejectOpinion
  4137. this.modalData.nodeConclusion = 'N'
  4138. this.submitData()
  4139. })
  4140. },
  4141. // 提交
  4142. submitData () {
  4143. if (this.plmChangeRequestArr) {
  4144. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4145. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4146. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4147. return
  4148. }
  4149. }
  4150. }
  4151. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4152. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4153. // 判断集合中的该属性是否都有值
  4154. let val = this.chooseDataList.every(item => {
  4155. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4156. return value !== null && value !== ''
  4157. })
  4158. // 如果没有值 且该字段为必填
  4159. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4160. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4161. return
  4162. }
  4163. }
  4164. }
  4165. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4166. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4167. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4168. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4169. return
  4170. }
  4171. }
  4172. }
  4173. if (this.plmChangeFAItemArr) { // 评估信息
  4174. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4175. let val = this.chooseItemList2.every(item => {
  4176. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4177. return value !== null && value !== ''
  4178. })
  4179. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4180. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4181. return
  4182. }
  4183. }
  4184. }
  4185. if (this.plmChangeExecutionInfoArr) {
  4186. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4187. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4188. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4189. return
  4190. }
  4191. }
  4192. }
  4193. if (this.plmChangeItemArr) { // 执行信息
  4194. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4195. let val = this.chooseItemList.every(item => {
  4196. const value = item[this.plmChangeItemArr[i].fieldId]
  4197. return value !== null && value !== ''
  4198. })
  4199. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4200. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4201. return
  4202. }
  4203. }
  4204. }
  4205. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4206. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4207. let val = this.currentChooseCSItemList.every(item => {
  4208. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4209. return value !== null && value !== ''
  4210. })
  4211. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4212. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4213. return
  4214. }
  4215. }
  4216. }
  4217. if (this.chooseDataList.length === 0) {
  4218. this.$message.warning('请添加需要变更的技术参数卡!')
  4219. return
  4220. }
  4221. // if(!Array.isArray(this.chooseItemList) || this.chooseItemList.length== 0){
  4222. // this.$message.warning('缺少执行信息!')
  4223. // return
  4224. // }
  4225. let flag = 0
  4226. if(Array.isArray(this.chooseItemList) && this.chooseItemList.length > 0){
  4227. this.chooseItemList.forEach(item => {
  4228. if (item.executor === '' || item.executor == null) {
  4229. flag = 1
  4230. }
  4231. })
  4232. }
  4233. if (flag === 1) {
  4234. this.$message.warning('执行信息里面缺少执行人!')
  4235. return
  4236. }
  4237. this.costImpactData.changeTotalCost = this.totalCost
  4238. this.executionInfoData.chooseItemList = this.chooseItemList
  4239. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4240. this.countersignatureData.changeNo = this.modalData.changeNo
  4241. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4242. this.modalData.userName = this.$store.state.user.name
  4243. this.modalData.menuId = this.$route.meta.menuId
  4244. // 处理明细列表:前端显示用finalPartNo(IFS物料编码),后端存储用newPartNo(PLM物料编码)
  4245. // finalPartNo 已清空时同步清除 newPartNo,防止 clearable 后旧值残留被提交
  4246. this.chooseDataList.forEach(item => {
  4247. if (!item.finalPartNo) {
  4248. item.newPartNo = ''
  4249. }
  4250. })
  4251. this.modalData.detailList = this.chooseDataList
  4252. this.modalData.ecnTypeData = this.form
  4253. this.modalData.costImpactData = this.costImpactData
  4254. this.modalData.executionInfoData = this.executionInfoData
  4255. this.modalData.countersignatureData = this.countersignatureData
  4256. this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
  4257. this.submitLoading = true
  4258. submitChange(this.modalData).then(({data}) => {
  4259. if (data && data.code === 0) {
  4260. this.getDataList()
  4261. this.$message({message: '操作成功', type: 'success'})
  4262. this.submitModalFlag = false
  4263. this.modalFlag = false
  4264. } else {
  4265. this.$alert(data.msg, '错误', {
  4266. confirmButtonText: '确定'
  4267. })
  4268. }
  4269. this.submitLoading = false
  4270. }).catch(()=>{
  4271. this.submitLoading = false
  4272. })
  4273. },
  4274. // 获取选择的ECN种类
  4275. getChangeChooseEcnType () {
  4276. getChooseEcnType(this.modalData).then(({data}) => {
  4277. if (data && data.code === 0) {
  4278. this.form = data.rows
  4279. } else {
  4280. this.$alert(data.msg, '错误', {
  4281. confirmButtonText: '确定'
  4282. })
  4283. }
  4284. })
  4285. },
  4286. // 打开ECN种类模态框
  4287. chooseEcnTypeModal () {
  4288. this.ecnTypeModalFlag = true
  4289. },
  4290. // 保存ECN种类
  4291. saveEcnTypeData () {
  4292. this.ecnTypeModalFlag = false
  4293. },
  4294. // 查询ECN的模板
  4295. getEcnModel () {
  4296. let tempData = {
  4297. site: this.$store.state.user.site,
  4298. functionType: 'ECN',
  4299. codeNo: 'E001'
  4300. }
  4301. getEcnModel(tempData).then(({data}) => {
  4302. if (data.code === 0) {
  4303. this.modelList = data.rows
  4304. }
  4305. })
  4306. },
  4307. // 查询变更明细表
  4308. changeRequestDetailSearch () {
  4309. requestDetailSearch(this.modalData).then(({data}) => {
  4310. if (data && data.code === 0) {
  4311. this.chooseDataList = data.rows
  4312. this.$set(this.modalData,'manuFacturingFlag',data.rows[0].manuFacturingFlag)
  4313. this.$set(this.modalData,'manuFacturingType',data.rows[0].manuFacturingType)
  4314. // 回显多选框
  4315. if (data.rows[0].manuFacturingType != null) {
  4316. this.selectedOptions1 = data.rows[0].manuFacturingType.split(';')
  4317. }
  4318. this.$set(this.modalData,'manuFacturingCostRemark1',data.rows[0].manuFacturingCostRemark1)
  4319. this.$set(this.modalData,'quotationFlag',data.rows[0].quotationFlag)
  4320. this.$set(this.modalData,'manuFacturingCostRemark2',data.rows[0].manuFacturingCostRemark2)
  4321. } else {
  4322. this.$alert(data.msg, '错误', {
  4323. confirmButtonText: '确定'
  4324. })
  4325. }
  4326. })
  4327. },
  4328. // 查询库存成本影响对象
  4329. inventoryCostImpactSearch () {
  4330. costImpactSearch(this.modalData).then(({data}) => {
  4331. if (data && data.code === 0) {
  4332. this.costImpactData = data.rows
  4333. } else {
  4334. this.$alert(data.msg, '错误', {
  4335. confirmButtonText: '确定'
  4336. })
  4337. }
  4338. })
  4339. },
  4340. // 查询库存成本影响对象
  4341. inventoryCostImpactSearch2 () {
  4342. costImpactSearch(this.currentRow).then(({data}) => {
  4343. if (data && data.code === 0) {
  4344. this.currentCostImpactData = data.rows
  4345. } else {
  4346. this.$alert(data.msg, '错误', {
  4347. confirmButtonText: '确定'
  4348. })
  4349. }
  4350. })
  4351. },
  4352. // 查询审批信息
  4353. getApprovalList () {
  4354. let tempData = {
  4355. site: this.$store.state.user.site,
  4356. menuId: this.$route.meta.menuId,
  4357. documentNo: this.currentRow.changeNo
  4358. }
  4359. getApprovalList(tempData).then(({data}) => {
  4360. if (data && data.code === 0) {
  4361. this.approvalList = data.rows
  4362. } else {
  4363. this.approvalList = []
  4364. }
  4365. })
  4366. },
  4367. // 查询执行信息
  4368. tpExecutionInfoSearch () {
  4369. executionInfoSearch(this.modalData).then(({data}) => {
  4370. if (data && data.code === 0) {
  4371. this.executionInfoData = data.rows.executionInfoData
  4372. this.executionInfoData.createBy = this.$store.state.user.name
  4373. this.chooseItemList = data.rows.chooseItemList
  4374. this.chooseItemList2 = data.rows.chooseItemList2
  4375. } else {
  4376. this.$alert(data.msg, '错误', {
  4377. confirmButtonText: '确定'
  4378. })
  4379. }
  4380. })
  4381. },
  4382. tpExecutionInfoSearch2 () {
  4383. executionInfoSearch(this.currentRow).then(({data}) => {
  4384. if (data && data.code === 0) {
  4385. this.currentExecutionInfoData = data.rows.executionInfoData
  4386. this.currentExecutionInfoData.createBy = this.$store.state.user.name
  4387. this.currentChooseItemList = data.rows.chooseItemList
  4388. this.currentChooseItemList2 = data.rows.chooseItemList2
  4389. } else {
  4390. this.$alert(data.msg, '错误', {
  4391. confirmButtonText: '确定'
  4392. })
  4393. }
  4394. })
  4395. },
  4396. // 查询会签信息
  4397. countersignatureSearch () {
  4398. countersignatureSearch(this.modalData).then(({data}) => {
  4399. if (data && data.code === 0) {
  4400. this.chooseCSItemList = data.rows.chooseCSItemList
  4401. } else {
  4402. this.$alert(data.msg, '错误', {
  4403. confirmButtonText: '确定'
  4404. })
  4405. }
  4406. })
  4407. },
  4408. countersignatureSearch2 () {
  4409. countersignatureSearch(this.currentRow).then(({data}) => {
  4410. if (data && data.code === 0) {
  4411. this.currentChooseCSItemList = data.rows.chooseCSItemList
  4412. } else {
  4413. this.$alert(data.msg, '错误', {
  4414. confirmButtonText: '确定'
  4415. })
  4416. }
  4417. })
  4418. },
  4419. // 删除所选技术参数卡
  4420. deleteChooseDataModal (row) {
  4421. if (!(this.currentRow.stepId === 10 || this.currentRow.stepId == null || this.currentRow.stepId === '')) {
  4422. this.$message.warning('变更单已提交,不能删除!')
  4423. return;
  4424. }
  4425. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  4426. confirmButtonText: '确定',
  4427. cancelButtonText: '取消',
  4428. type: 'warning'
  4429. }).then(() => {
  4430. deleteChangeDetail(row).then(({data}) => {
  4431. if (data && data.code === 0) {
  4432. this.changeRequestDetailSearch()
  4433. this.$message({
  4434. message: '操作成功',
  4435. type: 'success',
  4436. duration: 1500,
  4437. onClose: () => {}
  4438. })
  4439. } else {
  4440. this.$alert(data.msg, '错误', {
  4441. confirmButtonText: '确定'
  4442. })
  4443. }
  4444. })
  4445. })
  4446. },
  4447. // 修改变更申请
  4448. saveData () {
  4449. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  4450. this.$message.warning('请选择申请人员!')
  4451. return
  4452. }
  4453. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  4454. this.$message.warning('请选择申请日期!')
  4455. return
  4456. }
  4457. // if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  4458. // this.$message.warning('请选择ECN变更影响!')
  4459. // return
  4460. // }
  4461. // if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  4462. // this.$message.warning('请填写变更影响描述!')
  4463. // return
  4464. // }
  4465. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  4466. this.$message.warning('请选择ECN阶段!')
  4467. return
  4468. }
  4469. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  4470. this.$message.warning('请选择变更类别!')
  4471. return
  4472. }
  4473. if (this.form.length === 0) {
  4474. this.$message.warning('请选择ECN种类!')
  4475. return
  4476. }
  4477. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  4478. this.$message.warning('请选择审批人员!')
  4479. return
  4480. }
  4481. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  4482. this.$message.warning('请选择变更生效日期!')
  4483. return
  4484. }
  4485. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  4486. this.$message.warning('请选择是否DF产品!')
  4487. return
  4488. }
  4489. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  4490. this.$message.warning('请选择I/E!')
  4491. return
  4492. }
  4493. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  4494. this.$message.warning('请填写变更要求描述!')
  4495. return
  4496. }
  4497. if (this.modalData.printing === '' || this.modalData.printing == null) {
  4498. this.$message.warning('请选择印刷方式!')
  4499. return
  4500. }
  4501. if (this.chooseDataList.length === 0) {
  4502. this.$message.warning('请添加需要变更的技术参数卡!')
  4503. return
  4504. }
  4505. if (!this.chooseDataList.every(item => item.buNo === this.chooseDataList[0].buNo)) {
  4506. this.$message.warning('请选择相同BU的技术参数卡!')
  4507. return
  4508. }
  4509. // if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
  4510. // this.$message.warning('请选择CQC或者FAI人员!')
  4511. // return
  4512. // }
  4513. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  4514. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  4515. this.$message.warning('请填写在生产品数量!')
  4516. return
  4517. }
  4518. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  4519. this.$message.warning('请填写在生产品处理意见!')
  4520. return
  4521. }
  4522. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  4523. this.$message.warning('请填写在生产品执行人!')
  4524. return
  4525. }
  4526. }
  4527. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  4528. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  4529. this.$message.warning('请填写成品库存数量!')
  4530. return
  4531. }
  4532. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  4533. this.$message.warning('请填写成品库存处理意见!')
  4534. return
  4535. }
  4536. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  4537. this.$message.warning('请填写成品库存执行人!')
  4538. return
  4539. }
  4540. }
  4541. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  4542. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  4543. this.$message.warning('请填写新订单数量!')
  4544. return
  4545. }
  4546. }
  4547. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  4548. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  4549. this.$message.warning('请填写影响的原材料及其库存量数量!')
  4550. return
  4551. }
  4552. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  4553. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  4554. return
  4555. }
  4556. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  4557. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  4558. return
  4559. }
  4560. }
  4561. // if(!Array.isArray(this.chooseItemList) || this.chooseItemList.length== 0){
  4562. // this.$message.warning('缺少执行信息!')
  4563. // return
  4564. // }
  4565. let flag = 0
  4566. if(Array.isArray(this.chooseItemList) && this.chooseItemList.length > 0){
  4567. this.chooseItemList.forEach(item => {
  4568. if (item.executor === '' || item.executor == null) {
  4569. flag = 1
  4570. }
  4571. })
  4572. }
  4573. if (flag === 1) {
  4574. this.$message.warning('执行信息里面缺少执行人!')
  4575. return
  4576. }
  4577. this.costImpactData.changeTotalCost = this.totalCost
  4578. this.executionInfoData.chooseItemList = this.chooseItemList
  4579. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4580. this.countersignatureData.changeNo = this.modalData.changeNo
  4581. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4582. // finalPartNo 已清空时同步清除 newPartNo,防止 clearable 后旧值残留被提交
  4583. this.chooseDataList.forEach(item => {
  4584. if (!item.finalPartNo) {
  4585. item.newPartNo = ''
  4586. }
  4587. })
  4588. this.modalData.detailList = this.chooseDataList
  4589. this.modalData.ecnTypeData = this.form
  4590. this.modalData.costImpactData = this.costImpactData
  4591. this.modalData.executionInfoData = this.executionInfoData
  4592. this.modalData.countersignatureData = this.countersignatureData
  4593. this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
  4594. this.saveLoading = true
  4595. changeRequestUpdate(this.modalData).then(({data}) => {
  4596. if (data && data.code === 0) {
  4597. this.modalData = data.rows.modalData
  4598. this.modalData.menuId = this.$route.meta.menuId
  4599. this.changeTitle = '变更申请-' + this.modalData.changeNo
  4600. this.form = data.rows.form
  4601. this.chooseDataList = data.rows.chooseDataList
  4602. this.costImpactData = data.rows.costImpactData
  4603. this.executionInfoData = data.rows.executionInfoData
  4604. this.executionInfoData.createBy = this.$store.state.user.name
  4605. this.chooseItemList = data.rows.chooseItemList
  4606. this.chooseItemList2 = data.rows.chooseItemList2
  4607. this.chooseCSItemList = data.rows.chooseCSItemList
  4608. this.getDataList()
  4609. this.$message({
  4610. message: '操作成功',
  4611. type: 'success',
  4612. duration: 1500,
  4613. onClose: () => {}
  4614. })
  4615. } else {
  4616. this.$alert(data.msg, '错误', {
  4617. confirmButtonText: '确定'
  4618. })
  4619. }
  4620. this.saveLoading = false
  4621. }).catch(()=>{
  4622. this.saveLoading = false
  4623. })
  4624. },
  4625. // 选择模板属性
  4626. chooseModel () {
  4627. const doOpen = () => {
  4628. this.chooseModelData = {
  4629. site: this.$store.state.user.site,
  4630. itemNo: '',
  4631. itemDesc: '',
  4632. functionType: 'ECN',
  4633. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  4634. }
  4635. getItemList(this.chooseModelData).then(({data}) => {
  4636. if (data && data.code === 0) {
  4637. this.itemList = data.rows
  4638. this.itemList.forEach(val => {
  4639. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  4640. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  4641. }
  4642. })
  4643. } else {
  4644. this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
  4645. }
  4646. })
  4647. this.chooseModelFlag = true
  4648. }
  4649. if (this.modalData.changeStatus === '草稿') {
  4650. doOpen()
  4651. return
  4652. }
  4653. checkProcessControl({ site: this.$store.state.user.site, changeNo: this.modalData.changeNo, roleId: 10 }).then(({data}) => {
  4654. if (data && data.code === 0) {
  4655. doOpen()
  4656. } else {
  4657. this.$alert(data.msg, '权限不足', { confirmButtonText: '确定' })
  4658. }
  4659. })
  4660. },
  4661. // 查询属性
  4662. searchItemList () {
  4663. getItemList(this.chooseModelData).then(({data}) => {
  4664. if (data.code === 0) {
  4665. this.itemList = data.rows
  4666. }
  4667. })
  4668. },
  4669. // 单机选择
  4670. itemClickRow (row) {
  4671. this.$refs.itemTable.toggleRowSelection(row)
  4672. },
  4673. // 复选属性
  4674. selectionItem (val) {
  4675. this.itemSelections = val
  4676. },
  4677. // 确认多选属性
  4678. confirmItem () {
  4679. if (this.itemSelections.length === 0) {
  4680. this.$message.warning("请勾选属性!")
  4681. return
  4682. }
  4683. // 临时集合
  4684. let temp = []
  4685. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  4686. this.chooseItemList.forEach(itemA => {
  4687. if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  4688. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  4689. temp.push(itemA)
  4690. }
  4691. })
  4692. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  4693. this.itemSelections.forEach(itemB => {
  4694. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  4695. // 如果b中的对象名字不在结果中,则添加到结果中
  4696. temp.push(itemB)
  4697. }
  4698. })
  4699. this.chooseItemList = temp
  4700. this.chooseModelFlag = false
  4701. },
  4702. // 执行所选属性
  4703. executeModal (row) {
  4704. this.$confirm(`是否确认提交?`, '提示', {
  4705. confirmButtonText: '确定',
  4706. cancelButtonText: '取消',
  4707. type: 'warning'
  4708. }).then(() => {
  4709. if (this.plmChangeRequestArr) { // 主信息
  4710. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4711. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4712. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4713. return
  4714. }
  4715. }
  4716. }
  4717. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4718. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4719. // 判断集合中的该属性是否都有值
  4720. let val = this.chooseDataList.every(item => {
  4721. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4722. return value !== null && value !== ''
  4723. })
  4724. // 如果没有值 且该字段为必填
  4725. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4726. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4727. return
  4728. }
  4729. }
  4730. }
  4731. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4732. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4733. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4734. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4735. return
  4736. }
  4737. }
  4738. }
  4739. if (this.plmChangeFAItemArr) { // 评估信息
  4740. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4741. let val = this.chooseItemList2.every(item => {
  4742. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4743. return value !== null && value !== ''
  4744. })
  4745. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4746. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4747. return
  4748. }
  4749. }
  4750. }
  4751. if (this.plmChangeExecutionInfoArr) {
  4752. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4753. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4754. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4755. return
  4756. }
  4757. }
  4758. }
  4759. if (this.plmChangeItemArr) { // 执行信息
  4760. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4761. let val = this.chooseItemList.every(item => {
  4762. const value = item[this.plmChangeItemArr[i].fieldId]
  4763. return value !== null && value !== ''
  4764. })
  4765. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4766. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4767. return
  4768. }
  4769. }
  4770. }
  4771. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4772. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4773. let val = this.currentChooseCSItemList.every(item => {
  4774. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4775. return value !== null && value !== ''
  4776. })
  4777. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4778. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4779. return
  4780. }
  4781. }
  4782. }
  4783. if (this.chooseDataList.length === 0) {
  4784. this.$message.warning('请添加需要变更的技术参数卡!')
  4785. return
  4786. }
  4787. // 获取当前执行时间
  4788. const executionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4789. // 获取当前行的执行人
  4790. const currentExecutor = row.executor
  4791. // 找出所有执行人相同的行,一起更新执行标识和执行时间
  4792. const sameExecutorRows = this.chooseItemList.filter(item => item.executor === currentExecutor && item.executeFlag !== 'Y')
  4793. sameExecutorRows.forEach(item => {
  4794. item.executeFlag = 'Y'
  4795. item.itemExecutionDate = executionDate
  4796. })
  4797. this.costImpactData.changeTotalCost = this.totalCost
  4798. this.executionInfoData.chooseItemList = this.chooseItemList
  4799. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4800. this.countersignatureData.changeNo = this.modalData.changeNo
  4801. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4802. this.modalData.userName = this.$store.state.user.name
  4803. this.modalData.menuId = this.$route.meta.menuId
  4804. this.modalData.detailList = this.chooseDataList
  4805. this.modalData.ecnTypeData = this.form
  4806. this.modalData.costImpactData = this.costImpactData
  4807. this.modalData.executionInfoData = this.executionInfoData
  4808. this.modalData.countersignatureData = this.countersignatureData
  4809. this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
  4810. this.modalData.nodeConclusion = 'Y'
  4811. this.submitLoading = true
  4812. tpExecute(this.modalData).then(({data}) => {
  4813. if (data && data.code === 0) {
  4814. this.getDataList()
  4815. this.$message({message: '操作成功', type: 'success'})
  4816. this.submitModalFlag = false
  4817. this.modalFlag = false
  4818. } else {
  4819. this.$alert(data.msg, '错误', {
  4820. confirmButtonText: '确定'
  4821. })
  4822. // 回滚:清除所有相同执行人的执行标识和时间
  4823. sameExecutorRows.forEach(item => {
  4824. item.executeFlag = ''
  4825. item.itemExecutionDate = ''
  4826. })
  4827. }
  4828. this.submitLoading = false
  4829. }).catch(()=>{
  4830. // 回滚:清除所有相同执行人的执行标识和时间
  4831. sameExecutorRows.forEach(item => {
  4832. item.executeFlag = ''
  4833. item.itemExecutionDate = ''
  4834. })
  4835. this.submitLoading = false
  4836. })
  4837. })
  4838. },
  4839. // 执行所选属性
  4840. executeCSModal (row) {
  4841. this.$confirm(`是否确认会签?`, '提示', {
  4842. confirmButtonText: '确定',
  4843. cancelButtonText: '取消',
  4844. type: 'warning'
  4845. }).then(() => {
  4846. if (this.plmChangeRequestArr) { // 主信息
  4847. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4848. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4849. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4850. return
  4851. }
  4852. }
  4853. }
  4854. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4855. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4856. // 判断集合中的该属性是否都有值
  4857. let val = this.chooseDataList.every(item => {
  4858. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4859. return value !== null && value !== ''
  4860. })
  4861. // 如果没有值 且该字段为必填
  4862. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4863. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4864. return
  4865. }
  4866. }
  4867. }
  4868. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4869. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4870. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4871. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4872. return
  4873. }
  4874. }
  4875. }
  4876. if (this.plmChangeFAItemArr) { // 评估信息
  4877. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4878. let val = this.chooseItemList2.every(item => {
  4879. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4880. return value !== null && value !== ''
  4881. })
  4882. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4883. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4884. return
  4885. }
  4886. }
  4887. }
  4888. if (this.plmChangeExecutionInfoArr) {
  4889. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4890. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4891. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4892. return
  4893. }
  4894. }
  4895. }
  4896. if (this.plmChangeItemArr) { // 执行信息
  4897. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4898. let val = this.chooseItemList.every(item => {
  4899. const value = item[this.plmChangeItemArr[i].fieldId]
  4900. return value !== null && value !== ''
  4901. })
  4902. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4903. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4904. return
  4905. }
  4906. }
  4907. }
  4908. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4909. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4910. let val = this.currentChooseCSItemList.every(item => {
  4911. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4912. return value !== null && value !== ''
  4913. })
  4914. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4915. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4916. return
  4917. }
  4918. }
  4919. }
  4920. if (this.chooseDataList.length === 0) {
  4921. this.$message.warning('请添加需要变更的技术参数卡!')
  4922. return
  4923. }
  4924. // 获取当前会签时间
  4925. const executionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4926. // 获取当前行的会签人(itemDesc 字段)
  4927. const currentCountersigner = row.itemDesc
  4928. // 找出所有会签人相同的行,一起更新会签标识和会签时间
  4929. const sameCountersignerRows = this.chooseCSItemList.filter(item => item.itemDesc === currentCountersigner && item.executeFlag !== 'Y')
  4930. sameCountersignerRows.forEach(item => {
  4931. item.executeFlag = 'Y'
  4932. item.itemExecutionDate = executionDate
  4933. })
  4934. this.costImpactData.changeTotalCost = this.totalCost
  4935. this.executionInfoData.chooseItemList = this.chooseItemList
  4936. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4937. this.countersignatureData.changeNo = this.modalData.changeNo
  4938. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4939. this.modalData.userName = this.$store.state.user.name
  4940. this.modalData.menuId = this.$route.meta.menuId
  4941. this.modalData.detailList = this.chooseDataList
  4942. this.modalData.ecnTypeData = this.form
  4943. this.modalData.costImpactData = this.costImpactData
  4944. this.modalData.executionInfoData = this.executionInfoData
  4945. this.modalData.countersignatureData = this.countersignatureData
  4946. this.modalData.delegateAccessList = this.selectionDelegateAccess.map(item => item.delegateAccess) // DelegateAccess人员编码列表
  4947. this.modalData.nodeConclusion = 'Y'
  4948. this.submitLoading = true
  4949. csExecute(this.modalData).then(({data}) => {
  4950. if (data && data.code === 0) {
  4951. this.getDataList()
  4952. this.$message({message: '操作成功', type: 'success'})
  4953. this.submitModalFlag = false
  4954. this.modalFlag = false
  4955. } else {
  4956. this.$alert(data.msg, '错误', {
  4957. confirmButtonText: '确定'
  4958. })
  4959. // 回滚:清除所有相同会签人的会签标识和时间
  4960. sameCountersignerRows.forEach(item => {
  4961. item.executeFlag = ''
  4962. item.itemExecutionDate = ''
  4963. })
  4964. }
  4965. this.submitLoading = false
  4966. }).catch(()=>{
  4967. // 回滚:清除所有相同会签人的会签标识和时间
  4968. sameCountersignerRows.forEach(item => {
  4969. item.executeFlag = ''
  4970. item.itemExecutionDate = ''
  4971. })
  4972. this.submitLoading = false
  4973. })
  4974. })
  4975. },
  4976. // 执行所选属性
  4977. executeModal2 (row) {
  4978. row.executeFlag = 'Y'
  4979. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4980. row.executor = this.$store.state.user.name
  4981. },
  4982. // 编辑执行信息
  4983. executionInformationSave () {
  4984. this.executionInfoData.chooseItemList = this.chooseItemList
  4985. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4986. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  4987. this.$message.warning('请填写原碑刀编号!')
  4988. return;
  4989. }
  4990. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  4991. this.$message.warning('请填写新碑刀编号!')
  4992. return;
  4993. }
  4994. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  4995. this.$message.warning('请填写原网板/印版编号!')
  4996. return;
  4997. }
  4998. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  4999. this.$message.warning('请填写新网板/印版编号!')
  5000. return;
  5001. }
  5002. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  5003. this.$message.warning('请选择ECN执行日期!')
  5004. return;
  5005. }
  5006. executionUpdate(this.executionInfoData).then(({data}) => {
  5007. if (data && data.code === 0) {
  5008. this.executionInfoData = data.rows.executionInfoData
  5009. this.executionInfoData.createBy = this.$store.state.user.name
  5010. this.chooseItemList = data.rows.chooseItemList
  5011. this.chooseItemList2 = data.rows.chooseItemList2
  5012. this.getDataList()
  5013. this.$message({
  5014. message: '操作成功',
  5015. type: 'success',
  5016. duration: 1500,
  5017. onClose: () => {}
  5018. })
  5019. } else {
  5020. this.$alert(data.msg, '错误', {
  5021. confirmButtonText: '确定'
  5022. })
  5023. }
  5024. })
  5025. },
  5026. // 编辑会签信息
  5027. countersignatureSave () {
  5028. this.countersignatureData.changeNo = this.modalData.changeNo
  5029. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  5030. countersignatureUpdate(this.countersignatureData).then(({data}) => {
  5031. if (data && data.code === 0) {
  5032. this.chooseCSItemList = data.rows.chooseCSItemList
  5033. this.getDataList()
  5034. this.$message({
  5035. message: '操作成功',
  5036. type: 'success',
  5037. duration: 1500,
  5038. onClose: () => {}
  5039. })
  5040. } else {
  5041. this.$alert(data.msg, '错误', {
  5042. confirmButtonText: '确定'
  5043. })
  5044. }
  5045. })
  5046. },
  5047. // 新增技术参数卡
  5048. addChangeDetail () {
  5049. if (!(this.currentRow.stepId === 10 || this.currentRow.stepId == null || this.currentRow.stepId === '')) {
  5050. this.$message.warning('变更单已提交,不能新增!')
  5051. return;
  5052. }
  5053. this.searchData2.buNo = this.modalData.buNo
  5054. technicalSpecificationSearch2(this.searchData2).then(({data}) => {
  5055. if (data.code === 0) {
  5056. this.dataList2 = data.rows
  5057. const shouldExclude = (item) => {
  5058. return this.chooseDataList.some(cdItem =>
  5059. cdItem.site === item.site && cdItem.codeNo === item.codeNo
  5060. )
  5061. }
  5062. this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
  5063. this.addDetailModal = true
  5064. } else {
  5065. this.dataList2 = []
  5066. }
  5067. })
  5068. },
  5069. // 复选物料信息
  5070. selectionData2 (val) {
  5071. this.dataSelections2 = val
  5072. },
  5073. // 确认选择技术参数卡
  5074. addDetail () {
  5075. if (this.dataSelections2.length === 0) {
  5076. this.$message.warning("请勾选技术参数卡!")
  5077. return
  5078. }
  5079. this.dataSelections2.forEach(item => {
  5080. // 确保没有重复的元素
  5081. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
  5082. this.chooseDataList.push(item)
  5083. }
  5084. })
  5085. this.addDetailModal = false
  5086. this.dataSelections2 = []
  5087. },
  5088. // 回车换行
  5089. focusNextInput (index, type) {
  5090. let aaa = ''
  5091. if (this.chooseDataList.length - 1 === index) {
  5092. aaa = `${type}0`
  5093. } else {
  5094. aaa = `${type}${index + 1}`
  5095. }
  5096. this.$nextTick(() => {
  5097. this.$refs[aaa].focus()
  5098. })
  5099. },
  5100. // 根据人员编码查人员部门
  5101. getDepartmentByUserName () {
  5102. let tempData = {
  5103. site: this.$store.state.user.site,
  5104. username: this.modalData.applicantId
  5105. }
  5106. getDepartmentByUserName(tempData).then(({data}) => {
  5107. if (data.code === 0) {
  5108. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  5109. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  5110. }
  5111. })
  5112. },
  5113. // 预览
  5114. previewFile (row) {
  5115. // 预览文件
  5116. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  5117. let type = ''
  5118. if (image.includes(row.fileType.toLowerCase())) {
  5119. type = 'image/' + row.fileType
  5120. }
  5121. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  5122. if (video.includes(row.fileType.toLowerCase())) {
  5123. type = 'video/' + row.fileType
  5124. }
  5125. let txt = ['txt']
  5126. if (txt.includes(row.fileType.toLowerCase())) {
  5127. type = 'text/plain'
  5128. }
  5129. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  5130. if (office.includes(row.fileType.toLowerCase())) {
  5131. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  5132. return
  5133. }
  5134. let pdf = ['pdf']
  5135. if (pdf.includes(row.fileType.toLowerCase())) {
  5136. type = 'application/pdf'
  5137. }
  5138. if (type === ''){
  5139. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  5140. return;
  5141. }
  5142. downLoadQuotationFile(row).then(({data}) => {
  5143. const blob = new Blob([data], { type: type });
  5144. // 创建URL来生成预览
  5145. const fileURL = URL.createObjectURL(blob);
  5146. // 在新标签页中打开文件预览
  5147. const newTab = window.open(fileURL, '_blank')
  5148. })
  5149. },
  5150. // ======== chooseList相关方法 ========
  5151. // 获取基础数据列表S
  5152. getBaseList (val, type) {
  5153. this.tagNo = val
  5154. this.tagNo1 = type
  5155. this.$nextTick(() => {
  5156. let strVal = ''
  5157. let conSql = ''
  5158. if (val === 103) {
  5159. if (type === 1) {
  5160. strVal = this.modalData.applicantId
  5161. } else if (type === 3) {
  5162. strVal = this.costImpactData.productionProductExecutor
  5163. } else if (type === 4) {
  5164. strVal = this.costImpactData.inventoryProductExecutor
  5165. } else if (type === 5) {
  5166. strVal = this.costImpactData.affectedExecutor
  5167. }
  5168. // else if (type === 7) {
  5169. // strVal = this.tempExecutorRow.executor
  5170. // }
  5171. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5172. }
  5173. if (val === 133) {
  5174. strVal = this.tempPartRow.newPartNo
  5175. }
  5176. if (val === 2005) {
  5177. strVal = this.modalData.tpEngineerId
  5178. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5179. }
  5180. if (val === 2006) {
  5181. strVal = this.modalData.industrialEngineerId
  5182. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5183. }
  5184. if (val === 2007) {
  5185. strVal = this.modalData.cqcOperatorId
  5186. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5187. }
  5188. if (val === 2008) {
  5189. strVal = this.modalData.faiOperatorId
  5190. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5191. }
  5192. if (val === 2010) {
  5193. strVal = this.tempExecutorRow.executor
  5194. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  5195. }
  5196. this.$refs.baseList.init(val, strVal, conSql)
  5197. })
  5198. },
  5199. // 列表方法的回调
  5200. getBaseData (val) {
  5201. if (this.tagNo === 103) {
  5202. if (this.tagNo1 === 1) {
  5203. this.modalData.applicantId = val.username
  5204. this.modalData.applicantName = val.user_display
  5205. this.getDepartmentByUserName()
  5206. } else if (this.tagNo1 === 3) {
  5207. this.costImpactData.productionProductExecutor = val.username
  5208. this.costImpactData.productionProductExecutorName = val.user_display
  5209. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  5210. } else if (this.tagNo1 === 4) {
  5211. this.costImpactData.inventoryProductExecutor = val.username
  5212. this.costImpactData.inventoryProductExecutorName = val.user_display
  5213. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  5214. } else if (this.tagNo1 === 5) {
  5215. this.costImpactData.affectedExecutor = val.username
  5216. this.costImpactData.affectedExecutorName = val.user_display
  5217. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  5218. }
  5219. // else if (this.tagNo1 === 7) {
  5220. // this.$set(this.tempExecutorRow,'executor',val.username)
  5221. // }
  5222. }
  5223. if (this.tagNo === 133) {
  5224. //this.tempPartRow.newPartNo = val.part_no
  5225. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  5226. }
  5227. if (this.tagNo === 2005) {
  5228. this.modalData.tpEngineerId = val.username
  5229. this.modalData.tpEngineerName = val.user_display
  5230. }
  5231. if (this.tagNo === 2006) {
  5232. this.modalData.industrialEngineerId = val.username
  5233. this.modalData.industrialEngineerName = val.user_display
  5234. }
  5235. if (this.tagNo === 2007) {
  5236. this.modalData.cqcOperatorId = val.username
  5237. this.modalData.cqcOperatorName = val.user_display
  5238. }
  5239. if (this.tagNo === 2008) {
  5240. this.modalData.faiOperatorId = val.username
  5241. this.modalData.faiOperatorName = val.user_display
  5242. }
  5243. if (this.tagNo === 2010) {
  5244. this.$set(this.tempExecutorRow,'executor',val.username)
  5245. }
  5246. },
  5247. // 申请人输入校验
  5248. applicantBlur (tagNo) {
  5249. if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
  5250. let tempData = {
  5251. tagno: tagNo,
  5252. conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
  5253. }
  5254. verifyData(tempData).then(({data}) => {
  5255. if (data && data.code === 0) {
  5256. if (data.baseListData.length > 0) {
  5257. this.modalData.applicantId = data.baseListData[0].username
  5258. this.modalData.applicantName = data.baseListData[0].user_display
  5259. this.getDepartmentByUserName()
  5260. return
  5261. }
  5262. }
  5263. })
  5264. }
  5265. this.modalData.applicantName = ''
  5266. this.modalData.applicationDepartmentId = ''
  5267. this.modalData.applicationDepartmentName = ''
  5268. },
  5269. // 审批人员输入校验
  5270. tpEngineerBlur (tagNo) {
  5271. if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
  5272. let tempData = {
  5273. tagno: tagNo,
  5274. conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  5275. }
  5276. verifyData(tempData).then(({data}) => {
  5277. if (data && data.code === 0) {
  5278. if (data.baseListData.length > 0) {
  5279. this.modalData.tpEngineerId = data.baseListData[0].username
  5280. this.modalData.tpEngineerName = data.baseListData[0].user_display
  5281. return
  5282. }
  5283. }
  5284. })
  5285. }
  5286. this.modalData.tpEngineerName = ''
  5287. },
  5288. // I/E输入校验
  5289. industrialEngineerBlur (tagNo) {
  5290. if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
  5291. let tempData = {
  5292. tagno: tagNo,
  5293. conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  5294. }
  5295. verifyData(tempData).then(({data}) => {
  5296. if (data && data.code === 0) {
  5297. if (data.baseListData.length > 0) {
  5298. this.modalData.industrialEngineerId = data.baseListData[0].username
  5299. this.modalData.industrialEngineerName = data.baseListData[0].user_display
  5300. return
  5301. }
  5302. }
  5303. })
  5304. }
  5305. this.modalData.industrialEngineerName = ''
  5306. },
  5307. // CQC输入校验
  5308. cqcOperatorBlur (tagNo) {
  5309. if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
  5310. let tempData = {
  5311. tagno: tagNo,
  5312. conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  5313. }
  5314. verifyData(tempData).then(({data}) => {
  5315. if (data && data.code === 0) {
  5316. if (data.baseListData.length > 0) {
  5317. this.modalData.cqcOperatorId = data.baseListData[0].username
  5318. this.modalData.cqcOperatorName = data.baseListData[0].user_display
  5319. return
  5320. }
  5321. }
  5322. })
  5323. }
  5324. this.modalData.cqcOperatorName = ''
  5325. },
  5326. // FAI输入校验
  5327. faiOperatorBlur (tagNo) {
  5328. if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
  5329. let tempData = {
  5330. tagno: tagNo,
  5331. conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  5332. }
  5333. verifyData(tempData).then(({data}) => {
  5334. if (data && data.code === 0) {
  5335. if (data.baseListData.length > 0) {
  5336. this.modalData.faiOperatorId = data.baseListData[0].username
  5337. this.modalData.faiOperatorName = data.baseListData[0].user_display
  5338. return
  5339. }
  5340. }
  5341. })
  5342. }
  5343. this.modalData.faiOperatorName = ''
  5344. },
  5345. // ======== DelegateAccess 相关方法 ========
  5346. searchDelegateAccessByUser() {
  5347. // 角色 ROO7 的用户
  5348. let params = {
  5349. ...this.changeDelegateAccess,
  5350. site: this.$store.state.user.site,
  5351. }
  5352. searchDelegateAccessByUser(params).then(({data}) => {
  5353. if (data && data.code === 0) {
  5354. this.baseDelegateAccessList = data.rows;
  5355. // 不清空选中状态,依赖 :reserve-selection 保留之前的选择
  5356. } else {
  5357. this.$message.warning(data.msg)
  5358. }
  5359. }).catch((error) => {
  5360. this.$message.error(error)
  5361. })
  5362. },
  5363. handleSelectionChange(val) {
  5364. // val 只包含当前数据源中被选中的行
  5365. // 需要合并历史选择(selectionDelegateAccess)中不在当前数据源的人员
  5366. // 当前数据源中的所有人员编码
  5367. let currentDataKeys = this.baseDelegateAccessList.map(item => item.delegateAccess);
  5368. // 保留历史选择中不在当前数据源的人员(这些人员用户无法在当前对话框中取消选择)
  5369. let historyNotInCurrent = this.selectionDelegateAccess.filter(item =>
  5370. !currentDataKeys.includes(item.delegateAccess)
  5371. );
  5372. // 合并:历史人员(不在当前数据源)+ 当前选中的人员
  5373. let merged = [...historyNotInCurrent, ...val];
  5374. // 去重(虽然理论上不会重复)
  5375. let map = new Map();
  5376. merged.forEach(item => map.set(item.delegateAccess, item));
  5377. this.selectionDelegateAccess2 = Array.from(map.values());
  5378. },
  5379. handleTableClick(row, column, event, val) {
  5380. // 表格行点击选择
  5381. this.$refs[val].toggleRowSelection(row);
  5382. },
  5383. openDelegateAccess() {
  5384. // 恢复已确认选中的人员状态(仅限当前列表中存在的)
  5385. // 不清空选中状态,让 :reserve-selection 自动保留之前的选择
  5386. this.$nextTick(() => {
  5387. let rows = JSON.parse(JSON.stringify(this.selectionDelegateAccess))
  5388. if (rows && rows.length > 0 && this.$refs.delegateAccesstTable) {
  5389. rows.forEach(item => {
  5390. let row = this.baseDelegateAccessList.find(row => row.delegateAccess === item.delegateAccess);
  5391. if (row) { // 只对当前列表中存在的行进行选中操作
  5392. this.$refs.delegateAccesstTable.toggleRowSelection(row, true); // 明确设置为选中状态
  5393. }
  5394. })
  5395. }
  5396. })
  5397. },
  5398. closeDelegateAccess() {
  5399. this.selectionDelegateAccess2 = [];
  5400. },
  5401. confirmDelegateAccess() {
  5402. this.selectionDelegateAccess = JSON.parse(JSON.stringify(this.selectionDelegateAccess2))
  5403. this.delegateAccessVisible = false;
  5404. },
  5405. searchDelegateAccess() {
  5406. let params = {
  5407. site: this.modalData.site,
  5408. changeNo: this.modalData.changeNo,
  5409. }
  5410. searchDelegateAccess(params).then(({data}) => {
  5411. if (data && data.code === 0) {
  5412. this.selectionDelegateAccess = data.rows.map(item => {
  5413. return {
  5414. delegateAccess: item.delegateAccess,
  5415. delegateAccessName: item.delegateAccessName,
  5416. }
  5417. })
  5418. } else {
  5419. this.$message.warning(data.msg)
  5420. }
  5421. }).catch((error) => {
  5422. this.$message.error(error)
  5423. })
  5424. },
  5425. toMenu (row) {
  5426. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  5427. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  5428. } else {
  5429. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo: row.oriCodeNo},})
  5430. }
  5431. },
  5432. // ======== 导出相关方法 ========
  5433. /**
  5434. * 导出excel
  5435. */
  5436. async createExportData () {
  5437. this.searchData.limit = -1
  5438. this.searchData.page = 1
  5439. await changeRecordSearch(this.searchData).then(({data}) => {
  5440. this.resultList = data.page.list
  5441. })
  5442. return this.resultList
  5443. },
  5444. startDownload () {
  5445. this.exportLoading = true
  5446. },
  5447. finishDownload () {
  5448. this.exportLoading = false
  5449. },
  5450. fields () {
  5451. let json = '{'
  5452. this.columnList.forEach((item, index) => {
  5453. if (index === this.columnList.length - 1) {
  5454. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  5455. } else {
  5456. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  5457. }
  5458. })
  5459. json += '}'
  5460. let s = eval('(' + json + ')')
  5461. return s
  5462. },
  5463. rowStyle ({row}) {
  5464. if (this.currentRow.changeNo === row.changeNo) {
  5465. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  5466. }
  5467. },
  5468. // 获取按钮的权限数据
  5469. getButtonAuthData () {
  5470. this.authSearch = this.isAuth(this.menuId+":search")
  5471. this.authUpdate = this.isAuth(this.menuId+":update")
  5472. this.authIssue = this.isAuth(this.menuId+":issue")
  5473. this.authSubmit = this.isAuth(this.menuId+":submit")
  5474. this.authReject = this.isAuth(this.menuId+":reject")
  5475. this.authFileSave = this.isAuth(this.menuId+":fileSave")
  5476. this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad")
  5477. this.authFileRemove = this.isAuth(this.menuId+":fileRemove")
  5478. this.authFilePreview = this.isAuth(this.menuId+":filePreview")
  5479. this.authDelete = this.isAuth(this.menuId+":delete")
  5480. },
  5481. queryByAnyField(params){
  5482. params.no = this.pageIndex
  5483. params.size = this.pageSize
  5484. params.userId = this.$store.state.user.id.toString()
  5485. params.site = this.$store.state.user.site
  5486. params.menuId = '108002'
  5487. this.dataListLoading = true;
  5488. changeRecordSearchAny(params).then(({data})=>{
  5489. if (data && data.code === 0){
  5490. this.dataList = data.page.list
  5491. this.totalPage = data.page.totalCount
  5492. // 判断是否全部存在数据
  5493. if (this.dataList.length > 0) {
  5494. // 设置选中行
  5495. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  5496. } else {
  5497. this.$refs.changeTable.setCurrentRow()
  5498. }
  5499. }else {
  5500. this.$message.warning(data.msg)
  5501. }
  5502. this.dataListLoading = false;
  5503. }).catch((error)=>{
  5504. this.$message.error(error)
  5505. this.dataListLoading = false;
  5506. })
  5507. this.filterSearchData = params
  5508. this.isFilterSearch = true
  5509. this.filterVisible = false
  5510. },
  5511. }
  5512. }
  5513. </script>
  5514. <style scoped lang="scss">
  5515. /deep/ .customer-tab .el-tabs__content {
  5516. padding: 0px !important;
  5517. }
  5518. .numInput /deep/ .el-input__inner{
  5519. text-align: right;
  5520. }
  5521. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  5522. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  5523. -webkit-appearance: none;
  5524. }
  5525. /deep/ .inlineNumber input[type="number"]{
  5526. -moz-appearance: textfield;
  5527. padding-right: 5px !important;
  5528. }
  5529. </style>