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.

4471 lines
177 KiB

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