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.

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