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.

4222 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
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 === 'oriCodeNo'">
  604. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toMenu(scope.row)"> {{ 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: 'oriCodeNo',
  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: '108002Table2OriCodeNo',
  1755. tableId: '108002Table2',
  1756. tableName: '变更单基本信息表',
  1757. columnProp: 'oriCodeNo',
  1758. headerAlign: 'center',
  1759. align: 'center',
  1760. columnLabel: '技术参数卡编码',
  1761. columnHidden: false,
  1762. columnImage: false,
  1763. status: true,
  1764. fixed: '',
  1765. columnWidth: 120
  1766. },
  1767. {
  1768. userId: this.$store.state.user.name,
  1769. functionId: 108002,
  1770. serialNumber: '108002Table2RevNo',
  1771. tableId: '108002Table2',
  1772. tableName: '变更单基本信息表',
  1773. columnProp: 'revNo',
  1774. headerAlign: 'center',
  1775. align: 'right',
  1776. columnLabel: '版本号',
  1777. columnHidden: false,
  1778. columnImage: false,
  1779. status: true,
  1780. fixed: '',
  1781. columnWidth: 60
  1782. },
  1783. ],
  1784. fileColumnList: [
  1785. {
  1786. userId: this.$store.state.user.name,
  1787. functionId: 108002,
  1788. serialNumber: '108002Table3FileName',
  1789. tableId: '108002Table3',
  1790. tableName: '变更单文件信息表',
  1791. columnProp: 'fileName',
  1792. headerAlign: 'center',
  1793. align: 'left',
  1794. columnLabel: '文件名称',
  1795. columnHidden: false,
  1796. columnImage: false,
  1797. status: true,
  1798. fixed: '',
  1799. columnWidth: 120
  1800. },
  1801. {
  1802. userId: this.$store.state.user.name,
  1803. functionId: 108002,
  1804. serialNumber: '108002Table3FileType',
  1805. tableId: '108002Table3',
  1806. tableName: '变更单文件信息表',
  1807. columnProp: 'fileType',
  1808. headerAlign: 'center',
  1809. align: 'left',
  1810. columnLabel: '文件类型',
  1811. columnHidden: false,
  1812. columnImage: false,
  1813. status: true,
  1814. fixed: '',
  1815. columnWidth: 80
  1816. },
  1817. {
  1818. userId: this.$store.state.user.name,
  1819. functionId: 108002,
  1820. serialNumber: '108002Table3Url',
  1821. tableId: '108002Table3',
  1822. tableName: '变更单文件信息表',
  1823. columnProp: 'url',
  1824. headerAlign: 'center',
  1825. align: 'left',
  1826. columnLabel: '文件地址',
  1827. columnHidden: false,
  1828. columnImage: false,
  1829. status: true,
  1830. fixed: '',
  1831. columnWidth: 180
  1832. },
  1833. {
  1834. userId: this.$store.state.user.name,
  1835. functionId: 108002,
  1836. serialNumber: '108002Table3CreateBy',
  1837. tableId: '108002Table3',
  1838. tableName: '变更单文件信息表',
  1839. columnProp: 'createBy',
  1840. headerAlign: 'center',
  1841. align: 'center',
  1842. columnLabel: '创建人',
  1843. columnHidden: false,
  1844. columnImage: false,
  1845. status: true,
  1846. fixed: '',
  1847. columnWidth: 100
  1848. },
  1849. {
  1850. userId: this.$store.state.user.name,
  1851. functionId: 108002,
  1852. serialNumber: '108002Table3CreateDate',
  1853. tableId: '108002Table3',
  1854. tableName: '变更单文件信息表',
  1855. columnProp: 'createDate',
  1856. headerAlign: 'center',
  1857. align: 'center',
  1858. columnLabel: '创建时间',
  1859. columnHidden: false,
  1860. columnImage: false,
  1861. status: true,
  1862. fixed: '',
  1863. columnWidth: 150
  1864. },
  1865. ],
  1866. columnChooseDataList: [
  1867. {
  1868. userId: this.$store.state.user.name,
  1869. functionId: 108002,
  1870. serialNumber: '108002Table4PartNo',
  1871. tableId: '108002Table4',
  1872. tableName: '所选变更列表',
  1873. columnProp: 'partNo',
  1874. headerAlign: 'center',
  1875. align: 'center',
  1876. columnLabel: '正式物料编码',
  1877. columnHidden: false,
  1878. columnImage: false,
  1879. status: true,
  1880. fixed: '',
  1881. columnWidth: 100
  1882. },
  1883. {
  1884. userId: this.$store.state.user.name,
  1885. functionId: 108002,
  1886. serialNumber: '108002Table4PartDesc',
  1887. tableId: '108002Table4',
  1888. tableName: '所选变更列表',
  1889. columnProp: 'partDesc',
  1890. headerAlign: 'center',
  1891. align: 'left',
  1892. columnLabel: '物料描述',
  1893. columnHidden: false,
  1894. columnImage: false,
  1895. status: true,
  1896. fixed: '',
  1897. columnWidth: 180
  1898. },
  1899. {
  1900. userId: this.$store.state.user.name,
  1901. functionId: 108002,
  1902. serialNumber: '108002Table4DrawingNo',
  1903. tableId: '108002Table4',
  1904. tableName: '所选变更列表',
  1905. columnProp: 'drawingNo',
  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. userId: this.$store.state.user.name,
  1917. functionId: 108002,
  1918. serialNumber: '108002Table4DraftNo',
  1919. tableId: '108002Table4',
  1920. tableName: '所选变更列表',
  1921. columnProp: 'draftNo',
  1922. headerAlign: 'center',
  1923. align: 'center',
  1924. columnLabel: '图稿编码',
  1925. columnHidden: false,
  1926. columnImage: false,
  1927. status: true,
  1928. fixed: '',
  1929. columnWidth: 90
  1930. },
  1931. ],
  1932. columnChooseItemList: [
  1933. {
  1934. columnProp: 'itemNo',
  1935. headerAlign: 'center',
  1936. align: 'center',
  1937. columnLabel: '属性编码',
  1938. columnHidden: false,
  1939. columnImage: false,
  1940. status: true,
  1941. fixed: '',
  1942. columnWidth: 80
  1943. },
  1944. {
  1945. columnProp: 'itemDesc',
  1946. headerAlign: 'center',
  1947. align: 'center',
  1948. columnLabel: '属性名称',
  1949. columnHidden: false,
  1950. columnImage: false,
  1951. status: true,
  1952. fixed: '',
  1953. columnWidth: 150
  1954. },
  1955. {
  1956. columnProp: 'itemExecutionDate',
  1957. headerAlign: 'center',
  1958. align: 'center',
  1959. columnLabel: '执行时间',
  1960. columnHidden: false,
  1961. columnImage: false,
  1962. status: true,
  1963. fixed: '',
  1964. columnWidth: 130
  1965. }
  1966. ],
  1967. columnChooseItemList2: [
  1968. {
  1969. columnProp: 'itemNo',
  1970. headerAlign: 'center',
  1971. align: 'center',
  1972. columnLabel: '属性编码',
  1973. columnHidden: false,
  1974. columnImage: false,
  1975. status: true,
  1976. fixed: '',
  1977. columnWidth: 80
  1978. },
  1979. {
  1980. columnProp: 'itemDesc',
  1981. headerAlign: 'center',
  1982. align: 'center',
  1983. columnLabel: '属性名称',
  1984. columnHidden: false,
  1985. columnImage: false,
  1986. status: true,
  1987. fixed: '',
  1988. columnWidth: 150
  1989. },
  1990. // {
  1991. // columnProp: 'executeFlag',
  1992. // headerAlign: 'center',
  1993. // align: 'center',
  1994. // columnLabel: '是否执行',
  1995. // columnHidden: false,
  1996. // columnImage: false,
  1997. // status: true,
  1998. // fixed: '',
  1999. // columnWidth: 80
  2000. // },
  2001. // {
  2002. // columnProp: 'executor',
  2003. // headerAlign: 'center',
  2004. // align: 'center',
  2005. // columnLabel: '执行人',
  2006. // columnHidden: false,
  2007. // columnImage: false,
  2008. // status: true,
  2009. // fixed: '',
  2010. // columnWidth: 100
  2011. // },
  2012. // {
  2013. // columnProp: 'itemExecutionDate',
  2014. // headerAlign: 'center',
  2015. // align: 'center',
  2016. // columnLabel: '执行时间',
  2017. // columnHidden: false,
  2018. // columnImage: false,
  2019. // status: true,
  2020. // fixed: '',
  2021. // columnWidth: 150
  2022. // }
  2023. ],
  2024. columnItemList: [
  2025. {
  2026. userId: this.$store.state.user.name,
  2027. functionId: 108002,
  2028. serialNumber: '108002Table6ItemNo',
  2029. tableId: '108002Table6',
  2030. tableName: '执行属性表',
  2031. columnProp: 'itemNo',
  2032. headerAlign: 'center',
  2033. align: 'center',
  2034. columnLabel: '属性编码',
  2035. columnHidden: false,
  2036. columnImage: false,
  2037. status: true,
  2038. fixed: '',
  2039. columnWidth: 80
  2040. },
  2041. {
  2042. userId: this.$store.state.user.name,
  2043. functionId: 108002,
  2044. serialNumber: '108002Table6ItemDesc',
  2045. tableId: '108002Table6',
  2046. tableName: '执行属性表',
  2047. columnProp: 'itemDesc',
  2048. headerAlign: 'center',
  2049. align: 'center',
  2050. columnLabel: '属性名称',
  2051. columnHidden: false,
  2052. columnImage: false,
  2053. status: true,
  2054. fixed: '',
  2055. columnWidth: 150
  2056. },
  2057. ],
  2058. columnItemList2: [
  2059. {
  2060. columnProp: 'itemNo',
  2061. headerAlign: 'center',
  2062. align: 'center',
  2063. columnLabel: '属性编码',
  2064. columnHidden: false,
  2065. columnImage: false,
  2066. status: true,
  2067. fixed: '',
  2068. columnWidth: 80
  2069. },
  2070. {
  2071. columnProp: 'itemDesc',
  2072. headerAlign: 'center',
  2073. align: 'center',
  2074. columnLabel: '属性名称',
  2075. columnHidden: false,
  2076. columnImage: false,
  2077. status: true,
  2078. fixed: '',
  2079. columnWidth: 150
  2080. },
  2081. ],
  2082. columnCSItemList: [
  2083. {
  2084. userId: this.$store.state.user.name,
  2085. functionId: 108001,
  2086. serialNumber: '108001Table5ItemNo',
  2087. tableId: '108001Table5',
  2088. tableName: '执行属性表',
  2089. columnProp: 'itemNo',
  2090. headerAlign: 'center',
  2091. align: 'center',
  2092. columnLabel: '属性编码',
  2093. columnHidden: false,
  2094. columnImage: false,
  2095. status: true,
  2096. fixed: '',
  2097. columnWidth: 80
  2098. },
  2099. {
  2100. userId: this.$store.state.user.name,
  2101. functionId: 108001,
  2102. serialNumber: '108001Table5ItemDesc',
  2103. tableId: '108001Table5',
  2104. tableName: '执行属性表',
  2105. columnProp: 'itemDesc',
  2106. headerAlign: 'center',
  2107. align: 'center',
  2108. columnLabel: '属性名称',
  2109. columnHidden: false,
  2110. columnImage: false,
  2111. status: true,
  2112. fixed: '',
  2113. columnWidth: 150
  2114. },
  2115. ],
  2116. columnCSChooseItemList: [
  2117. {
  2118. userId: this.$store.state.user.name,
  2119. functionId: 108002,
  2120. serialNumber: '108002Table7ItemNo',
  2121. tableId: '108002Table7',
  2122. tableName: '执行属性表',
  2123. columnProp: 'itemNo',
  2124. headerAlign: 'center',
  2125. align: 'left',
  2126. columnLabel: '属性编码',
  2127. columnHidden: false,
  2128. columnImage: false,
  2129. status: true,
  2130. fixed: '',
  2131. columnWidth: 100
  2132. },
  2133. {
  2134. userId: this.$store.state.user.name,
  2135. functionId: 108002,
  2136. serialNumber: '108002Table7ItemDesc',
  2137. tableId: '108002Table7',
  2138. tableName: '执行属性表',
  2139. columnProp: 'itemDesc',
  2140. headerAlign: 'center',
  2141. align: 'left',
  2142. columnLabel: '属性名称',
  2143. columnHidden: false,
  2144. columnImage: false,
  2145. status: true,
  2146. fixed: '',
  2147. columnWidth: 200
  2148. },
  2149. // {
  2150. // userId: this.$store.state.user.name,
  2151. // functionId: 108002,
  2152. // serialNumber: '108002Table7ExecuteFlag',
  2153. // tableId: '108002Table7',
  2154. // tableName: '执行属性表',
  2155. // columnProp: 'executeFlag',
  2156. // headerAlign: 'center',
  2157. // align: 'center',
  2158. // columnLabel: '是否执行',
  2159. // columnHidden: false,
  2160. // columnImage: false,
  2161. // status: true,
  2162. // fixed: '',
  2163. // columnWidth: 80
  2164. // },
  2165. // {
  2166. // userId: this.$store.state.user.name,
  2167. // functionId: 108002,
  2168. // serialNumber: '108002Table7Executor',
  2169. // tableId: '108002Table7',
  2170. // tableName: '执行属性表',
  2171. // columnProp: 'executor',
  2172. // headerAlign: 'center',
  2173. // align: 'center',
  2174. // columnLabel: '执行人',
  2175. // columnHidden: false,
  2176. // columnImage: false,
  2177. // status: true,
  2178. // fixed: '',
  2179. // columnWidth: 100
  2180. // },{
  2181. // userId: this.$store.state.user.name,
  2182. // functionId: 108002,
  2183. // serialNumber: '108002Table7ExecuteDate',
  2184. // tableId: '108002Table7',
  2185. // tableName: '执行属性表',
  2186. // columnProp: 'itemExecutionDate',
  2187. // headerAlign: 'center',
  2188. // align: 'center',
  2189. // columnLabel: '执行时间',
  2190. // columnHidden: false,
  2191. // columnImage: false,
  2192. // status: true,
  2193. // fixed: '',
  2194. // columnWidth: 150
  2195. // },
  2196. ],
  2197. approvalColumnList: [
  2198. {
  2199. userId: this.$store.state.user.name,
  2200. functionId: 108002,
  2201. serialNumber: '108002Table8ClassificationNo',
  2202. tableId: '108002Table8',
  2203. tableName: '审批信息',
  2204. columnProp: 'classificationNo',
  2205. headerAlign: 'center',
  2206. align: 'center',
  2207. columnLabel: '流程分类编码',
  2208. columnHidden: false,
  2209. columnImage: false,
  2210. status: true,
  2211. fixed: '',
  2212. columnWidth: 120
  2213. },
  2214. {
  2215. userId: this.$store.state.user.name,
  2216. functionId: 108002,
  2217. serialNumber: '108002Table8ItemDesc',
  2218. tableId: '108002Table8',
  2219. tableName: '审批信息',
  2220. columnProp: 'nodeName',
  2221. headerAlign: 'center',
  2222. align: 'left',
  2223. columnLabel: '节点名称',
  2224. columnHidden: false,
  2225. columnImage: false,
  2226. status: true,
  2227. fixed: '',
  2228. columnWidth: 200
  2229. },
  2230. {
  2231. userId: this.$store.state.user.name,
  2232. functionId: 108002,
  2233. serialNumber: '108002Table8RejectFlag',
  2234. tableId: '108002Table8',
  2235. tableName: '审批信息',
  2236. columnProp: 'rejectFlagDesc',
  2237. headerAlign: 'center',
  2238. align: 'center',
  2239. columnLabel: '是否被驳回',
  2240. columnHidden: false,
  2241. columnImage: false,
  2242. status: true,
  2243. fixed: '',
  2244. columnWidth: 100
  2245. },
  2246. {
  2247. userId: this.$store.state.user.name,
  2248. functionId: 108002,
  2249. serialNumber: '108002Table8RejectNodeName',
  2250. tableId: '108002Table8',
  2251. tableName: '审批信息',
  2252. columnProp: 'rejectNodeName',
  2253. headerAlign: 'center',
  2254. align: 'center',
  2255. columnLabel: '被驳回节点名称',
  2256. columnHidden: false,
  2257. columnImage: false,
  2258. status: true,
  2259. fixed: '',
  2260. columnWidth: 200
  2261. },
  2262. {
  2263. userId: this.$store.state.user.name,
  2264. functionId: 108002,
  2265. serialNumber: '108002Table8NodeConclusionDesc',
  2266. tableId: '108002Table8',
  2267. tableName: '审批信息',
  2268. columnProp: 'nodeConclusionDesc',
  2269. headerAlign: 'center',
  2270. align: 'center',
  2271. columnLabel: '节点结论',
  2272. columnHidden: false,
  2273. columnImage: false,
  2274. status: true,
  2275. fixed: '',
  2276. columnWidth: 100
  2277. },
  2278. {
  2279. userId: this.$store.state.user.name,
  2280. functionId: 108002,
  2281. serialNumber: '108002Table8CreateDate',
  2282. tableId: '108002Table8',
  2283. tableName: '审批信息',
  2284. columnProp: 'createDate',
  2285. headerAlign: 'center',
  2286. align: 'center',
  2287. columnLabel: '提交时间',
  2288. columnHidden: false,
  2289. columnImage: false,
  2290. status: true,
  2291. fixed: '',
  2292. columnWidth: 170
  2293. },
  2294. {
  2295. userId: this.$store.state.user.name,
  2296. functionId: 108002,
  2297. serialNumber: '108002Table8CreateBy',
  2298. tableId: '108002Table8',
  2299. tableName: '审批信息',
  2300. columnProp: 'createBy',
  2301. headerAlign: 'center',
  2302. align: 'center',
  2303. columnLabel: '提交人员',
  2304. columnHidden: false,
  2305. columnImage: false,
  2306. status: true,
  2307. fixed: '',
  2308. columnWidth: 100
  2309. },
  2310. {
  2311. userId: this.$store.state.user.name,
  2312. functionId: 108002,
  2313. serialNumber: '108002Table8RejectOpinion',
  2314. tableId: '108002Table8',
  2315. tableName: '审批信息',
  2316. columnProp: 'rejectOpinion',
  2317. headerAlign: 'center',
  2318. align: 'left',
  2319. columnLabel: '驳回意见',
  2320. columnHidden: false,
  2321. columnImage: false,
  2322. status: true,
  2323. fixed: '',
  2324. columnWidth: 300
  2325. },
  2326. ],
  2327. // ======== 必填规则 ========
  2328. rules: {
  2329. applicantId: [
  2330. {
  2331. required: true,
  2332. message: ' ',
  2333. trigger: ['blur','change']
  2334. }
  2335. ],
  2336. applyDate: [
  2337. {
  2338. required: true,
  2339. message: ' ',
  2340. trigger: ['blur','change']
  2341. }
  2342. ],
  2343. changeImpact: [
  2344. {
  2345. required: true,
  2346. message: ' ',
  2347. trigger: ['blur','change']
  2348. }
  2349. ],
  2350. changeImpactDesc: [
  2351. {
  2352. required: true,
  2353. message: ' ',
  2354. trigger: ['blur','change']
  2355. }
  2356. ],
  2357. ecnStage: [
  2358. {
  2359. required: true,
  2360. message: ' ',
  2361. trigger: ['blur','change']
  2362. }
  2363. ],
  2364. changeType: [
  2365. {
  2366. required: true,
  2367. message: ' ',
  2368. trigger: ['blur','change']
  2369. }
  2370. ],
  2371. tpEngineerId: [
  2372. {
  2373. required: true,
  2374. message: ' ',
  2375. trigger: ['blur','change']
  2376. }
  2377. ],
  2378. changePhaseInDate: [
  2379. {
  2380. required: true,
  2381. message: ' ',
  2382. trigger: ['blur','change']
  2383. }
  2384. ],
  2385. dfIsProduct: [
  2386. {
  2387. required: true,
  2388. message: ' ',
  2389. trigger: ['blur','change']
  2390. }
  2391. ],
  2392. printing: [
  2393. {
  2394. required: true,
  2395. message: ' ',
  2396. trigger: ['blur','change']
  2397. }
  2398. ],
  2399. manufacturingCostIsChange: [
  2400. {
  2401. required: true,
  2402. message: ' ',
  2403. trigger: ['blur','change']
  2404. }
  2405. ],
  2406. changeRequestDesc: [
  2407. {
  2408. required: true,
  2409. message: ' ',
  2410. trigger: ['blur','change']
  2411. }
  2412. ],
  2413. isReQuote: [
  2414. {
  2415. required: true,
  2416. message: ' ',
  2417. trigger: ['blur','change']
  2418. }
  2419. ],
  2420. ulCertificationRequirements: [
  2421. {
  2422. required: true,
  2423. message: ' ',
  2424. trigger: ['blur','change']
  2425. }
  2426. ],
  2427. ulContinueToMeetDemand: [
  2428. {
  2429. required: true,
  2430. message: ' ',
  2431. trigger: ['blur','change']
  2432. }
  2433. ],
  2434. gpCertificationRequirements: [
  2435. {
  2436. required: true,
  2437. message: ' ',
  2438. trigger: ['blur','change']
  2439. }
  2440. ],
  2441. gpContinueToMeetDemand: [
  2442. {
  2443. required: true,
  2444. message: ' ',
  2445. trigger: ['blur','change']
  2446. }
  2447. ],
  2448. ecnType: [
  2449. {
  2450. required: true,
  2451. message: ' ',
  2452. trigger: ['blur','change']
  2453. }
  2454. ],
  2455. },
  2456. // ======== 复选数据集 ========
  2457. fileSelections: [],
  2458. itemSelections: [],
  2459. dataSelections2: [],
  2460. // ======== 选中的当前行数据 ========
  2461. currentRow: {},
  2462. currentCostImpactData: {},
  2463. // ======== 模态框开关控制 ========
  2464. modalFlag: false,
  2465. modalDisableFlag: false,
  2466. ecnTypeModalFlag: false,
  2467. chooseModelFlag: false,
  2468. chooseModelFlag2: false,
  2469. chooseCSModelFlag: false,
  2470. uploadDialog: false,
  2471. submitModalFlag: false,
  2472. addDetailModal: false,
  2473. saveLoading: false,
  2474. submitLoading: false
  2475. }
  2476. },
  2477. mounted () {
  2478. this.$nextTick(() => {
  2479. this.height = window.innerHeight / 2 - 30
  2480. /*第二个表格高度的动态调整*/
  2481. this.secondHeight = window.innerHeight / 2 - 186
  2482. })
  2483. },
  2484. activated () {
  2485. if (this.$route.params.type === 'tokenLogin') {
  2486. if (this.$route.params.docNo) {
  2487. this.searchData.changeNo = this.$route.params.docNo
  2488. }
  2489. this.searchData.limit = this.pageSize
  2490. this.searchData.page = this.pageIndex
  2491. changeRecordSearch(this.searchData).then(({data}) => {
  2492. if (data.code === 0) {
  2493. this.dataList = data.page.list
  2494. this.pageIndex = data.page.currPage
  2495. this.pageSize = data.page.pageSize
  2496. this.totalPage = data.page.totalCount
  2497. // 判断是否全部存在数据
  2498. if (this.dataList.length > 0) {
  2499. // 设置选中行
  2500. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  2501. this.updateModal(this.dataList[0])
  2502. } else {
  2503. this.currentRow = {}
  2504. }
  2505. // 加载当前的页签的table
  2506. this.refreshCurrentTabTable()
  2507. }
  2508. })
  2509. } else {
  2510. if (this.$route.params.changeNo) {
  2511. this.searchData.changeNo = this.$route.params.changeNo
  2512. }
  2513. this.getDataList()
  2514. }
  2515. },
  2516. created () {
  2517. this.getEcnModel()
  2518. this.getEcnModel2()
  2519. this.getEcnCSModel()
  2520. this.getBuBySite()
  2521. },
  2522. methods: {
  2523. // 获取用户的bu
  2524. getBuBySite () {
  2525. let tempData = {
  2526. site: this.$store.state.user.site,
  2527. }
  2528. getBuBySite(tempData).then(({data}) => {
  2529. if (data.code === 0) {
  2530. this.buList = data.rows
  2531. }
  2532. })
  2533. },
  2534. // 查询ECN的评估模板
  2535. getEcnModel2 () {
  2536. let tempData = {
  2537. site: this.$store.state.user.site,
  2538. functionType: 'ECN',
  2539. codeNo: 'E002'
  2540. }
  2541. getEcnModel(tempData).then(({data}) => {
  2542. if (data.code === 0) {
  2543. this.modelList2 = data.rows
  2544. }
  2545. })
  2546. },
  2547. // 查询会签的模板
  2548. getEcnCSModel () {
  2549. let tempData = {
  2550. site: this.$store.state.user.site,
  2551. functionType: 'ECN',
  2552. codeNo: 'E003'
  2553. }
  2554. getEcnModel(tempData).then(({data}) => {
  2555. if (data.code === 0) {
  2556. this.modelCSList = data.rows
  2557. }
  2558. })
  2559. },
  2560. // 选择模板属性
  2561. chooseFeasibilityAssessmentModel () {
  2562. this.chooseModelData2 = {
  2563. site: this.$store.state.user.site,
  2564. itemNo: '',
  2565. itemDesc: '',
  2566. functionType: 'ECN',
  2567. codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : ''
  2568. }
  2569. // 先清空缓存选中
  2570. //this.$nextTick(() => this.$refs.itemTable2.clearSelection())
  2571. getItemList(this.chooseModelData2).then(({data}) => {
  2572. if (data && data.code === 0) {
  2573. this.itemList2 = data.rows
  2574. this.itemList2.forEach(val => {
  2575. // 回显选中
  2576. if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) {
  2577. this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true))
  2578. }
  2579. })
  2580. } else {
  2581. this.$alert(data.msg, '错误', {
  2582. confirmButtonText: '确定'
  2583. })
  2584. }
  2585. })
  2586. this.chooseModelFlag2 = true
  2587. },
  2588. // 选择会签模板属性
  2589. chooseCSModel () {
  2590. this.chooseCSModelData = {
  2591. site: this.$store.state.user.site,
  2592. itemNo: '',
  2593. itemDesc: '',
  2594. functionType: 'ECN',
  2595. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  2596. }
  2597. // 先清空缓存选中
  2598. this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  2599. // 查询所有属性
  2600. getItemList(this.chooseCSModelData).then(({data}) => {
  2601. if (data && data.code === 0) {
  2602. this.itemCSList = data.rows
  2603. this.itemCSList.forEach(val => {
  2604. // 回显选中的部门
  2605. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  2606. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  2607. }
  2608. })
  2609. } else {
  2610. this.$alert(data.msg, '错误', {
  2611. confirmButtonText: '确定'
  2612. })
  2613. }
  2614. })
  2615. this.chooseCSModelFlag = true
  2616. },
  2617. // 确认多选属性
  2618. confirmItem2 () {
  2619. if (this.itemSelections2.length === 0) {
  2620. this.$message.warning("请勾选属性!")
  2621. return
  2622. }
  2623. // 临时集合
  2624. let temp = []
  2625. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  2626. this.chooseItemList2.forEach(itemA => {
  2627. if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) {
  2628. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  2629. temp.push(itemA)
  2630. }
  2631. })
  2632. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  2633. this.itemSelections2.forEach(itemB => {
  2634. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  2635. // 如果b中的对象名字不在结果中,则添加到结果中
  2636. temp.push(itemB)
  2637. }
  2638. })
  2639. this.chooseItemList2 = temp
  2640. this.chooseModelFlag2 = false
  2641. },
  2642. // 确认多选CS属性
  2643. confirmCSItem () {
  2644. if (this.itemCSSelections.length === 0) {
  2645. this.$message.warning("请勾选属性!")
  2646. return
  2647. }
  2648. // 临时集合
  2649. let temp = []
  2650. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  2651. this.chooseCSItemList.forEach(itemA => {
  2652. if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  2653. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  2654. temp.push(itemA)
  2655. }
  2656. })
  2657. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  2658. this.itemCSSelections.forEach(itemB => {
  2659. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  2660. // 如果b中的对象名字不在结果中,则添加到结果中
  2661. temp.push(itemB)
  2662. }
  2663. })
  2664. this.chooseCSItemList = temp
  2665. this.chooseCSModelFlag = false
  2666. },
  2667. // 查询属性
  2668. searchItemList2 () {
  2669. getItemList(this.chooseModelData2).then(({data}) => {
  2670. if (data.code === 0) {
  2671. this.itemList2 = data.rows
  2672. }
  2673. })
  2674. },
  2675. // 查询CS属性
  2676. searchCSItemList () {
  2677. getItemList(this.chooseCSModelData).then(({data}) => {
  2678. if (data.code === 0) {
  2679. this.itemCSList = data.rows
  2680. }
  2681. })
  2682. },
  2683. // 单机选择
  2684. itemClickRow2 (row) {
  2685. this.$refs.itemTable2.toggleRowSelection(row)
  2686. },
  2687. // 单击选择
  2688. itemCSClickRow (row) {
  2689. this.$refs.itemCSTable.toggleRowSelection(row)
  2690. },
  2691. // 复选属性
  2692. selectionItem2 (val) {
  2693. this.itemSelections2 = val
  2694. },
  2695. // 复选CS属性
  2696. selectionCSItem (val) {
  2697. this.itemCSSelections = val
  2698. },
  2699. // 获取流程的配置权限
  2700. async getNodeAuthority (row) {
  2701. let tempData = {
  2702. site: row.site,
  2703. changeNo: row.changeNo,
  2704. stepId: row.stepId,
  2705. menuId: this.$route.meta.menuId
  2706. }
  2707. await getNodeAuthority(tempData).then(({data}) => {
  2708. if (data && data.code === 0) {
  2709. this.plmChangeRequestArr = data.rows.plm_change_request
  2710. this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  2711. this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  2712. this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  2713. this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  2714. this.plmChangeItemArr = data.rows.plm_change_item
  2715. this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  2716. }
  2717. })
  2718. },
  2719. // ======= 正则校验 =======
  2720. handleInput (value, type) {
  2721. // 大于等于0,且只能输入16位小数
  2722. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  2723. if (val === null || val === undefined || val === '') {
  2724. val = 0
  2725. }
  2726. if (type === 1) {
  2727. this.costImpactData.productionProductScrapAmount = val
  2728. } else if (type === 2) {
  2729. this.costImpactData.inventoryProductScrapAmount = val
  2730. } else if (type === 3) {
  2731. this.costImpactData.affectedScrapAmount = val
  2732. }
  2733. },
  2734. partInput (row, val) {
  2735. row.newPartNo = val.toUpperCase()
  2736. },
  2737. executorInput (row, val) {
  2738. //row.executor = val.toUpperCase()
  2739. },
  2740. choosePartNo (row) {
  2741. this.tempPartRow = row
  2742. if (this.tempPartRow.newPartNo == null) {
  2743. this.tempPartRow.newPartNo = ''
  2744. }
  2745. this.getBaseList(133)
  2746. },
  2747. chooseExecutor (row) {
  2748. this.tempExecutorRow = row
  2749. if (this.tempExecutorRow.executor == null) {
  2750. this.tempExecutorRow.executor = ''
  2751. }
  2752. this.getBaseList(103, 7)
  2753. },
  2754. ecnTypeHeaderChange (val,index) {
  2755. if (val === 'Y') {
  2756. for (let i = 0; i < this.form[index].list.length; i++) {
  2757. this.form[index].list[i].flag = 'Y'
  2758. }
  2759. } else {
  2760. for (let i = 0; i < this.form[index].list.length; i++) {
  2761. this.form[index].list[i].flag = 'N'
  2762. }
  2763. }
  2764. },
  2765. ecnTypeDetailChange (val,index) {
  2766. if (this.form[index].list.every(x => x.flag === 'Y')) {
  2767. this.form[index].flag = 'Y'
  2768. }else {
  2769. this.form[index].flag = 'N'
  2770. }
  2771. },
  2772. // ======== 分页相关方法 ========
  2773. // 每页数
  2774. sizeChangeHandle (val) {
  2775. this.pageSize = val
  2776. this.pageIndex = 1
  2777. this.getDataList()
  2778. },
  2779. // 当前页
  2780. currentChangeHandle (val) {
  2781. this.pageIndex = val
  2782. this.getDataList()
  2783. },
  2784. // ======== 列表选择相关方法 ========
  2785. selectFlag () {
  2786. return true
  2787. },
  2788. // ======== 页签切换相关方法 ========
  2789. // 单机选中询价信息
  2790. changeClickRow (row) {
  2791. this.$refs.changeTable.toggleRowSelection(row)
  2792. this.currentRow = JSON.parse(JSON.stringify(row))
  2793. },
  2794. // // 列表表格选择替换
  2795. // tabClick (tab, event) {
  2796. // // 刷新列表数据
  2797. // this.refreshCurrentTabTable()
  2798. // },
  2799. // 当前值发生变化的时候修改
  2800. currentChange (row, oldRow) {
  2801. // 判断是否是获取焦点的事件
  2802. if (row) {
  2803. this.currentRow = JSON.parse(JSON.stringify(row))
  2804. // 刷新当前页表
  2805. this.refreshCurrentTabTable()
  2806. }
  2807. },
  2808. // 刷新页签的table数据
  2809. refreshChangeTab () {
  2810. if (this.activeName === 'inventoryCostImpact') {
  2811. } else if (this.activeName === 'actionInformation') {
  2812. }
  2813. },
  2814. // 新增库存成本影响
  2815. inventoryCostImpactSave () {
  2816. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  2817. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  2818. this.$message.warning('请填写在生产品数量!')
  2819. return
  2820. }
  2821. if (this.costImpactData.productionProductNumber <= 0) {
  2822. this.$message.warning('在生产品数量不能小于等于0!')
  2823. return
  2824. }
  2825. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  2826. this.$message.warning('请填写在生产品处理意见!')
  2827. return
  2828. }
  2829. if (this.costImpactData.productionProductScrapAmount === 0) {
  2830. this.$message.warning('请填写在生产品报废金额!')
  2831. return
  2832. }
  2833. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  2834. this.$message.warning('请填写在生产品执行人!')
  2835. return
  2836. }
  2837. }
  2838. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  2839. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  2840. this.$message.warning('请填写成品库存数量!')
  2841. return
  2842. }
  2843. if (this.costImpactData.inventoryProductNumber <= 0) {
  2844. this.$message.warning('成品库存数量不能小于等于0!')
  2845. return
  2846. }
  2847. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  2848. this.$message.warning('请填写成品库存处理意见!')
  2849. return
  2850. }
  2851. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  2852. this.$message.warning('请填写成品库存报废金额!')
  2853. return
  2854. }
  2855. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  2856. this.$message.warning('请填写成品库存执行人!')
  2857. return
  2858. }
  2859. }
  2860. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  2861. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  2862. this.$message.warning('请填写新订单数量!')
  2863. return
  2864. }
  2865. if (this.costImpactData.newOrderNumber <= 0) {
  2866. this.$message.warning('新订单数量不能小于等于0!')
  2867. return
  2868. }
  2869. }
  2870. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  2871. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  2872. this.$message.warning('请填写影响的原材料及其库存量数量!')
  2873. return
  2874. }
  2875. if (this.costImpactData.affectedNumber <= 0) {
  2876. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  2877. return
  2878. }
  2879. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  2880. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  2881. return
  2882. }
  2883. if (this.costImpactData.affectedScrapAmount === 0) {
  2884. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  2885. return
  2886. }
  2887. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  2888. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  2889. return
  2890. }
  2891. }
  2892. this.costImpactData.changeTotalCost = this.totalCost
  2893. costImpactUpdate(this.costImpactData).then(({data}) => {
  2894. if (data && data.code === 0) {
  2895. this.costImpactData = data.rows.costImpactData
  2896. this.getDataList()
  2897. this.$message({
  2898. message: '操作成功',
  2899. type: 'success',
  2900. duration: 1500,
  2901. onClose: () => {}
  2902. })
  2903. } else {
  2904. this.$alert(data.msg, '错误', {
  2905. confirmButtonText: '确定'
  2906. })
  2907. }
  2908. })
  2909. },
  2910. // 刷新页签的table数据
  2911. refreshCurrentTabTable () {
  2912. if (this.activeTable === 'basicInformation') {
  2913. this.getChangeDetailList()
  2914. } else if (this.activeTable === 'fileInformation') {
  2915. this.getChangeFileList()
  2916. } else if (this.activeTable === 'inventoryCostImpact') {
  2917. this.inventoryCostImpactSearch2()
  2918. } else if (this.activeTable === 'approvalInformation') {
  2919. this.getApprovalList()
  2920. }
  2921. },
  2922. // ======== 列表数据刷新方法 ========
  2923. // 获取数据列表
  2924. getDataList () {
  2925. if(localStorage.getItem('ecnData')!=undefined){
  2926. let data=JSON.parse(localStorage.getItem('ecnData'));
  2927. this.searchData.changeNo=data.ecnNo
  2928. localStorage.removeItem('ecnData');
  2929. }
  2930. this.searchData.limit = this.pageSize
  2931. this.searchData.page = this.pageIndex
  2932. changeRecordSearch(this.searchData).then(({data}) => {
  2933. if (data.code === 0) {
  2934. this.dataList = data.page.list
  2935. this.pageIndex = data.page.currPage
  2936. this.pageSize = data.page.pageSize
  2937. this.totalPage = data.page.totalCount
  2938. // 判断是否全部存在数据
  2939. if (this.dataList.length > 0) {
  2940. // 设置选中行
  2941. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  2942. } else {
  2943. this.currentRow = {}
  2944. }
  2945. // 加载当前的页签的table
  2946. this.refreshCurrentTabTable()
  2947. }
  2948. })
  2949. },
  2950. // 变更单详情的列表
  2951. getChangeDetailList () {
  2952. let tempData = {
  2953. site: this.$store.state.user.site,
  2954. changeNo: this.currentRow.changeNo
  2955. }
  2956. changeDetailSearch(tempData).then(({data}) => {
  2957. if (data && data.code === 0) {
  2958. this.detailList = data.rows
  2959. } else {
  2960. this.detailList = []
  2961. }
  2962. })
  2963. },
  2964. // 变更单文件的列表
  2965. getChangeFileList () {
  2966. let tempData = {
  2967. orderRef1: this.$store.state.user.site,
  2968. orderRef2: this.currentRow.changeNo
  2969. }
  2970. changeFileSearch(tempData).then(({data}) => {
  2971. if (data && data.code === 0) {
  2972. this.fileList = data.rows
  2973. } else {
  2974. this.fileList = []
  2975. }
  2976. })
  2977. },
  2978. // 复选变更单文件
  2979. selectionFile (val) {
  2980. this.fileSelections = val
  2981. },
  2982. // 上传文件
  2983. uploadFileModal () {
  2984. let currentData = {
  2985. titleCon: '工程变更文件上传',
  2986. site: this.currentRow.site,
  2987. createBy: this.$store.state.user.name,
  2988. dataNo: this.currentRow.changeNo,
  2989. fileRemark: '',
  2990. folder: 'change',
  2991. }
  2992. this.uploadDialog = true
  2993. //打开组件 去做新增业务
  2994. // this.$nextTick(() => {
  2995. // this.$refs.changeUploadFile.init(currentData);
  2996. // })
  2997. },
  2998. // 删除变更单文件
  2999. deleteChangeFile () {
  3000. if (this.fileSelections.length === 0) {
  3001. this.$message.warning('请选择要删除的文件!')
  3002. return
  3003. }
  3004. let tempData = {
  3005. fileList: this.fileSelections
  3006. }
  3007. this.$confirm('确定删除文件?', '提示', {
  3008. confirmButtonText: '确定',
  3009. cancelButtonText: '取消',
  3010. type: 'warning'
  3011. }).then(() => {
  3012. deleteChangeFile(tempData).then(({data}) => {
  3013. if (data && data.code === 0) {
  3014. this.getChangeFileList()
  3015. this.$message({
  3016. message: '操作成功',
  3017. type: 'success',
  3018. duration: 1500,
  3019. onClose: () => {}
  3020. })
  3021. } else {
  3022. this.$alert(data.msg, '错误', {
  3023. confirmButtonText: '确定'
  3024. })
  3025. }
  3026. })
  3027. })
  3028. },
  3029. // 下载
  3030. downloadFile (row) {
  3031. downLoadQuotationFile(row)
  3032. .then(({data}) => {
  3033. // 不限制文件下载类型
  3034. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3035. // 下载文件名称
  3036. const fileName = row.fileName
  3037. // a标签下载
  3038. const linkNode = document.createElement('a')
  3039. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3040. linkNode.style.display = 'none'
  3041. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3042. document.body.appendChild(linkNode)
  3043. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3044. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3045. document.body.removeChild(linkNode)
  3046. })
  3047. },
  3048. // 修改变更单模态框
  3049. async updateModal (row) {
  3050. await this.getNodeAuthority(row)
  3051. this.modalData = {
  3052. site: row.site,
  3053. changeNo: row.changeNo,
  3054. applicantId: row.applicantId,
  3055. applicantName: row.applicantName,
  3056. applicationDepartmentId: row.applicationDepartmentId,
  3057. applicationDepartmentName: row.applicationDepartmentName,
  3058. applyDate: row.applyDate,
  3059. ecnType: row.ecnType,
  3060. changeImpact: row.changeImpact,
  3061. changeImpactDesc: row.changeImpactDesc,
  3062. ecnStage: row.ecnStage,
  3063. changeType: row.changeType,
  3064. tpEngineerId: row.tpEngineerId,
  3065. tpEngineerName: row.tpEngineerName,
  3066. changePhaseInDate: row.changePhaseInDate,
  3067. dfIsProduct: row.dfIsProduct,
  3068. printing: row.printing,
  3069. manufacturingCostIsChange: row.manufacturingCostIsChange,
  3070. changeRequestDesc: row.changeRequestDesc,
  3071. isReQuote: row.isReQuote,
  3072. ulCertificationRequirements: row.ulCertificationRequirements,
  3073. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  3074. gpCertificationRequirements: row.gpCertificationRequirements,
  3075. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  3076. updateBy: this.$store.state.user.name,
  3077. detailList: [],
  3078. ecnTypeData: [],
  3079. industrialEngineerId: row.industrialEngineerId,
  3080. industrialEngineerName: row.industrialEngineerName,
  3081. changeStatus: row.changeStatus,
  3082. cqcOperatorId: row.cqcOperatorId,
  3083. cqcOperatorName: row.cqcOperatorName,
  3084. faiOperatorId: row.faiOperatorId,
  3085. faiOperatorName: row.faiOperatorName,
  3086. nodeConclusion: '',
  3087. rejectOpinion: '',
  3088. stepId: row.stepId,
  3089. rejectFlag: row.rejectFlag,
  3090. rejectStepId: row.rejectStepId,
  3091. isReject: row.isReject,
  3092. menuId: this.$route.meta.menuId,
  3093. userName: this.$store.state.user.name,
  3094. nodeId: row.nodeId,
  3095. buNo: row.buNo
  3096. }
  3097. this.changeTitle = '变更申请-' + this.modalData.changeNo
  3098. // 查选择的ECN种类
  3099. this.getChangeChooseEcnType()
  3100. // 查变更单明细
  3101. this.changeRequestDetailSearch()
  3102. // 查变更单库存成本影响
  3103. this.inventoryCostImpactSearch()
  3104. // 查变更单TP&执行信息
  3105. this.tpExecutionInfoSearch()
  3106. // 查变更单会签信息
  3107. this.countersignatureSearch()
  3108. this.activeName = 'basicInformation'
  3109. this.modalFlag = true
  3110. this.modalDisableFlag = true
  3111. },
  3112. // 下达
  3113. issueModal (row) {
  3114. this.$confirm(`是否确认下达?`, '提示', {
  3115. confirmButtonText: '确定',
  3116. cancelButtonText: '取消',
  3117. type: 'warning'
  3118. }).then(() => {
  3119. let tempData = {
  3120. site: row.site,
  3121. userName: this.$store.state.user.name,
  3122. changeNo: row.changeNo,
  3123. menuId: this.$route.meta.menuId
  3124. }
  3125. issueChange(tempData).then(({data}) => {
  3126. if (data && data.code === 0) {
  3127. this.getDataList()
  3128. this.$message({message: '操作成功', type: 'success'})
  3129. } else {
  3130. this.$alert(data.msg, '错误', {
  3131. confirmButtonText: '确定'
  3132. })
  3133. }
  3134. })
  3135. })
  3136. },
  3137. // 打开提交模态框
  3138. submitDataModal () {
  3139. this.rejectOpinion = ''
  3140. this.submitModalFlag = true
  3141. },
  3142. // 同意提交
  3143. agreeSubmit () {
  3144. this.$confirm(`是否确认提交?`, '提示', {
  3145. confirmButtonText: '确定',
  3146. cancelButtonText: '取消',
  3147. type: 'warning'
  3148. }).then(() => {
  3149. this.modalData.nodeConclusion = 'Y'
  3150. this.submitData()
  3151. })
  3152. },
  3153. // 驳回提交
  3154. rejectSubmit () {
  3155. this.$confirm(`是否确认驳回?`, '提示', {
  3156. confirmButtonText: '确定',
  3157. cancelButtonText: '取消',
  3158. type: 'warning'
  3159. }).then(() => {
  3160. this.modalData.rejectOpinion = this.rejectOpinion
  3161. this.modalData.nodeConclusion = 'N'
  3162. this.submitData()
  3163. })
  3164. },
  3165. // 提交
  3166. submitData () {
  3167. if (this.plmChangeRequestArr) {
  3168. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  3169. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  3170. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  3171. return
  3172. }
  3173. }
  3174. }
  3175. if (this.plmChangeRequestDetailArr) {
  3176. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  3177. if (!this.modalData[this.plmChangeRequestDetailArr[i].fieldId] && this.plmChangeRequestDetailArr[i].required === 'Y') {
  3178. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  3179. return
  3180. }
  3181. }
  3182. }
  3183. if (this.plmChangeCostImpactArr) {
  3184. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  3185. if (!this.modalData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  3186. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  3187. return
  3188. }
  3189. }
  3190. }
  3191. if (this.plmChangeFAItemArr) {
  3192. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  3193. if (!this.modalData[this.plmChangeFAItemArr[i].fieldId] && this.plmChangeFAItemArr[i].required === 'Y') {
  3194. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  3195. return
  3196. }
  3197. }
  3198. }
  3199. if (this.plmChangeExecutionInfoArr) {
  3200. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  3201. if (!this.modalData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  3202. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  3203. return
  3204. }
  3205. }
  3206. }
  3207. if (this.plmChangeItemArr) {
  3208. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  3209. if (!this.modalData[this.plmChangeItemArr[i].fieldId] && this.plmChangeItemArr[i].required === 'Y') {
  3210. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  3211. return
  3212. }
  3213. }
  3214. }
  3215. if (this.plmChangeCountersignatureItemArr) {
  3216. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  3217. if (!this.modalData[this.plmChangeCountersignatureItemArr[i].fieldId] && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  3218. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  3219. return
  3220. }
  3221. }
  3222. }
  3223. if (this.chooseDataList.length === 0) {
  3224. this.$message.warning('请添加需要变更的技术参数卡!')
  3225. return
  3226. }
  3227. this.costImpactData.changeTotalCost = this.totalCost
  3228. this.executionInfoData.chooseItemList = this.chooseItemList
  3229. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3230. this.countersignatureData.changeNo = this.modalData.changeNo
  3231. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  3232. this.modalData.userName = this.$store.state.user.name
  3233. this.modalData.menuId = this.$route.meta.menuId
  3234. this.modalData.detailList = this.chooseDataList
  3235. this.modalData.ecnTypeData = this.form
  3236. this.modalData.costImpactData = this.costImpactData
  3237. this.modalData.executionInfoData = this.executionInfoData
  3238. this.modalData.countersignatureData = this.countersignatureData
  3239. this.submitLoading = true
  3240. submitChange(this.modalData).then(({data}) => {
  3241. if (data && data.code === 0) {
  3242. this.getDataList()
  3243. this.$message({message: '操作成功', type: 'success'})
  3244. this.submitModalFlag = false
  3245. this.modalFlag = false
  3246. } else {
  3247. this.$alert(data.msg, '错误', {
  3248. confirmButtonText: '确定'
  3249. })
  3250. }
  3251. this.submitLoading = false
  3252. }).catch(()=>{
  3253. this.submitLoading = false
  3254. })
  3255. },
  3256. // 获取选择的ECN种类
  3257. getChangeChooseEcnType () {
  3258. getChooseEcnType(this.modalData).then(({data}) => {
  3259. if (data && data.code === 0) {
  3260. this.form = data.rows
  3261. } else {
  3262. this.$alert(data.msg, '错误', {
  3263. confirmButtonText: '确定'
  3264. })
  3265. }
  3266. })
  3267. },
  3268. // 打开ECN种类模态框
  3269. chooseEcnTypeModal () {
  3270. this.ecnTypeModalFlag = true
  3271. },
  3272. // 保存ECN种类
  3273. saveEcnTypeData () {
  3274. this.ecnTypeModalFlag = false
  3275. },
  3276. // 查询ECN的模板
  3277. getEcnModel () {
  3278. let tempData = {
  3279. site: this.$store.state.user.site,
  3280. functionType: 'ECN',
  3281. codeNo: 'E001'
  3282. }
  3283. getEcnModel(tempData).then(({data}) => {
  3284. if (data.code === 0) {
  3285. this.modelList = data.rows
  3286. }
  3287. })
  3288. },
  3289. // 查询变更明细表
  3290. changeRequestDetailSearch () {
  3291. requestDetailSearch(this.modalData).then(({data}) => {
  3292. if (data && data.code === 0) {
  3293. this.chooseDataList = data.rows
  3294. } else {
  3295. this.$alert(data.msg, '错误', {
  3296. confirmButtonText: '确定'
  3297. })
  3298. }
  3299. })
  3300. },
  3301. // 查询库存成本影响对象
  3302. inventoryCostImpactSearch () {
  3303. costImpactSearch(this.modalData).then(({data}) => {
  3304. if (data && data.code === 0) {
  3305. this.costImpactData = data.rows
  3306. } else {
  3307. this.$alert(data.msg, '错误', {
  3308. confirmButtonText: '确定'
  3309. })
  3310. }
  3311. })
  3312. },
  3313. // 查询库存成本影响对象
  3314. inventoryCostImpactSearch2 () {
  3315. costImpactSearch(this.currentRow).then(({data}) => {
  3316. if (data && data.code === 0) {
  3317. this.currentCostImpactData = data.rows
  3318. } else {
  3319. this.$alert(data.msg, '错误', {
  3320. confirmButtonText: '确定'
  3321. })
  3322. }
  3323. })
  3324. },
  3325. // 查询审批信息
  3326. getApprovalList () {
  3327. let tempData = {
  3328. site: this.$store.state.user.site,
  3329. menuId: this.$route.meta.menuId,
  3330. documentNo: this.currentRow.changeNo
  3331. }
  3332. getApprovalList(tempData).then(({data}) => {
  3333. if (data && data.code === 0) {
  3334. this.approvalList = data.rows
  3335. } else {
  3336. this.approvalList = []
  3337. }
  3338. })
  3339. },
  3340. // 查询执行信息
  3341. tpExecutionInfoSearch () {
  3342. executionInfoSearch(this.modalData).then(({data}) => {
  3343. if (data && data.code === 0) {
  3344. this.executionInfoData = data.rows.executionInfoData
  3345. this.executionInfoData.createBy = this.$store.state.user.name
  3346. this.chooseItemList = data.rows.chooseItemList
  3347. this.chooseItemList2 = data.rows.chooseItemList2
  3348. } else {
  3349. this.$alert(data.msg, '错误', {
  3350. confirmButtonText: '确定'
  3351. })
  3352. }
  3353. })
  3354. },
  3355. // 查询会签信息
  3356. countersignatureSearch () {
  3357. countersignatureSearch(this.modalData).then(({data}) => {
  3358. if (data && data.code === 0) {
  3359. this.chooseCSItemList = data.rows.chooseCSItemList
  3360. } else {
  3361. this.$alert(data.msg, '错误', {
  3362. confirmButtonText: '确定'
  3363. })
  3364. }
  3365. })
  3366. },
  3367. // 删除所选技术参数卡
  3368. deleteChooseDataModal (row) {
  3369. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  3370. confirmButtonText: '确定',
  3371. cancelButtonText: '取消',
  3372. type: 'warning'
  3373. }).then(() => {
  3374. deleteChangeDetail(row).then(({data}) => {
  3375. if (data && data.code === 0) {
  3376. this.changeRequestDetailSearch()
  3377. this.$message({
  3378. message: '操作成功',
  3379. type: 'success',
  3380. duration: 1500,
  3381. onClose: () => {}
  3382. })
  3383. } else {
  3384. this.$alert(data.msg, '错误', {
  3385. confirmButtonText: '确定'
  3386. })
  3387. }
  3388. })
  3389. })
  3390. },
  3391. // 修改变更申请
  3392. saveData () {
  3393. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  3394. this.$message.warning('请选择申请人员!')
  3395. return
  3396. }
  3397. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  3398. this.$message.warning('请选择申请日期!')
  3399. return
  3400. }
  3401. // if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  3402. // this.$message.warning('请选择ECN变更影响!')
  3403. // return
  3404. // }
  3405. // if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  3406. // this.$message.warning('请填写变更影响描述!')
  3407. // return
  3408. // }
  3409. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  3410. this.$message.warning('请选择ECN阶段!')
  3411. return
  3412. }
  3413. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  3414. this.$message.warning('请选择变更类别!')
  3415. return
  3416. }
  3417. if (this.form.length === 0) {
  3418. this.$message.warning('请选择ECN种类!')
  3419. return
  3420. }
  3421. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  3422. this.$message.warning('请选择审批人员!')
  3423. return
  3424. }
  3425. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  3426. this.$message.warning('请选择变更生效日期!')
  3427. return
  3428. }
  3429. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  3430. this.$message.warning('请选择是否DF产品!')
  3431. return
  3432. }
  3433. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  3434. this.$message.warning('请选择I/E!')
  3435. return
  3436. }
  3437. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  3438. this.$message.warning('请填写变更要求描述!')
  3439. return
  3440. }
  3441. if (this.modalData.printing === '' || this.modalData.printing == null) {
  3442. this.$message.warning('请选择印刷方式!')
  3443. return
  3444. }
  3445. // if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
  3446. // this.$message.warning('请选择CQC或者FAI人员!')
  3447. // return
  3448. // }
  3449. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3450. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  3451. this.$message.warning('请填写在生产品数量!')
  3452. return
  3453. }
  3454. if (this.costImpactData.productionProductNumber <= 0) {
  3455. this.$message.warning('在生产品数量不能小于等于0!')
  3456. return
  3457. }
  3458. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3459. this.$message.warning('请填写在生产品处理意见!')
  3460. return
  3461. }
  3462. if (this.costImpactData.productionProductScrapAmount === 0) {
  3463. this.$message.warning('请填写在生产品报废金额!')
  3464. return
  3465. }
  3466. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3467. this.$message.warning('请填写在生产品执行人!')
  3468. return
  3469. }
  3470. }
  3471. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3472. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  3473. this.$message.warning('请填写成品库存数量!')
  3474. return
  3475. }
  3476. if (this.costImpactData.inventoryProductNumber <= 0) {
  3477. this.$message.warning('成品库存数量不能小于等于0!')
  3478. return
  3479. }
  3480. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3481. this.$message.warning('请填写成品库存处理意见!')
  3482. return
  3483. }
  3484. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  3485. this.$message.warning('请填写成品库存报废金额!')
  3486. return
  3487. }
  3488. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3489. this.$message.warning('请填写成品库存执行人!')
  3490. return
  3491. }
  3492. }
  3493. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  3494. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  3495. this.$message.warning('请填写新订单数量!')
  3496. return
  3497. }
  3498. if (this.costImpactData.newOrderNumber <= 0) {
  3499. this.$message.warning('新订单数量不能小于等于0!')
  3500. return
  3501. }
  3502. }
  3503. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3504. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  3505. this.$message.warning('请填写影响的原材料及其库存量数量!')
  3506. return
  3507. }
  3508. if (this.costImpactData.affectedNumber <= 0) {
  3509. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  3510. return
  3511. }
  3512. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3513. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3514. return
  3515. }
  3516. if (this.costImpactData.affectedScrapAmount === 0) {
  3517. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  3518. return
  3519. }
  3520. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3521. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3522. return
  3523. }
  3524. }
  3525. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  3526. this.$message.warning('请填写原啤刀编号!')
  3527. return;
  3528. }
  3529. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  3530. this.$message.warning('请填写新啤刀编号!')
  3531. return;
  3532. }
  3533. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  3534. this.$message.warning('请填写原网板/印版编号!')
  3535. return;
  3536. }
  3537. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  3538. this.$message.warning('请填写新网板/印版编号!')
  3539. return;
  3540. }
  3541. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  3542. this.$message.warning('请选择ECN执行日期!')
  3543. return;
  3544. }
  3545. if (this.chooseDataList.length === 0) {
  3546. this.$message.warning('请添加需要变更的技术参数卡!')
  3547. return
  3548. }
  3549. this.costImpactData.changeTotalCost = this.totalCost
  3550. this.executionInfoData.chooseItemList = this.chooseItemList
  3551. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3552. this.countersignatureData.changeNo = this.modalData.changeNo
  3553. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  3554. this.modalData.detailList = this.chooseDataList
  3555. this.modalData.ecnTypeData = this.form
  3556. this.modalData.costImpactData = this.costImpactData
  3557. this.modalData.executionInfoData = this.executionInfoData
  3558. this.modalData.countersignatureData = this.countersignatureData
  3559. this.saveLoading = true
  3560. changeRequestUpdate(this.modalData).then(({data}) => {
  3561. if (data && data.code === 0) {
  3562. this.modalData = data.rows.modalData
  3563. this.modalData.menuId = this.$route.meta.menuId
  3564. this.changeTitle = '变更申请-' + this.modalData.changeNo
  3565. this.form = data.rows.form
  3566. this.chooseDataList = data.rows.chooseDataList
  3567. this.costImpactData = data.rows.costImpactData
  3568. this.executionInfoData = data.rows.executionInfoData
  3569. this.executionInfoData.createBy = this.$store.state.user.name
  3570. this.chooseItemList = data.rows.chooseItemList
  3571. this.chooseItemList2 = data.rows.chooseItemList2
  3572. this.chooseCSItemList = data.rows.chooseCSItemList
  3573. this.getDataList()
  3574. this.$message({
  3575. message: '操作成功',
  3576. type: 'success',
  3577. duration: 1500,
  3578. onClose: () => {}
  3579. })
  3580. } else {
  3581. this.$alert(data.msg, '错误', {
  3582. confirmButtonText: '确定'
  3583. })
  3584. }
  3585. this.saveLoading = false
  3586. }).catch(()=>{
  3587. this.saveLoading = false
  3588. })
  3589. },
  3590. // 选择模板属性
  3591. chooseModel () {
  3592. this.chooseModelData = {
  3593. site: this.$store.state.user.site,
  3594. itemNo: '',
  3595. itemDesc: '',
  3596. functionType: 'ECN',
  3597. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  3598. }
  3599. // 先清空缓存选中
  3600. //this.$nextTick(() => this.$refs.itemTable.clearSelection())
  3601. // 查询所有属性
  3602. getItemList(this.chooseModelData).then(({data}) => {
  3603. if (data && data.code === 0) {
  3604. this.itemList = data.rows
  3605. this.itemList.forEach(val => {
  3606. // 回显选中的部门
  3607. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  3608. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  3609. }
  3610. })
  3611. } else {
  3612. this.$alert(data.msg, '错误', {
  3613. confirmButtonText: '确定'
  3614. })
  3615. }
  3616. })
  3617. this.chooseModelFlag = true
  3618. },
  3619. // 查询属性
  3620. searchItemList () {
  3621. getItemList(this.chooseModelData).then(({data}) => {
  3622. if (data.code === 0) {
  3623. this.itemList = data.rows
  3624. }
  3625. })
  3626. },
  3627. // 单机选择
  3628. itemClickRow (row) {
  3629. this.$refs.itemTable.toggleRowSelection(row)
  3630. },
  3631. // 复选属性
  3632. selectionItem (val) {
  3633. this.itemSelections = val
  3634. },
  3635. // 确认多选属性
  3636. confirmItem () {
  3637. if (this.itemSelections.length === 0) {
  3638. this.$message.warning("请勾选属性!")
  3639. return
  3640. }
  3641. // 临时集合
  3642. let temp = []
  3643. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3644. this.chooseItemList.forEach(itemA => {
  3645. if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3646. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3647. temp.push(itemA)
  3648. }
  3649. })
  3650. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3651. this.itemSelections.forEach(itemB => {
  3652. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3653. // 如果b中的对象名字不在结果中,则添加到结果中
  3654. temp.push(itemB)
  3655. }
  3656. })
  3657. this.chooseItemList = temp
  3658. this.chooseModelFlag = false
  3659. },
  3660. // 执行所选属性
  3661. executeModal (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. if (this.modalData.changeStatus === '审批中') {
  3667. this.agreeSubmit()
  3668. }
  3669. },
  3670. // 执行所选属性
  3671. executeCSModal (row) {
  3672. row.executeFlag = 'Y'
  3673. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  3674. row.executor = this.$store.state.user.name
  3675. },
  3676. // 执行所选属性
  3677. executeModal2 (row) {
  3678. row.executeFlag = 'Y'
  3679. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  3680. row.executor = this.$store.state.user.name
  3681. },
  3682. // 编辑执行信息
  3683. executionInformationSave () {
  3684. this.executionInfoData.chooseItemList = this.chooseItemList
  3685. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3686. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  3687. this.$message.warning('请填写原啤刀编号!')
  3688. return;
  3689. }
  3690. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  3691. this.$message.warning('请填写新啤刀编号!')
  3692. return;
  3693. }
  3694. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  3695. this.$message.warning('请填写原网板/印版编号!')
  3696. return;
  3697. }
  3698. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  3699. this.$message.warning('请填写新网板/印版编号!')
  3700. return;
  3701. }
  3702. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  3703. this.$message.warning('请选择ECN执行日期!')
  3704. return;
  3705. }
  3706. executionUpdate(this.executionInfoData).then(({data}) => {
  3707. if (data && data.code === 0) {
  3708. this.executionInfoData = data.rows.executionInfoData
  3709. this.executionInfoData.createBy = this.$store.state.user.name
  3710. this.chooseItemList = data.rows.chooseItemList
  3711. this.chooseItemList2 = data.rows.chooseItemList2
  3712. this.getDataList()
  3713. this.$message({
  3714. message: '操作成功',
  3715. type: 'success',
  3716. duration: 1500,
  3717. onClose: () => {}
  3718. })
  3719. } else {
  3720. this.$alert(data.msg, '错误', {
  3721. confirmButtonText: '确定'
  3722. })
  3723. }
  3724. })
  3725. },
  3726. // 编辑会签信息
  3727. countersignatureSave () {
  3728. this.countersignatureData.changeNo = this.modalData.changeNo
  3729. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  3730. countersignatureUpdate(this.countersignatureData).then(({data}) => {
  3731. if (data && data.code === 0) {
  3732. this.chooseCSItemList = data.rows.chooseCSItemList
  3733. this.getDataList()
  3734. this.$message({
  3735. message: '操作成功',
  3736. type: 'success',
  3737. duration: 1500,
  3738. onClose: () => {}
  3739. })
  3740. } else {
  3741. this.$alert(data.msg, '错误', {
  3742. confirmButtonText: '确定'
  3743. })
  3744. }
  3745. })
  3746. },
  3747. // 新增技术参数卡
  3748. addChangeDetail () {
  3749. this.searchData2.buNo = this.modalData.buNo
  3750. technicalSpecificationSearch2(this.searchData2).then(({data}) => {
  3751. if (data.code === 0) {
  3752. this.dataList2 = data.rows
  3753. const shouldExclude = (item) => {
  3754. return this.chooseDataList.some(cdItem =>
  3755. cdItem.site === item.site && cdItem.codeNo === item.codeNo
  3756. )
  3757. }
  3758. this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
  3759. this.addDetailModal = true
  3760. } else {
  3761. this.dataList2 = []
  3762. }
  3763. })
  3764. },
  3765. // 复选物料信息
  3766. selectionData2 (val) {
  3767. this.dataSelections2 = val
  3768. },
  3769. // 确认选择技术参数卡
  3770. addDetail () {
  3771. if (this.dataSelections2.length === 0) {
  3772. this.$message.warning("请勾选技术参数卡!")
  3773. return
  3774. }
  3775. this.dataSelections2.forEach(item => {
  3776. // 确保没有重复的元素
  3777. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
  3778. this.chooseDataList.push(item)
  3779. }
  3780. })
  3781. this.addDetailModal = false
  3782. this.dataSelections2 = []
  3783. },
  3784. // 回车换行
  3785. focusNextInput (index, type) {
  3786. let aaa = ''
  3787. if (this.chooseDataList.length - 1 === index) {
  3788. aaa = `${type}0`
  3789. } else {
  3790. aaa = `${type}${index + 1}`
  3791. }
  3792. this.$nextTick(() => {
  3793. this.$refs[aaa].focus()
  3794. })
  3795. },
  3796. // 根据人员编码查人员部门
  3797. getDepartmentByUserName () {
  3798. let tempData = {
  3799. site: this.$store.state.user.site,
  3800. username: this.modalData.applicantId
  3801. }
  3802. getDepartmentByUserName(tempData).then(({data}) => {
  3803. if (data.code === 0) {
  3804. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  3805. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  3806. }
  3807. })
  3808. },
  3809. // 预览
  3810. previewFile (row) {
  3811. // 预览文件
  3812. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  3813. let type = ''
  3814. if (image.includes(row.fileType.toLowerCase())) {
  3815. type = 'image/' + row.fileType
  3816. }
  3817. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  3818. if (video.includes(row.fileType.toLowerCase())) {
  3819. type = 'video/' + row.fileType
  3820. }
  3821. let txt = ['txt']
  3822. if (txt.includes(row.fileType.toLowerCase())) {
  3823. type = 'text/plain'
  3824. }
  3825. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  3826. if (office.includes(row.fileType.toLowerCase())) {
  3827. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  3828. return
  3829. }
  3830. let pdf = ['pdf']
  3831. if (pdf.includes(row.fileType.toLowerCase())) {
  3832. type = 'application/pdf'
  3833. }
  3834. if (type === ''){
  3835. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  3836. return;
  3837. }
  3838. downLoadQuotationFile(row).then(({data}) => {
  3839. const blob = new Blob([data], { type: type });
  3840. // 创建URL来生成预览
  3841. const fileURL = URL.createObjectURL(blob);
  3842. // 在新标签页中打开文件预览
  3843. const newTab = window.open(fileURL, '_blank')
  3844. })
  3845. },
  3846. // ======== chooseList相关方法 ========
  3847. // 获取基础数据列表S
  3848. getBaseList (val, type) {
  3849. this.tagNo = val
  3850. this.tagNo1 = type
  3851. this.$nextTick(() => {
  3852. let strVal = ''
  3853. let conSql = ''
  3854. if (val === 103) {
  3855. if (type === 1) {
  3856. strVal = this.modalData.applicantId
  3857. } else if (type === 3) {
  3858. strVal = this.costImpactData.productionProductExecutor
  3859. } else if (type === 4) {
  3860. strVal = this.costImpactData.inventoryProductExecutor
  3861. } else if (type === 5) {
  3862. strVal = this.costImpactData.affectedExecutor
  3863. } else if (type === 7) {
  3864. strVal = this.tempExecutorRow.executor
  3865. }
  3866. }
  3867. if (val === 133) {
  3868. strVal = this.tempPartRow.newPartNo
  3869. }
  3870. if (val === 2005) {
  3871. strVal = this.modalData.tpEngineerId
  3872. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3873. }
  3874. if (val === 2006) {
  3875. strVal = this.modalData.industrialEngineerId
  3876. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3877. }
  3878. if (val === 2007) {
  3879. strVal = this.modalData.cqcOperatorId
  3880. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3881. }
  3882. if (val === 2008) {
  3883. strVal = this.modalData.faiOperatorId
  3884. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  3885. }
  3886. this.$refs.baseList.init(val, strVal, conSql)
  3887. })
  3888. },
  3889. // 列表方法的回调
  3890. getBaseData (val) {
  3891. if (this.tagNo === 103) {
  3892. if (this.tagNo1 === 1) {
  3893. this.modalData.applicantId = val.username
  3894. this.modalData.applicantName = val.user_display
  3895. this.getDepartmentByUserName()
  3896. } else if (this.tagNo1 === 3) {
  3897. this.costImpactData.productionProductExecutor = val.username
  3898. this.costImpactData.productionProductExecutorName = val.user_display
  3899. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  3900. } else if (this.tagNo1 === 4) {
  3901. this.costImpactData.inventoryProductExecutor = val.username
  3902. this.costImpactData.inventoryProductExecutorName = val.user_display
  3903. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  3904. } else if (this.tagNo1 === 5) {
  3905. this.costImpactData.affectedExecutor = val.username
  3906. this.costImpactData.affectedExecutorName = val.user_display
  3907. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  3908. } else if (this.tagNo1 === 7) {
  3909. this.$set(this.tempExecutorRow,'executor',val.username)
  3910. }
  3911. }
  3912. if (this.tagNo === 133) {
  3913. //this.tempPartRow.newPartNo = val.part_no
  3914. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  3915. }
  3916. if (this.tagNo === 2005) {
  3917. this.modalData.tpEngineerId = val.username
  3918. this.modalData.tpEngineerName = val.user_display
  3919. }
  3920. if (this.tagNo === 2006) {
  3921. this.modalData.industrialEngineerId = val.username
  3922. this.modalData.industrialEngineerName = val.user_display
  3923. }
  3924. if (this.tagNo === 2007) {
  3925. this.modalData.cqcOperatorId = val.username
  3926. this.modalData.cqcOperatorName = val.user_display
  3927. }
  3928. if (this.tagNo === 2008) {
  3929. this.modalData.faiOperatorId = val.username
  3930. this.modalData.faiOperatorName = val.user_display
  3931. }
  3932. },
  3933. // 申请人输入校验
  3934. applicantBlur (tagNo) {
  3935. if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
  3936. let tempData = {
  3937. tagno: tagNo,
  3938. conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
  3939. }
  3940. verifyData(tempData).then(({data}) => {
  3941. if (data && data.code === 0) {
  3942. if (data.baseListData.length > 0) {
  3943. this.modalData.applicantId = data.baseListData[0].username
  3944. this.modalData.applicantName = data.baseListData[0].user_display
  3945. this.getDepartmentByUserName()
  3946. return
  3947. }
  3948. }
  3949. })
  3950. }
  3951. this.modalData.applicantName = ''
  3952. this.modalData.applicationDepartmentId = ''
  3953. this.modalData.applicationDepartmentName = ''
  3954. },
  3955. // 审批人员输入校验
  3956. tpEngineerBlur (tagNo) {
  3957. if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
  3958. let tempData = {
  3959. tagno: tagNo,
  3960. conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  3961. }
  3962. verifyData(tempData).then(({data}) => {
  3963. if (data && data.code === 0) {
  3964. if (data.baseListData.length > 0) {
  3965. this.modalData.tpEngineerId = data.baseListData[0].username
  3966. this.modalData.tpEngineerName = data.baseListData[0].user_display
  3967. return
  3968. }
  3969. }
  3970. })
  3971. }
  3972. this.modalData.tpEngineerName = ''
  3973. },
  3974. // I/E输入校验
  3975. industrialEngineerBlur (tagNo) {
  3976. if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
  3977. let tempData = {
  3978. tagno: tagNo,
  3979. conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  3980. }
  3981. verifyData(tempData).then(({data}) => {
  3982. if (data && data.code === 0) {
  3983. if (data.baseListData.length > 0) {
  3984. this.modalData.industrialEngineerId = data.baseListData[0].username
  3985. this.modalData.industrialEngineerName = data.baseListData[0].user_display
  3986. return
  3987. }
  3988. }
  3989. })
  3990. }
  3991. this.modalData.industrialEngineerName = ''
  3992. },
  3993. // CQC输入校验
  3994. cqcOperatorBlur (tagNo) {
  3995. if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
  3996. let tempData = {
  3997. tagno: tagNo,
  3998. conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  3999. }
  4000. verifyData(tempData).then(({data}) => {
  4001. if (data && data.code === 0) {
  4002. if (data.baseListData.length > 0) {
  4003. this.modalData.cqcOperatorId = data.baseListData[0].username
  4004. this.modalData.cqcOperatorName = data.baseListData[0].user_display
  4005. return
  4006. }
  4007. }
  4008. })
  4009. }
  4010. this.modalData.cqcOperatorName = ''
  4011. },
  4012. // FAI输入校验
  4013. faiOperatorBlur (tagNo) {
  4014. if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
  4015. let tempData = {
  4016. tagno: tagNo,
  4017. conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  4018. }
  4019. verifyData(tempData).then(({data}) => {
  4020. if (data && data.code === 0) {
  4021. if (data.baseListData.length > 0) {
  4022. this.modalData.faiOperatorId = data.baseListData[0].username
  4023. this.modalData.faiOperatorName = data.baseListData[0].user_display
  4024. return
  4025. }
  4026. }
  4027. })
  4028. }
  4029. this.modalData.faiOperatorName = ''
  4030. },
  4031. toMenu (row) {
  4032. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  4033. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4034. } else {
  4035. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo:row.codeNo},})
  4036. }
  4037. },
  4038. // ======== 导出相关方法 ========
  4039. /**
  4040. * 导出excel
  4041. */
  4042. async createExportData () {
  4043. this.searchData.limit = -1
  4044. this.searchData.page = 1
  4045. await changeRecordSearch(this.searchData).then(({data}) => {
  4046. this.resultList = data.page.list
  4047. })
  4048. return this.resultList
  4049. },
  4050. startDownload () {},
  4051. finishDownload () {},
  4052. fields () {
  4053. let json = '{'
  4054. this.columnList.forEach((item, index) => {
  4055. if (index === this.columnList.length - 1) {
  4056. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  4057. } else {
  4058. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  4059. }
  4060. })
  4061. json += '}'
  4062. let s = eval('(' + json + ')')
  4063. return s
  4064. },
  4065. rowStyle ({row}) {
  4066. if (this.currentRow.changeNo === row.changeNo) {
  4067. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  4068. }
  4069. },
  4070. }
  4071. }
  4072. </script>
  4073. <style scoped lang="scss">
  4074. /deep/ .customer-tab .el-tabs__content {
  4075. padding: 0px !important;
  4076. }
  4077. .numInput /deep/ .el-input__inner{
  4078. text-align: right;
  4079. }
  4080. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  4081. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  4082. -webkit-appearance: none;
  4083. }
  4084. /deep/ .inlineNumber input[type="number"]{
  4085. -moz-appearance: textfield;
  4086. padding-right: 5px !important;
  4087. }
  4088. </style>