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.

5395 lines
218 KiB

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