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.

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