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.

4206 lines
168 KiB

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