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.

5623 lines
228 KiB

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