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.

4926 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
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">TP工程师</span>
  141. <span v-else style="cursor: pointer" slot="label" @click="getBaseList(2005)"><a herf="#">TP工程师</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. 'costImpactData.productionProductFlag': function(newVal) {
  1429. if (newVal !== 'Y') {
  1430. this.costImpactData.productionProductNumber = ''
  1431. this.costImpactData.productionProductOpinions = ''
  1432. this.costImpactData.productionProductScrapAmount = 0
  1433. this.costImpactData.productionProductExecutor = ''
  1434. this.costImpactData.productionProductExecutorName = ''
  1435. }
  1436. },
  1437. 'costImpactData.inventoryProductFlag': function(newVal) {
  1438. if (newVal !== 'Y') {
  1439. this.costImpactData.inventoryProductNumber = ''
  1440. this.costImpactData.inventoryProductOpinions = ''
  1441. this.costImpactData.inventoryProductScrapAmount = 0
  1442. this.costImpactData.inventoryProductExecutor = ''
  1443. this.costImpactData.inventoryProductExecutorName = ''
  1444. }
  1445. },
  1446. 'costImpactData.newOrderFlag': function(newVal) {
  1447. if (newVal !== 'Y') {
  1448. this.costImpactData.newOrderNumber = ''
  1449. }
  1450. },
  1451. 'costImpactData.affectedFlag': function(newVal) {
  1452. if (newVal !== 'Y') {
  1453. this.costImpactData.affectedNumber = ''
  1454. this.costImpactData.affectedOpinions = ''
  1455. this.costImpactData.affectedScrapAmount = 0
  1456. this.costImpactData.affectedExecutor = ''
  1457. this.costImpactData.affectedExecutorName = ''
  1458. }
  1459. },
  1460. },
  1461. data () {
  1462. return {
  1463. buList: [],
  1464. // 导出
  1465. exportData: [],
  1466. exportName: '工程变更记录' + this.dayjs().format('YYYYMMDDHHmmss'),
  1467. exportHeader: ['工程变更记录'],
  1468. exportFooter: [],
  1469. resultList: [],
  1470. // ======== 行高 ========
  1471. height: 200,
  1472. secondHeight: 200,
  1473. // ======== 分页 ========
  1474. pageIndex: 1,
  1475. pageSize: 50,
  1476. totalPage: 0,
  1477. pageIndex2: 1,
  1478. pageSize2: 20,
  1479. totalPage2: 0,
  1480. // 条件查询
  1481. searchData: {
  1482. site: this.$store.state.user.site,
  1483. changeNo: '',
  1484. changeStatus: '',
  1485. menuId: this.$route.meta.menuId,
  1486. buNo: '',
  1487. page: 1,
  1488. limit: 10
  1489. },
  1490. searchData2: {
  1491. site: this.$store.state.user.site,
  1492. partNo: '',
  1493. testPartNo: '',
  1494. partDesc: '',
  1495. customerId: '',
  1496. customerDesc: '',
  1497. projectId: '',
  1498. projectDesc: '',
  1499. codeNo: '',
  1500. buNo: '',
  1501. },
  1502. // 初始页签
  1503. activeTable: 'basicInformation',
  1504. activeName: 'basicInformation',
  1505. rejectOpinion: '',
  1506. tempPartRow: {},
  1507. tempExecutorRow: {},
  1508. changeTitle: '',
  1509. plmChangeRequestArr: [],
  1510. plmChangeRequestDetailArr: [],
  1511. plmChangeCostImpactArr: [],
  1512. plmChangeFAItemArr: [],
  1513. plmChangeExecutionInfoArr: [],
  1514. plmChangeItemArr: [],
  1515. plmChangeCountersignatureItemArr: [],
  1516. // ======== 数据对象 ========
  1517. modalData: {
  1518. site: this.$store.state.user.site,
  1519. changeNo: '',
  1520. applicantId: '',
  1521. applicantName: '',
  1522. applicationDepartmentId: '',
  1523. applicationDepartmentName: '',
  1524. applyDate: '',
  1525. ecnType: '',
  1526. changeImpact: '',
  1527. changeImpactDesc: '',
  1528. ecnStage: '',
  1529. changeType: '',
  1530. tpEngineerId: '',
  1531. tpEngineerName: '',
  1532. changePhaseInDate: '',
  1533. dfIsProduct: '',
  1534. printing: '',
  1535. manufacturingCostIsChange: '',
  1536. changeRequestDesc: '',
  1537. isReQuote: '',
  1538. ulCertificationRequirements: '',
  1539. ulContinueToMeetDemand: '',
  1540. gpCertificationRequirements: '',
  1541. gpContinueToMeetDemand: '',
  1542. detailList: [],
  1543. ecnTypeData: [],
  1544. industrialEngineerId: '',
  1545. industrialEngineerName: '',
  1546. changeStatus: '',
  1547. cqcOperatorId: '',
  1548. cqcOperatorName: '',
  1549. faiOperatorId: '',
  1550. faiOperatorName: '',
  1551. nodeConclusion: '',
  1552. stepId: '',
  1553. rejectFlag: '',
  1554. rejectStepId: '',
  1555. isReject: '',
  1556. menuId: this.$route.meta.menuId,
  1557. userName: this.$store.state.user.name,
  1558. rejectOpinion: '',
  1559. nodeId: '',
  1560. buNo: '',
  1561. createBy2: '',
  1562. tpProcessControl: '',
  1563. csProcessControl: ''
  1564. },
  1565. costImpactData: {
  1566. site: this.$store.state.user.site,
  1567. changeNo: '',
  1568. productionProductFlag: '',
  1569. inventoryProductFlag: '',
  1570. newOrderFlag: '',
  1571. affectedFlag: '',
  1572. productionProductNumber: '',
  1573. productionProductOpinions: '',
  1574. productionProductScrapAmount: 0,
  1575. productionProductRemark: '',
  1576. productionProductExecutor: '',
  1577. productionProductExecutorName: '',
  1578. inventoryProductNumber: '',
  1579. inventoryProductOpinions: '',
  1580. inventoryProductScrapAmount: 0,
  1581. inventoryProductRemark: '',
  1582. inventoryProductExecutor: '',
  1583. inventoryProductExecutorName: '',
  1584. newOrderNumber: '',
  1585. affectedNumber: '',
  1586. affectedOpinions: '',
  1587. affectedScrapAmount: 0,
  1588. affectedRemark: '',
  1589. affectedExecutor: '',
  1590. affectedExecutorName: '',
  1591. changeTotalCost: '',
  1592. remark: '',
  1593. createBy: '',
  1594. updateBy: ''
  1595. },
  1596. executionInfoData: {
  1597. site: this.$store.state.user.site,
  1598. changeNo: '',
  1599. originalFilmNo: '',
  1600. newFilmNo: '',
  1601. originalDieCuttingRuleNo: '',
  1602. newDieCuttingRuleNo: '',
  1603. originalStencilNo: '',
  1604. newStencilNo: '',
  1605. executionDate: '',
  1606. createBy: '',
  1607. updateBy: '',
  1608. chooseItemList: [],
  1609. chooseItemList2: []
  1610. },
  1611. chooseModelData: {
  1612. site: this.$store.state.user.site,
  1613. functionType: 'ECN',
  1614. itemNo: '',
  1615. itemDesc: '',
  1616. codeNo: ''
  1617. },
  1618. chooseModelData2: {
  1619. site: this.$store.state.user.site,
  1620. functionType: 'ECN',
  1621. itemNo: '',
  1622. itemDesc: '',
  1623. codeNo: ''
  1624. },
  1625. chooseCSModelData: {
  1626. site: this.$store.state.user.site,
  1627. functionType: 'ECN',
  1628. itemNo: '',
  1629. itemDesc: '',
  1630. codeNo: ''
  1631. },
  1632. countersignatureData: {
  1633. site: this.$store.state.user.site,
  1634. changeNo: '',
  1635. createBy: '',
  1636. updateBy: '',
  1637. chooseCSItemList: []
  1638. },
  1639. partData: {
  1640. site: '',
  1641. buNo: '',
  1642. finalPartNo: '',
  1643. testPartNo: '',
  1644. customerPartNo: '',
  1645. partDesc: '',
  1646. page: 1,
  1647. limit: 10
  1648. },
  1649. // ======== 数据列表 ========
  1650. dataList: [],
  1651. dataList2: [],
  1652. detailList: [],
  1653. fileList: [],
  1654. chooseItemList: [],
  1655. chooseItemList2: [],
  1656. chooseCSItemList: [],
  1657. chooseDataList: [],
  1658. form: [],
  1659. modelList: [],
  1660. modelList2: [],
  1661. modelCSList: [],
  1662. itemList: [],
  1663. itemList2: [],
  1664. itemCSList: [],
  1665. chooseFileList: [],
  1666. approvalList: [],
  1667. partList: [],
  1668. // ======== 列表表头 ========
  1669. columnList: [
  1670. {
  1671. userId: this.$store.state.user.name,
  1672. functionId: 108002,
  1673. serialNumber: '108002Table1BuNo',
  1674. tableId: '108002Table1',
  1675. tableName: '工程变更记录表',
  1676. columnProp: 'buNo',
  1677. headerAlign: 'center',
  1678. align: 'center',
  1679. columnLabel: 'BU',
  1680. columnHidden: false,
  1681. columnImage: false,
  1682. status: true,
  1683. fixed: '',
  1684. columnWidth: 80
  1685. },
  1686. {
  1687. userId: this.$store.state.user.name,
  1688. functionId: 108002,
  1689. serialNumber: '108002Table1ChangeNo',
  1690. tableId: '108002Table1',
  1691. tableName: '工程变更记录表',
  1692. columnProp: 'changeNo',
  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: '108002Table1ApplicantName',
  1706. tableId: '108002Table1',
  1707. tableName: '工程变更记录表',
  1708. columnProp: 'applicantName',
  1709. headerAlign: 'center',
  1710. align: 'left',
  1711. columnLabel: '申请人',
  1712. columnHidden: false,
  1713. columnImage: false,
  1714. status: true,
  1715. fixed: '',
  1716. columnWidth: 120
  1717. },
  1718. {
  1719. userId: this.$store.state.user.name,
  1720. functionId: 108002,
  1721. serialNumber: '108002Table1DepartmentName',
  1722. tableId: '108002Table1',
  1723. tableName: '工程变更记录表',
  1724. columnProp: 'applicationDepartmentName',
  1725. headerAlign: 'center',
  1726. align: 'left',
  1727. columnLabel: '申请部门',
  1728. columnHidden: false,
  1729. columnImage: false,
  1730. status: true,
  1731. fixed: '',
  1732. columnWidth: 120
  1733. },
  1734. {
  1735. userId: this.$store.state.user.name,
  1736. functionId: 108002,
  1737. serialNumber: '108002Table1ChangeStatus',
  1738. tableId: '108002Table1',
  1739. tableName: '工程变更记录表',
  1740. columnProp: 'changeStatus',
  1741. headerAlign: 'center',
  1742. align: 'left',
  1743. columnLabel: '变更单状态',
  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: '108002Table1NodeName',
  1754. tableId: '108002Table1',
  1755. tableName: '工程变更记录表',
  1756. columnProp: 'nodeName',
  1757. headerAlign: 'center',
  1758. align: 'left',
  1759. columnLabel: '当前节点',
  1760. columnHidden: false,
  1761. columnImage: false,
  1762. status: true,
  1763. fixed: '',
  1764. columnWidth: 150
  1765. },
  1766. {
  1767. userId: this.$store.state.user.name,
  1768. functionId: 108002,
  1769. serialNumber: '108002Table1EcnStage',
  1770. tableId: '108002Table1',
  1771. tableName: '工程变更记录表',
  1772. columnProp: 'ecnStage',
  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: '108002Table1ChangeType',
  1786. tableId: '108002Table1',
  1787. tableName: '工程变更记录表',
  1788. columnProp: 'changeType',
  1789. headerAlign: 'center',
  1790. align: 'left',
  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: '108002Table1EcnType',
  1802. tableId: '108002Table1',
  1803. tableName: '工程变更记录表',
  1804. columnProp: 'ecnType',
  1805. headerAlign: 'center',
  1806. align: 'left',
  1807. columnLabel: 'ECN种类',
  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: '108002Table1ApplyDate',
  1818. tableId: '108002Table1',
  1819. tableName: '工程变更记录表',
  1820. columnProp: 'applyDate',
  1821. headerAlign: 'center',
  1822. align: 'center',
  1823. columnLabel: '申请日期',
  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: '108002Table1ChangePhaseInDate',
  1834. tableId: '108002Table1',
  1835. tableName: '工程变更记录表',
  1836. columnProp: 'changePhaseInDate',
  1837. headerAlign: 'center',
  1838. align: 'center',
  1839. columnLabel: '变更生效日期',
  1840. columnHidden: false,
  1841. columnImage: false,
  1842. status: true,
  1843. fixed: '',
  1844. columnWidth: 100
  1845. },
  1846. {
  1847. userId: this.$store.state.user.name,
  1848. functionId: 108002,
  1849. serialNumber: '108002Table1xxx',
  1850. tableId: '108002Table1',
  1851. tableName: '工程变更记录表',
  1852. columnProp: 'xxx',
  1853. headerAlign: 'center',
  1854. align: 'center',
  1855. columnLabel: 'ECN执行日期',
  1856. columnHidden: false,
  1857. columnImage: false,
  1858. status: true,
  1859. fixed: '',
  1860. columnWidth: 100
  1861. },
  1862. {
  1863. userId: this.$store.state.user.name,
  1864. functionId: 108002,
  1865. serialNumber: '108002Table1CreateBy2',
  1866. tableId: '108002Table1',
  1867. tableName: '工程变更记录表',
  1868. columnProp: 'createBy2',
  1869. headerAlign: 'center',
  1870. align: 'left',
  1871. columnLabel: '当前节点审批人',
  1872. columnHidden: false,
  1873. columnImage: false,
  1874. status: true,
  1875. fixed: '',
  1876. columnWidth: 100
  1877. },
  1878. ],
  1879. columnList2: [
  1880. {
  1881. columnProp: 'buNo',
  1882. headerAlign: 'center',
  1883. align: 'center',
  1884. columnLabel: 'BU',
  1885. columnHidden: false,
  1886. columnImage: false,
  1887. status: true,
  1888. fixed: '',
  1889. columnWidth: 70
  1890. },
  1891. {
  1892. columnProp: 'testPartNo',
  1893. headerAlign: 'center',
  1894. align: 'left',
  1895. columnLabel: 'PLM物料编码',
  1896. columnHidden: false,
  1897. columnImage: false,
  1898. status: true,
  1899. fixed: '',
  1900. columnWidth: 120
  1901. },
  1902. {
  1903. columnProp: 'partNo',
  1904. headerAlign: 'center',
  1905. align: 'left',
  1906. columnLabel: 'IFS物料编码',
  1907. columnHidden: false,
  1908. columnImage: false,
  1909. status: true,
  1910. fixed: '',
  1911. columnWidth: 120
  1912. },
  1913. {
  1914. columnProp: 'partDesc',
  1915. headerAlign: 'center',
  1916. align: 'left',
  1917. columnLabel: '物料名称',
  1918. columnHidden: false,
  1919. columnImage: false,
  1920. status: true,
  1921. fixed: '',
  1922. columnWidth: 200
  1923. },
  1924. {
  1925. columnProp: 'projectId',
  1926. headerAlign: 'center',
  1927. align: 'center',
  1928. columnLabel: '项目号',
  1929. columnHidden: false,
  1930. columnImage: false,
  1931. status: true,
  1932. fixed: '',
  1933. columnWidth: 120
  1934. },
  1935. {
  1936. columnProp: 'projectDesc',
  1937. headerAlign: 'center',
  1938. align: 'left',
  1939. columnLabel: '项目名称',
  1940. columnHidden: false,
  1941. columnImage: false,
  1942. status: true,
  1943. fixed: '',
  1944. columnWidth: 180
  1945. },
  1946. {
  1947. columnProp: 'customerId',
  1948. headerAlign: 'center',
  1949. align: 'center',
  1950. columnLabel: '客户编码',
  1951. columnHidden: false,
  1952. columnImage: false,
  1953. status: true,
  1954. fixed: '',
  1955. columnWidth: 120
  1956. },
  1957. {
  1958. columnProp: 'customerDesc',
  1959. headerAlign: 'center',
  1960. align: 'left',
  1961. columnLabel: '客户名称',
  1962. columnHidden: false,
  1963. columnImage: false,
  1964. status: true,
  1965. fixed: '',
  1966. columnWidth: 180
  1967. },
  1968. {
  1969. columnProp: 'oriCodeNo',
  1970. headerAlign: 'center',
  1971. align: 'center',
  1972. columnLabel: '技术参数卡',
  1973. columnHidden: false,
  1974. columnImage: false,
  1975. status: true,
  1976. fixed: '',
  1977. columnWidth: 120
  1978. },
  1979. {
  1980. columnProp: 'ecnFlag',
  1981. headerAlign: 'center',
  1982. align: 'center',
  1983. columnLabel: '状态',
  1984. columnHidden: false,
  1985. columnImage: false,
  1986. status: true,
  1987. fixed: '',
  1988. columnWidth: 100
  1989. },
  1990. {
  1991. columnProp: 'revNo',
  1992. headerAlign: 'center',
  1993. align: 'center',
  1994. columnLabel: '版本号',
  1995. columnHidden: false,
  1996. columnImage: false,
  1997. status: true,
  1998. fixed: '',
  1999. columnWidth: 80
  2000. },
  2001. ],
  2002. detailColumnList: [
  2003. {
  2004. userId: this.$store.state.user.name,
  2005. functionId: 108002,
  2006. serialNumber: '108002Table2PlmPartNo',
  2007. tableId: '108002Table2',
  2008. tableName: '变更单基本信息表',
  2009. columnProp: 'plmPartNo',
  2010. headerAlign: 'center',
  2011. align: 'left',
  2012. columnLabel: 'PLM物料编码',
  2013. columnHidden: false,
  2014. columnImage: false,
  2015. status: true,
  2016. fixed: '',
  2017. columnWidth: 120
  2018. },
  2019. {
  2020. userId: this.$store.state.user.name,
  2021. functionId: 108002,
  2022. serialNumber: '108002Table2PartNo',
  2023. tableId: '108002Table2',
  2024. tableName: '变更单基本信息表',
  2025. columnProp: 'partNo',
  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: '108002Table2PartDesc',
  2039. tableId: '108002Table2',
  2040. tableName: '变更单基本信息表',
  2041. columnProp: 'partDesc',
  2042. headerAlign: 'center',
  2043. align: 'left',
  2044. columnLabel: '物料名称',
  2045. columnHidden: false,
  2046. columnImage: false,
  2047. status: true,
  2048. fixed: '',
  2049. columnWidth: 200
  2050. },
  2051. {
  2052. userId: this.$store.state.user.name,
  2053. functionId: 108002,
  2054. serialNumber: '108002Table2NewPartNo',
  2055. tableId: '108002Table2',
  2056. tableName: '变更单基本信息表',
  2057. columnProp: 'newPartNo',
  2058. headerAlign: 'center',
  2059. align: 'left',
  2060. columnLabel: 'IFS料号',
  2061. columnHidden: false,
  2062. columnImage: false,
  2063. status: true,
  2064. fixed: '',
  2065. columnWidth: 120
  2066. },
  2067. {
  2068. userId: this.$store.state.user.name,
  2069. functionId: 108002,
  2070. serialNumber: '108002Table2NewDrawingNo',
  2071. tableId: '108002Table2',
  2072. tableName: '变更单基本信息表',
  2073. columnProp: 'newDrawingNo',
  2074. headerAlign: 'center',
  2075. align: 'center',
  2076. columnLabel: '新图纸编码',
  2077. columnHidden: false,
  2078. columnImage: false,
  2079. status: true,
  2080. fixed: '',
  2081. columnWidth: 100
  2082. },
  2083. {
  2084. userId: this.$store.state.user.name,
  2085. functionId: 108002,
  2086. serialNumber: '108002Table2NewDraftNo',
  2087. tableId: '108002Table2',
  2088. tableName: '变更单基本信息表',
  2089. columnProp: 'newDraftNo',
  2090. headerAlign: 'center',
  2091. align: 'center',
  2092. columnLabel: '新图稿编码',
  2093. columnHidden: false,
  2094. columnImage: false,
  2095. status: true,
  2096. fixed: '',
  2097. columnWidth: 100
  2098. },
  2099. {
  2100. userId: this.$store.state.user.name,
  2101. functionId: 108002,
  2102. serialNumber: '108002Table2OriCodeNo',
  2103. tableId: '108002Table2',
  2104. tableName: '变更单基本信息表',
  2105. columnProp: 'oriCodeNo',
  2106. headerAlign: 'center',
  2107. align: 'center',
  2108. columnLabel: '技术参数卡编码',
  2109. columnHidden: false,
  2110. columnImage: false,
  2111. status: true,
  2112. fixed: '',
  2113. columnWidth: 120
  2114. },
  2115. {
  2116. userId: this.$store.state.user.name,
  2117. functionId: 108002,
  2118. serialNumber: '108002Table2RevNo',
  2119. tableId: '108002Table2',
  2120. tableName: '变更单基本信息表',
  2121. columnProp: 'revNo',
  2122. headerAlign: 'center',
  2123. align: 'right',
  2124. columnLabel: '版本号',
  2125. columnHidden: false,
  2126. columnImage: false,
  2127. status: true,
  2128. fixed: '',
  2129. columnWidth: 60
  2130. },
  2131. ],
  2132. fileColumnList: [
  2133. {
  2134. userId: this.$store.state.user.name,
  2135. functionId: 108002,
  2136. serialNumber: '108002Table3FileName',
  2137. tableId: '108002Table2',
  2138. tableName: '文件信息表',
  2139. columnProp: 'fileName',
  2140. headerAlign: 'center',
  2141. align: 'center',
  2142. columnLabel: '文件名称',
  2143. columnHidden: false,
  2144. columnImage: false,
  2145. columnSortable: false,
  2146. sortLv: 0,
  2147. status: true,
  2148. fixed: '',
  2149. columnWidth: 140
  2150. },
  2151. {
  2152. userId: this.$store.state.user.name,
  2153. functionId: 108002,
  2154. serialNumber: '108002Table3FileRemark',
  2155. tableId: '108002Table2',
  2156. tableName: '文件信息表',
  2157. columnProp: 'fileRemark',
  2158. headerAlign: 'center',
  2159. align: 'center',
  2160. columnLabel: '备注',
  2161. columnHidden: false,
  2162. columnImage: false,
  2163. columnSortable: false,
  2164. sortLv: 0,
  2165. status: true,
  2166. fixed: '',
  2167. columnWidth: 240
  2168. },
  2169. // {
  2170. // userId: this.$store.state.user.name,
  2171. // functionId: 108002,
  2172. // serialNumber: '108002Table2OrderRef3',
  2173. // tableId: '108002Table2',
  2174. // tableName: '文件信息表',
  2175. // columnProp: 'orderRef3',
  2176. // headerAlign: 'center',
  2177. // align: 'center',
  2178. // columnLabel: '文件描述',
  2179. // columnHidden: false,
  2180. // columnImage: false,
  2181. // columnSortable: false,
  2182. // sortLv: 0,
  2183. // status: true,
  2184. // fixed: '',
  2185. // columnWidth: 120
  2186. // },
  2187. {
  2188. userId: this.$store.state.user.name,
  2189. functionId: 108002,
  2190. serialNumber: '108002Table3CreateDate',
  2191. tableId: '108002Table2',
  2192. tableName: '文件信息表',
  2193. columnProp: 'createDate',
  2194. headerAlign: 'center',
  2195. align: 'center',
  2196. columnLabel: '上传时间',
  2197. columnHidden: false,
  2198. columnImage: false,
  2199. columnSortable: false,
  2200. sortLv: 0,
  2201. status: true,
  2202. fixed: '',
  2203. columnWidth: 140
  2204. },
  2205. {
  2206. userId: this.$store.state.user.name,
  2207. functionId: 108002,
  2208. serialNumber: '108002Table3CreatedBy',
  2209. tableId: '108002Table2',
  2210. tableName: '文件信息表',
  2211. columnProp: 'createBy',
  2212. headerAlign: 'center',
  2213. align: 'center',
  2214. columnLabel: '上传人',
  2215. columnHidden: false,
  2216. columnImage: false,
  2217. columnSortable: false,
  2218. sortLv: 0,
  2219. status: true,
  2220. fixed: '',
  2221. columnWidth: 140
  2222. },
  2223. ],
  2224. columnChooseDataList: [
  2225. {
  2226. userId: this.$store.state.user.name,
  2227. functionId: 108002,
  2228. serialNumber: '108002Table4PlmPartNo',
  2229. tableId: '108002Table4',
  2230. tableName: '所选变更列表',
  2231. columnProp: 'plmPartNo',
  2232. headerAlign: 'center',
  2233. align: 'left',
  2234. columnLabel: 'PLM物料编码',
  2235. columnHidden: false,
  2236. columnImage: false,
  2237. status: true,
  2238. fixed: '',
  2239. columnWidth: 120
  2240. },
  2241. {
  2242. userId: this.$store.state.user.name,
  2243. functionId: 108002,
  2244. serialNumber: '108002Table4PartNo',
  2245. tableId: '108002Table4',
  2246. tableName: '所选变更列表',
  2247. columnProp: 'partNo',
  2248. headerAlign: 'center',
  2249. align: 'left',
  2250. columnLabel: 'IFS物料编码',
  2251. columnHidden: false,
  2252. columnImage: false,
  2253. status: true,
  2254. fixed: '',
  2255. columnWidth: 120
  2256. },
  2257. {
  2258. userId: this.$store.state.user.name,
  2259. functionId: 108002,
  2260. serialNumber: '108002Table4PartDesc',
  2261. tableId: '108002Table4',
  2262. tableName: '所选变更列表',
  2263. columnProp: 'partDesc',
  2264. headerAlign: 'center',
  2265. align: 'left',
  2266. columnLabel: '物料名称',
  2267. columnHidden: false,
  2268. columnImage: false,
  2269. status: true,
  2270. fixed: '',
  2271. columnWidth: 180
  2272. },
  2273. {
  2274. userId: this.$store.state.user.name,
  2275. functionId: 108002,
  2276. serialNumber: '108002Table4DrawingNo',
  2277. tableId: '108002Table4',
  2278. tableName: '所选变更列表',
  2279. columnProp: 'drawingNo',
  2280. headerAlign: 'center',
  2281. align: 'center',
  2282. columnLabel: '图纸编码',
  2283. columnHidden: false,
  2284. columnImage: false,
  2285. status: true,
  2286. fixed: '',
  2287. columnWidth: 90
  2288. },
  2289. {
  2290. userId: this.$store.state.user.name,
  2291. functionId: 108002,
  2292. serialNumber: '108002Table4DraftNo',
  2293. tableId: '108002Table4',
  2294. tableName: '所选变更列表',
  2295. columnProp: 'draftNo',
  2296. headerAlign: 'center',
  2297. align: 'center',
  2298. columnLabel: '图稿编码',
  2299. columnHidden: false,
  2300. columnImage: false,
  2301. status: true,
  2302. fixed: '',
  2303. columnWidth: 90
  2304. },
  2305. ],
  2306. columnChooseItemList: [
  2307. {
  2308. columnProp: 'itemNo',
  2309. headerAlign: 'center',
  2310. align: 'center',
  2311. columnLabel: '属性编码',
  2312. columnHidden: false,
  2313. columnImage: false,
  2314. status: true,
  2315. fixed: '',
  2316. columnWidth: 80
  2317. },
  2318. {
  2319. columnProp: 'itemDesc',
  2320. headerAlign: 'center',
  2321. align: 'center',
  2322. columnLabel: '属性名称',
  2323. columnHidden: false,
  2324. columnImage: false,
  2325. status: true,
  2326. fixed: '',
  2327. columnWidth: 150
  2328. },
  2329. {
  2330. columnProp: 'itemExecutionDate',
  2331. headerAlign: 'center',
  2332. align: 'center',
  2333. columnLabel: '执行时间',
  2334. columnHidden: false,
  2335. columnImage: false,
  2336. status: true,
  2337. fixed: '',
  2338. columnWidth: 130
  2339. }
  2340. ],
  2341. columnChooseItemList2: [
  2342. {
  2343. columnProp: 'itemNo',
  2344. headerAlign: 'center',
  2345. align: 'center',
  2346. columnLabel: '属性编码',
  2347. columnHidden: false,
  2348. columnImage: false,
  2349. status: true,
  2350. fixed: '',
  2351. columnWidth: 80
  2352. },
  2353. {
  2354. columnProp: 'itemDesc',
  2355. headerAlign: 'center',
  2356. align: 'center',
  2357. columnLabel: '属性名称',
  2358. columnHidden: false,
  2359. columnImage: false,
  2360. status: true,
  2361. fixed: '',
  2362. columnWidth: 150
  2363. },
  2364. // {
  2365. // columnProp: 'executeFlag',
  2366. // headerAlign: 'center',
  2367. // align: 'center',
  2368. // columnLabel: '是否执行',
  2369. // columnHidden: false,
  2370. // columnImage: false,
  2371. // status: true,
  2372. // fixed: '',
  2373. // columnWidth: 80
  2374. // },
  2375. // {
  2376. // columnProp: 'executor',
  2377. // headerAlign: 'center',
  2378. // align: 'center',
  2379. // columnLabel: '执行人',
  2380. // columnHidden: false,
  2381. // columnImage: false,
  2382. // status: true,
  2383. // fixed: '',
  2384. // columnWidth: 100
  2385. // },
  2386. // {
  2387. // columnProp: 'itemExecutionDate',
  2388. // headerAlign: 'center',
  2389. // align: 'center',
  2390. // columnLabel: '执行时间',
  2391. // columnHidden: false,
  2392. // columnImage: false,
  2393. // status: true,
  2394. // fixed: '',
  2395. // columnWidth: 150
  2396. // }
  2397. ],
  2398. columnItemList: [
  2399. {
  2400. userId: this.$store.state.user.name,
  2401. functionId: 108002,
  2402. serialNumber: '108002Table6ItemNo',
  2403. tableId: '108002Table6',
  2404. tableName: '执行属性表',
  2405. columnProp: 'itemNo',
  2406. headerAlign: 'center',
  2407. align: 'center',
  2408. columnLabel: '属性编码',
  2409. columnHidden: false,
  2410. columnImage: false,
  2411. status: true,
  2412. fixed: '',
  2413. columnWidth: 80
  2414. },
  2415. {
  2416. userId: this.$store.state.user.name,
  2417. functionId: 108002,
  2418. serialNumber: '108002Table6ItemDesc',
  2419. tableId: '108002Table6',
  2420. tableName: '执行属性表',
  2421. columnProp: 'itemDesc',
  2422. headerAlign: 'center',
  2423. align: 'center',
  2424. columnLabel: '属性名称',
  2425. columnHidden: false,
  2426. columnImage: false,
  2427. status: true,
  2428. fixed: '',
  2429. columnWidth: 150
  2430. },
  2431. ],
  2432. columnItemList2: [
  2433. {
  2434. columnProp: 'itemNo',
  2435. headerAlign: 'center',
  2436. align: 'center',
  2437. columnLabel: '属性编码',
  2438. columnHidden: false,
  2439. columnImage: false,
  2440. status: true,
  2441. fixed: '',
  2442. columnWidth: 80
  2443. },
  2444. {
  2445. columnProp: 'itemDesc',
  2446. headerAlign: 'center',
  2447. align: 'center',
  2448. columnLabel: '属性名称',
  2449. columnHidden: false,
  2450. columnImage: false,
  2451. status: true,
  2452. fixed: '',
  2453. columnWidth: 150
  2454. },
  2455. ],
  2456. columnCSItemList: [
  2457. {
  2458. userId: this.$store.state.user.name,
  2459. functionId: 108001,
  2460. serialNumber: '108001Table5ItemNo',
  2461. tableId: '108001Table5',
  2462. tableName: '执行属性表',
  2463. columnProp: 'itemNo',
  2464. headerAlign: 'center',
  2465. align: 'center',
  2466. columnLabel: '属性编码',
  2467. columnHidden: false,
  2468. columnImage: false,
  2469. status: true,
  2470. fixed: '',
  2471. columnWidth: 80
  2472. },
  2473. {
  2474. userId: this.$store.state.user.name,
  2475. functionId: 108001,
  2476. serialNumber: '108001Table5ItemDesc',
  2477. tableId: '108001Table5',
  2478. tableName: '执行属性表',
  2479. columnProp: 'itemDesc',
  2480. headerAlign: 'center',
  2481. align: 'center',
  2482. columnLabel: '属性名称',
  2483. columnHidden: false,
  2484. columnImage: false,
  2485. status: true,
  2486. fixed: '',
  2487. columnWidth: 150
  2488. },
  2489. ],
  2490. columnCSChooseItemList: [
  2491. {
  2492. userId: this.$store.state.user.name,
  2493. functionId: 108002,
  2494. serialNumber: '108002Table7ItemNo',
  2495. tableId: '108002Table7',
  2496. tableName: '执行属性表',
  2497. columnProp: 'itemNo',
  2498. headerAlign: 'center',
  2499. align: 'left',
  2500. columnLabel: '属性编码',
  2501. columnHidden: false,
  2502. columnImage: false,
  2503. status: true,
  2504. fixed: '',
  2505. columnWidth: 100
  2506. },
  2507. {
  2508. userId: this.$store.state.user.name,
  2509. functionId: 108002,
  2510. serialNumber: '108002Table7ItemDesc',
  2511. tableId: '108002Table7',
  2512. tableName: '执行属性表',
  2513. columnProp: 'itemDesc',
  2514. headerAlign: 'center',
  2515. align: 'left',
  2516. columnLabel: '属性名称',
  2517. columnHidden: false,
  2518. columnImage: false,
  2519. status: true,
  2520. fixed: '',
  2521. columnWidth: 150
  2522. },
  2523. {
  2524. userId: this.$store.state.user.name,
  2525. functionId: 108002,
  2526. serialNumber: '108002Table7ExecuteDate',
  2527. tableId: '108002Table7',
  2528. tableName: '执行属性表',
  2529. columnProp: 'itemExecutionDate',
  2530. headerAlign: 'center',
  2531. align: 'center',
  2532. columnLabel: '会签时间',
  2533. columnHidden: false,
  2534. columnImage: false,
  2535. status: true,
  2536. fixed: '',
  2537. columnWidth: 150
  2538. },
  2539. ],
  2540. approvalColumnList: [
  2541. {
  2542. userId: this.$store.state.user.name,
  2543. functionId: 108002,
  2544. serialNumber: '108002Table8ClassificationNo',
  2545. tableId: '108002Table8',
  2546. tableName: '审批信息',
  2547. columnProp: 'classificationNo',
  2548. headerAlign: 'center',
  2549. align: 'center',
  2550. columnLabel: '流程分类编码',
  2551. columnHidden: false,
  2552. columnImage: false,
  2553. status: true,
  2554. fixed: '',
  2555. columnWidth: 120
  2556. },
  2557. {
  2558. userId: this.$store.state.user.name,
  2559. functionId: 108002,
  2560. serialNumber: '108002Table8ItemDesc',
  2561. tableId: '108002Table8',
  2562. tableName: '审批信息',
  2563. columnProp: 'nodeName',
  2564. headerAlign: 'center',
  2565. align: 'left',
  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: '108002Table8RejectFlag',
  2577. tableId: '108002Table8',
  2578. tableName: '审批信息',
  2579. columnProp: 'rejectFlagDesc',
  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: '108002Table8RejectNodeName',
  2593. tableId: '108002Table8',
  2594. tableName: '审批信息',
  2595. columnProp: 'rejectNodeName',
  2596. headerAlign: 'center',
  2597. align: 'center',
  2598. columnLabel: '被驳回节点名称',
  2599. columnHidden: false,
  2600. columnImage: false,
  2601. status: true,
  2602. fixed: '',
  2603. columnWidth: 200
  2604. },
  2605. {
  2606. userId: this.$store.state.user.name,
  2607. functionId: 108002,
  2608. serialNumber: '108002Table8NodeConclusionDesc',
  2609. tableId: '108002Table8',
  2610. tableName: '审批信息',
  2611. columnProp: 'nodeConclusionDesc',
  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: '108002Table8CreateDate',
  2625. tableId: '108002Table8',
  2626. tableName: '审批信息',
  2627. columnProp: 'createDate',
  2628. headerAlign: 'center',
  2629. align: 'center',
  2630. columnLabel: '提交时间',
  2631. columnHidden: false,
  2632. columnImage: false,
  2633. status: true,
  2634. fixed: '',
  2635. columnWidth: 170
  2636. },
  2637. {
  2638. userId: this.$store.state.user.name,
  2639. functionId: 108002,
  2640. serialNumber: '108002Table8CreateBy',
  2641. tableId: '108002Table8',
  2642. tableName: '审批信息',
  2643. columnProp: 'createBy',
  2644. headerAlign: 'center',
  2645. align: 'center',
  2646. columnLabel: '提交人员',
  2647. columnHidden: false,
  2648. columnImage: false,
  2649. status: true,
  2650. fixed: '',
  2651. columnWidth: 100
  2652. },
  2653. {
  2654. userId: this.$store.state.user.name,
  2655. functionId: 108002,
  2656. serialNumber: '108002Table8RejectOpinion',
  2657. tableId: '108002Table8',
  2658. tableName: '审批信息',
  2659. columnProp: 'rejectOpinion',
  2660. headerAlign: 'center',
  2661. align: 'left',
  2662. columnLabel: '驳回意见',
  2663. columnHidden: false,
  2664. columnImage: false,
  2665. status: true,
  2666. fixed: '',
  2667. columnWidth: 300
  2668. },
  2669. ],
  2670. partColumnList: [
  2671. {
  2672. columnProp: 'testPartNo',
  2673. headerAlign: "center",
  2674. align: "left",
  2675. columnLabel: 'PLM物料编码',
  2676. columnHidden: false,
  2677. columnImage: false,
  2678. columnSortable: false,
  2679. sortLv: 0,
  2680. status: true,
  2681. fixed: '',
  2682. columnWidth: 120
  2683. },
  2684. {
  2685. columnProp: 'finalPartNo',
  2686. headerAlign: "center",
  2687. align: "left",
  2688. columnLabel: 'IFS物料编码',
  2689. columnHidden: false,
  2690. columnImage: false,
  2691. columnSortable: false,
  2692. sortLv: 0,
  2693. status: true,
  2694. fixed: '',
  2695. columnWidth: 120
  2696. },
  2697. {
  2698. columnProp: 'customerPartNo',
  2699. headerAlign: "center",
  2700. align: "left",
  2701. columnLabel: '客户料号',
  2702. columnHidden: false,
  2703. columnImage: false,
  2704. columnSortable: false,
  2705. sortLv: 0,
  2706. status: true,
  2707. fixed: '',
  2708. columnWidth: 120
  2709. },
  2710. {
  2711. columnProp: 'partDesc',
  2712. headerAlign: "center",
  2713. align: "left",
  2714. columnLabel: '物料名称',
  2715. columnHidden: false,
  2716. columnImage: false,
  2717. status: true,
  2718. fixed: '',
  2719. columnWidth: 200
  2720. },
  2721. ],
  2722. // ======== 必填规则 ========
  2723. rules: {
  2724. applicantId: [
  2725. {
  2726. required: true,
  2727. message: ' ',
  2728. trigger: ['blur','change']
  2729. }
  2730. ],
  2731. applyDate: [
  2732. {
  2733. required: true,
  2734. message: ' ',
  2735. trigger: ['blur','change']
  2736. }
  2737. ],
  2738. changeImpact: [
  2739. {
  2740. required: true,
  2741. message: ' ',
  2742. trigger: ['blur','change']
  2743. }
  2744. ],
  2745. changeImpactDesc: [
  2746. {
  2747. required: true,
  2748. message: ' ',
  2749. trigger: ['blur','change']
  2750. }
  2751. ],
  2752. ecnStage: [
  2753. {
  2754. required: true,
  2755. message: ' ',
  2756. trigger: ['blur','change']
  2757. }
  2758. ],
  2759. changeType: [
  2760. {
  2761. required: true,
  2762. message: ' ',
  2763. trigger: ['blur','change']
  2764. }
  2765. ],
  2766. tpEngineerId: [
  2767. {
  2768. required: true,
  2769. message: ' ',
  2770. trigger: ['blur','change']
  2771. }
  2772. ],
  2773. changePhaseInDate: [
  2774. {
  2775. required: true,
  2776. message: ' ',
  2777. trigger: ['blur','change']
  2778. }
  2779. ],
  2780. dfIsProduct: [
  2781. {
  2782. required: true,
  2783. message: ' ',
  2784. trigger: ['blur','change']
  2785. }
  2786. ],
  2787. printing: [
  2788. {
  2789. required: true,
  2790. message: ' ',
  2791. trigger: ['blur','change']
  2792. }
  2793. ],
  2794. manufacturingCostIsChange: [
  2795. {
  2796. required: true,
  2797. message: ' ',
  2798. trigger: ['blur','change']
  2799. }
  2800. ],
  2801. changeRequestDesc: [
  2802. {
  2803. required: true,
  2804. message: ' ',
  2805. trigger: ['blur','change']
  2806. }
  2807. ],
  2808. isReQuote: [
  2809. {
  2810. required: true,
  2811. message: ' ',
  2812. trigger: ['blur','change']
  2813. }
  2814. ],
  2815. ulCertificationRequirements: [
  2816. {
  2817. required: true,
  2818. message: ' ',
  2819. trigger: ['blur','change']
  2820. }
  2821. ],
  2822. ulContinueToMeetDemand: [
  2823. {
  2824. required: true,
  2825. message: ' ',
  2826. trigger: ['blur','change']
  2827. }
  2828. ],
  2829. gpCertificationRequirements: [
  2830. {
  2831. required: true,
  2832. message: ' ',
  2833. trigger: ['blur','change']
  2834. }
  2835. ],
  2836. gpContinueToMeetDemand: [
  2837. {
  2838. required: true,
  2839. message: ' ',
  2840. trigger: ['blur','change']
  2841. }
  2842. ],
  2843. ecnType: [
  2844. {
  2845. required: true,
  2846. message: ' ',
  2847. trigger: ['blur','change']
  2848. }
  2849. ],
  2850. },
  2851. // ======== 复选数据集 ========
  2852. fileSelections: [],
  2853. itemSelections: [],
  2854. dataSelections2: [],
  2855. // ======== 选中的当前行数据 ========
  2856. currentRow: {},
  2857. currentCostImpactData: {},
  2858. currentExecutionInfoData: {},
  2859. currentChooseItemList: [],
  2860. currentChooseItemList2: [],
  2861. currentChooseCSItemList: [],
  2862. // ======== 模态框开关控制 ========
  2863. modalFlag: false,
  2864. modalDisableFlag: false,
  2865. ecnTypeModalFlag: false,
  2866. chooseModelFlag: false,
  2867. chooseModelFlag2: false,
  2868. chooseCSModelFlag: false,
  2869. uploadDialog: false,
  2870. submitModalFlag: false,
  2871. addDetailModal: false,
  2872. saveLoading: false,
  2873. submitLoading: false,
  2874. menuId: this.$route.meta.menuId,
  2875. authSearch: false,
  2876. authUpdate: false,
  2877. authIssue: false,
  2878. authSubmit: false,
  2879. authReject: false,
  2880. authFileSave: false,
  2881. authFileDownLoad: false,
  2882. authFileRemove: false,
  2883. authFilePreview: false,
  2884. partModelFlag: false,
  2885. createBy2: this.$store.state.user.name,
  2886. }
  2887. },
  2888. mounted () {
  2889. this.$nextTick(() => {
  2890. this.height = window.innerHeight / 2 - 30
  2891. /*第二个表格高度的动态调整*/
  2892. this.secondHeight = window.innerHeight / 2 - 186
  2893. })
  2894. },
  2895. activated () {
  2896. if (this.authSearch) {
  2897. if (this.$route.params.type === 'tokenLogin') {
  2898. if (this.$route.params.docNo) {
  2899. this.searchData.changeNo = this.$route.params.docNo
  2900. }
  2901. this.searchData.limit = this.pageSize
  2902. this.searchData.page = this.pageIndex
  2903. changeRecordSearch(this.searchData).then(({data}) => {
  2904. if (data.code === 0) {
  2905. this.dataList = data.page.list
  2906. this.pageIndex = data.page.currPage
  2907. this.pageSize = data.page.pageSize
  2908. this.totalPage = data.page.totalCount
  2909. // 判断是否全部存在数据
  2910. if (this.dataList.length > 0) {
  2911. // 设置选中行
  2912. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  2913. this.updateModal(this.dataList[0])
  2914. } else {
  2915. this.currentRow = {}
  2916. }
  2917. }
  2918. })
  2919. } else {
  2920. if (this.$route.params.changeNo) {
  2921. this.searchData.changeNo = this.$route.params.changeNo
  2922. }
  2923. this.getDataList()
  2924. }
  2925. }
  2926. },
  2927. created () {
  2928. // 按钮控制
  2929. this.getButtonAuthData()
  2930. this.getEcnModel()
  2931. this.getEcnModel2()
  2932. this.getEcnCSModel()
  2933. this.getBuBySite()
  2934. },
  2935. methods: {
  2936. // 获取用户的bu
  2937. getBuBySite () {
  2938. let tempData = {
  2939. site: this.$store.state.user.site,
  2940. }
  2941. getBuBySite(tempData).then(({data}) => {
  2942. if (data.code === 0) {
  2943. this.buList = data.rows
  2944. }
  2945. })
  2946. },
  2947. // 查询ECN的评估模板
  2948. getEcnModel2 () {
  2949. let tempData = {
  2950. site: this.$store.state.user.site,
  2951. functionType: 'ECN',
  2952. codeNo: 'E002'
  2953. }
  2954. getEcnModel(tempData).then(({data}) => {
  2955. if (data.code === 0) {
  2956. this.modelList2 = data.rows
  2957. }
  2958. })
  2959. },
  2960. // 查询会签的模板
  2961. getEcnCSModel () {
  2962. let tempData = {
  2963. site: this.$store.state.user.site,
  2964. functionType: 'ECN',
  2965. codeNo: 'E003'
  2966. }
  2967. getEcnModel(tempData).then(({data}) => {
  2968. if (data.code === 0) {
  2969. this.modelCSList = data.rows
  2970. }
  2971. })
  2972. },
  2973. // 选择模板属性
  2974. chooseFeasibilityAssessmentModel () {
  2975. this.chooseModelData2 = {
  2976. site: this.$store.state.user.site,
  2977. itemNo: '',
  2978. itemDesc: '',
  2979. functionType: 'ECN',
  2980. codeNo: this.modelList2.length > 0 ? this.modelList2[0].codeNo : ''
  2981. }
  2982. // 先清空缓存选中
  2983. //this.$nextTick(() => this.$refs.itemTable2.clearSelection())
  2984. getItemList(this.chooseModelData2).then(({data}) => {
  2985. if (data && data.code === 0) {
  2986. this.itemList2 = data.rows
  2987. this.itemList2.forEach(val => {
  2988. // 回显选中
  2989. if (this.chooseItemList2.map(val => val.itemNo).includes(val.itemNo)) {
  2990. this.$nextTick(() => this.$refs.itemTable2.toggleRowSelection(val, true))
  2991. }
  2992. })
  2993. } else {
  2994. this.$alert(data.msg, '错误', {
  2995. confirmButtonText: '确定'
  2996. })
  2997. }
  2998. })
  2999. this.chooseModelFlag2 = true
  3000. },
  3001. // 选择会签模板属性
  3002. chooseCSModel () {
  3003. this.chooseCSModelData = {
  3004. site: this.$store.state.user.site,
  3005. itemNo: '',
  3006. itemDesc: '',
  3007. functionType: 'ECN',
  3008. codeNo: this.modelCSList.length > 0 ? this.modelCSList[0].codeNo : ''
  3009. }
  3010. // 先清空缓存选中
  3011. this.$nextTick(() => this.$refs.itemCSTable.clearSelection())
  3012. // 查询所有属性
  3013. getItemList(this.chooseCSModelData).then(({data}) => {
  3014. if (data && data.code === 0) {
  3015. this.itemCSList = data.rows
  3016. this.itemCSList.forEach(val => {
  3017. // 回显选中的部门
  3018. if (this.chooseCSItemList.map(val => val.itemNo).includes(val.itemNo)) {
  3019. this.$nextTick(() => this.$refs.itemCSTable.toggleRowSelection(val, true))
  3020. }
  3021. })
  3022. } else {
  3023. this.$alert(data.msg, '错误', {
  3024. confirmButtonText: '确定'
  3025. })
  3026. }
  3027. })
  3028. this.chooseCSModelFlag = true
  3029. },
  3030. // 确认多选属性
  3031. confirmItem2 () {
  3032. if (this.itemSelections2.length === 0) {
  3033. this.$message.warning("请勾选属性!")
  3034. return
  3035. }
  3036. // 临时集合
  3037. let temp = []
  3038. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3039. this.chooseItemList2.forEach(itemA => {
  3040. if (this.itemSelections2.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3041. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3042. temp.push(itemA)
  3043. }
  3044. })
  3045. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3046. this.itemSelections2.forEach(itemB => {
  3047. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3048. // 如果b中的对象名字不在结果中,则添加到结果中
  3049. temp.push(itemB)
  3050. }
  3051. })
  3052. this.chooseItemList2 = temp
  3053. this.chooseModelFlag2 = false
  3054. },
  3055. // 确认多选CS属性
  3056. confirmCSItem () {
  3057. if (this.itemCSSelections.length === 0) {
  3058. this.$message.warning("请勾选属性!")
  3059. return
  3060. }
  3061. // 临时集合
  3062. let temp = []
  3063. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3064. this.chooseCSItemList.forEach(itemA => {
  3065. if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3066. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3067. temp.push(itemA)
  3068. }
  3069. })
  3070. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3071. this.itemCSSelections.forEach(itemB => {
  3072. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3073. // 如果b中的对象名字不在结果中,则添加到结果中
  3074. temp.push(itemB)
  3075. }
  3076. })
  3077. this.chooseCSItemList = temp
  3078. this.chooseCSModelFlag = false
  3079. },
  3080. // 查询属性
  3081. searchItemList2 () {
  3082. getItemList(this.chooseModelData2).then(({data}) => {
  3083. if (data.code === 0) {
  3084. this.itemList2 = data.rows
  3085. }
  3086. })
  3087. },
  3088. // 查询CS属性
  3089. searchCSItemList () {
  3090. getItemList(this.chooseCSModelData).then(({data}) => {
  3091. if (data.code === 0) {
  3092. this.itemCSList = data.rows
  3093. }
  3094. })
  3095. },
  3096. // 单机选择
  3097. itemClickRow2 (row) {
  3098. this.$refs.itemTable2.toggleRowSelection(row)
  3099. },
  3100. // 单击选择
  3101. itemCSClickRow (row) {
  3102. this.$refs.itemCSTable.toggleRowSelection(row)
  3103. },
  3104. // 复选属性
  3105. selectionItem2 (val) {
  3106. this.itemSelections2 = val
  3107. },
  3108. // 复选CS属性
  3109. selectionCSItem (val) {
  3110. this.itemCSSelections = val
  3111. },
  3112. // 获取流程的配置权限
  3113. async getNodeAuthority (row) {
  3114. let tempData = {
  3115. site: row.site,
  3116. changeNo: row.changeNo,
  3117. stepId: row.stepId,
  3118. menuId: this.$route.meta.menuId
  3119. }
  3120. await getNodeAuthority(tempData).then(({data}) => {
  3121. if (data && data.code === 0) {
  3122. this.plmChangeRequestArr = data.rows.plm_change_request
  3123. this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  3124. this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  3125. this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  3126. this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  3127. this.plmChangeItemArr = data.rows.plm_change_item
  3128. this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  3129. }
  3130. })
  3131. },
  3132. // ======= 正则校验 =======
  3133. handleInput (value, type) {
  3134. // 大于等于0,且只能输入16位小数
  3135. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  3136. if (val === null || val === undefined || val === '') {
  3137. val = 0
  3138. }
  3139. if (type === 1) {
  3140. this.costImpactData.productionProductScrapAmount = val
  3141. } else if (type === 2) {
  3142. this.costImpactData.inventoryProductScrapAmount = val
  3143. } else if (type === 3) {
  3144. this.costImpactData.affectedScrapAmount = val
  3145. }
  3146. },
  3147. partInput (row, val) {
  3148. row.newPartNo = val.toUpperCase()
  3149. },
  3150. executorInput (row, val) {
  3151. //row.executor = val.toUpperCase()
  3152. },
  3153. choosePartNo (row) {
  3154. this.partData.site = row.site
  3155. this.partData.buNo = row.buNo
  3156. this.tempPartRow = row
  3157. if (this.tempPartRow.newPartNo == null) {
  3158. this.tempPartRow.newPartNo = ''
  3159. }
  3160. this.queryPartList()
  3161. //this.getBaseList(133)
  3162. },
  3163. // 查询物料
  3164. queryPartList () {
  3165. this.partData.limit = this.pageSize2
  3166. this.partData.page = this.pageIndex2
  3167. choosePartNoList(this.partData).then(({data}) => {
  3168. if (data && data.code === 0) {
  3169. this.partList = data.page.list
  3170. this.pageIndex2 = data.page.currPage
  3171. this.pageSize2 = data.page.pageSize
  3172. this.totalPage2 = data.page.totalCount
  3173. this.partModelFlag = true
  3174. } else {
  3175. this.partList = []
  3176. }
  3177. })
  3178. },
  3179. // 双击选中物料
  3180. getRowData (row) {
  3181. this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
  3182. this.partModelFlag = false
  3183. },
  3184. // 每页数
  3185. sizeChangeHandle2 (val) {
  3186. this.pageSize2 = val
  3187. this.pageIndex2 = 1
  3188. this.queryPartList()
  3189. },
  3190. // 当前页
  3191. currentChangeHandle2 (val) {
  3192. this.pageIndex2 = val
  3193. this.queryPartList()
  3194. },
  3195. chooseExecutor (row) {
  3196. this.tempExecutorRow = row
  3197. if (this.tempExecutorRow.executor == null) {
  3198. this.tempExecutorRow.executor = ''
  3199. }
  3200. this.getBaseList(2010)
  3201. },
  3202. ecnTypeHeaderChange (val,index) {
  3203. if (val === 'Y') {
  3204. for (let i = 0; i < this.form[index].list.length; i++) {
  3205. this.form[index].list[i].flag = 'Y'
  3206. }
  3207. } else {
  3208. for (let i = 0; i < this.form[index].list.length; i++) {
  3209. this.form[index].list[i].flag = 'N'
  3210. }
  3211. }
  3212. },
  3213. ecnTypeDetailChange (val,index) {
  3214. if (this.form[index].list.every(x => x.flag === 'Y')) {
  3215. this.form[index].flag = 'Y'
  3216. }else {
  3217. this.form[index].flag = 'N'
  3218. }
  3219. },
  3220. // ======== 分页相关方法 ========
  3221. // 每页数
  3222. sizeChangeHandle (val) {
  3223. this.pageSize = val
  3224. this.pageIndex = 1
  3225. this.getDataList()
  3226. },
  3227. // 当前页
  3228. currentChangeHandle (val) {
  3229. this.pageIndex = val
  3230. this.getDataList()
  3231. },
  3232. // ======== 列表选择相关方法 ========
  3233. selectFlag () {
  3234. return true
  3235. },
  3236. // ======== 页签切换相关方法 ========
  3237. // 单机选中询价信息
  3238. changeClickRow (row) {
  3239. this.$refs.changeTable.toggleRowSelection(row)
  3240. this.currentRow = JSON.parse(JSON.stringify(row))
  3241. },
  3242. // // 列表表格选择替换
  3243. // tabClick (tab, event) {
  3244. // // 刷新列表数据
  3245. // this.refreshCurrentTabTable()
  3246. // },
  3247. // 当前值发生变化的时候修改
  3248. currentChange (row, oldRow) {
  3249. // 判断是否是获取焦点的事件
  3250. if (row) {
  3251. this.currentRow = JSON.parse(JSON.stringify(row))
  3252. // 刷新当前页表
  3253. this.refreshCurrentTabTable()
  3254. }
  3255. },
  3256. // 刷新页签的table数据
  3257. refreshChangeTab () {},
  3258. // 新增库存成本影响
  3259. inventoryCostImpactSave () {
  3260. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3261. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  3262. this.$message.warning('请填写在生产品数量!')
  3263. return
  3264. }
  3265. if (this.costImpactData.productionProductNumber <= 0) {
  3266. this.$message.warning('在生产品数量不能小于等于0!')
  3267. return
  3268. }
  3269. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3270. this.$message.warning('请填写在生产品处理意见!')
  3271. return
  3272. }
  3273. if (this.costImpactData.productionProductScrapAmount === 0) {
  3274. this.$message.warning('请填写在生产品报废金额!')
  3275. return
  3276. }
  3277. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3278. this.$message.warning('请填写在生产品执行人!')
  3279. return
  3280. }
  3281. }
  3282. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3283. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  3284. this.$message.warning('请填写成品库存数量!')
  3285. return
  3286. }
  3287. if (this.costImpactData.inventoryProductNumber <= 0) {
  3288. this.$message.warning('成品库存数量不能小于等于0!')
  3289. return
  3290. }
  3291. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3292. this.$message.warning('请填写成品库存处理意见!')
  3293. return
  3294. }
  3295. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  3296. this.$message.warning('请填写成品库存报废金额!')
  3297. return
  3298. }
  3299. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3300. this.$message.warning('请填写成品库存执行人!')
  3301. return
  3302. }
  3303. }
  3304. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  3305. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  3306. this.$message.warning('请填写新订单数量!')
  3307. return
  3308. }
  3309. if (this.costImpactData.newOrderNumber <= 0) {
  3310. this.$message.warning('新订单数量不能小于等于0!')
  3311. return
  3312. }
  3313. }
  3314. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3315. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  3316. this.$message.warning('请填写影响的原材料及其库存量数量!')
  3317. return
  3318. }
  3319. if (this.costImpactData.affectedNumber <= 0) {
  3320. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  3321. return
  3322. }
  3323. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3324. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3325. return
  3326. }
  3327. if (this.costImpactData.affectedScrapAmount === 0) {
  3328. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  3329. return
  3330. }
  3331. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3332. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3333. return
  3334. }
  3335. }
  3336. this.costImpactData.changeTotalCost = this.totalCost
  3337. costImpactUpdate(this.costImpactData).then(({data}) => {
  3338. if (data && data.code === 0) {
  3339. this.costImpactData = data.rows.costImpactData
  3340. this.getDataList()
  3341. this.$message({
  3342. message: '操作成功',
  3343. type: 'success',
  3344. duration: 1500,
  3345. onClose: () => {}
  3346. })
  3347. } else {
  3348. this.$alert(data.msg, '错误', {
  3349. confirmButtonText: '确定'
  3350. })
  3351. }
  3352. })
  3353. },
  3354. // 刷新页签的table数据
  3355. refreshCurrentTabTable () {
  3356. if (this.activeTable === 'basicInformation') {
  3357. this.getChangeDetailList()
  3358. } else if (this.activeTable === 'fileInformation') {
  3359. this.getChangeFileList()
  3360. } else if (this.activeTable === 'inventoryCostImpact') {
  3361. this.inventoryCostImpactSearch2()
  3362. } else if (this.activeTable === 'actionInformation') {
  3363. this.tpExecutionInfoSearch2()
  3364. } else if (this.activeTable === 'countersignature') {
  3365. this.countersignatureSearch2()
  3366. } else if (this.activeTable === 'approvalInformation') {
  3367. this.getApprovalList()
  3368. }
  3369. },
  3370. // ======== 列表数据刷新方法 ========
  3371. // 获取数据列表
  3372. getDataList () {
  3373. if(localStorage.getItem('ecnData')!=undefined){
  3374. let data=JSON.parse(localStorage.getItem('ecnData'));
  3375. this.searchData.changeNo=data.ecnNo
  3376. localStorage.removeItem('ecnData');
  3377. }
  3378. this.searchData.limit = this.pageSize
  3379. this.searchData.page = this.pageIndex
  3380. changeRecordSearch(this.searchData).then(({data}) => {
  3381. if (data.code === 0) {
  3382. this.dataList = data.page.list
  3383. this.pageIndex = data.page.currPage
  3384. this.pageSize = data.page.pageSize
  3385. this.totalPage = data.page.totalCount
  3386. // 判断是否全部存在数据
  3387. if (this.dataList.length > 0) {
  3388. // 设置选中行
  3389. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  3390. } else {
  3391. this.currentRow = {}
  3392. }
  3393. }
  3394. })
  3395. },
  3396. // 变更单详情的列表
  3397. getChangeDetailList () {
  3398. let tempData = {
  3399. site: this.$store.state.user.site,
  3400. changeNo: this.currentRow.changeNo
  3401. }
  3402. changeDetailSearch(tempData).then(({data}) => {
  3403. if (data && data.code === 0) {
  3404. this.detailList = data.rows
  3405. } else {
  3406. this.detailList = []
  3407. }
  3408. })
  3409. },
  3410. // 变更单文件的列表
  3411. getChangeFileList () {
  3412. let tempData = {
  3413. orderRef1: this.$store.state.user.site,
  3414. orderRef2: this.currentRow.changeNo
  3415. }
  3416. changeFileSearch(tempData).then(({data}) => {
  3417. if (data && data.code === 0) {
  3418. this.fileList = data.rows
  3419. } else {
  3420. this.fileList = []
  3421. }
  3422. })
  3423. },
  3424. // 复选变更单文件
  3425. selectionFile (val) {
  3426. this.fileSelections = val
  3427. },
  3428. // 上传文件
  3429. uploadFileModal () {
  3430. let currentData = {
  3431. titleCon: '工程变更文件上传',
  3432. site: this.currentRow.site,
  3433. createBy: this.$store.state.user.name,
  3434. dataNo: this.currentRow.changeNo,
  3435. fileRemark: '',
  3436. folder: 'change',
  3437. }
  3438. this.uploadDialog = true
  3439. //打开组件 去做新增业务
  3440. // this.$nextTick(() => {
  3441. // this.$refs.changeUploadFile.init(currentData);
  3442. // })
  3443. },
  3444. // 删除变更单文件
  3445. deleteChangeFile () {
  3446. if (this.fileSelections.length === 0) {
  3447. this.$message.warning('请选择要删除的文件!')
  3448. return
  3449. }
  3450. let tempData = {
  3451. fileList: this.fileSelections
  3452. }
  3453. this.$confirm('确定删除文件?', '提示', {
  3454. confirmButtonText: '确定',
  3455. cancelButtonText: '取消',
  3456. type: 'warning'
  3457. }).then(() => {
  3458. deleteChangeFile(tempData).then(({data}) => {
  3459. if (data && data.code === 0) {
  3460. this.getChangeFileList()
  3461. this.$message({
  3462. message: '操作成功',
  3463. type: 'success',
  3464. duration: 1500,
  3465. onClose: () => {}
  3466. })
  3467. } else {
  3468. this.$alert(data.msg, '错误', {
  3469. confirmButtonText: '确定'
  3470. })
  3471. }
  3472. })
  3473. })
  3474. },
  3475. // 下载
  3476. downloadFile (row) {
  3477. downLoadQuotationFile(row)
  3478. .then(({data}) => {
  3479. // 不限制文件下载类型
  3480. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3481. // 下载文件名称
  3482. const fileName = row.fileName
  3483. // a标签下载
  3484. const linkNode = document.createElement('a')
  3485. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3486. linkNode.style.display = 'none'
  3487. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3488. document.body.appendChild(linkNode)
  3489. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3490. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3491. document.body.removeChild(linkNode)
  3492. })
  3493. },
  3494. // 修改变更单模态框
  3495. async updateModal (row) {
  3496. await this.getNodeAuthority(row)
  3497. this.modalData = {
  3498. site: row.site,
  3499. changeNo: row.changeNo,
  3500. applicantId: row.applicantId,
  3501. applicantName: row.applicantName,
  3502. applicationDepartmentId: row.applicationDepartmentId,
  3503. applicationDepartmentName: row.applicationDepartmentName,
  3504. applyDate: row.applyDate,
  3505. ecnType: row.ecnType,
  3506. changeImpact: row.changeImpact,
  3507. changeImpactDesc: row.changeImpactDesc,
  3508. ecnStage: row.ecnStage,
  3509. changeType: row.changeType,
  3510. tpEngineerId: row.tpEngineerId,
  3511. tpEngineerName: row.tpEngineerName,
  3512. changePhaseInDate: row.changePhaseInDate,
  3513. dfIsProduct: row.dfIsProduct,
  3514. printing: row.printing,
  3515. manufacturingCostIsChange: row.manufacturingCostIsChange,
  3516. changeRequestDesc: row.changeRequestDesc,
  3517. isReQuote: row.isReQuote,
  3518. ulCertificationRequirements: row.ulCertificationRequirements,
  3519. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  3520. gpCertificationRequirements: row.gpCertificationRequirements,
  3521. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  3522. updateBy: this.$store.state.user.name,
  3523. detailList: [],
  3524. ecnTypeData: [],
  3525. industrialEngineerId: row.industrialEngineerId,
  3526. industrialEngineerName: row.industrialEngineerName,
  3527. changeStatus: row.changeStatus,
  3528. cqcOperatorId: row.cqcOperatorId,
  3529. cqcOperatorName: row.cqcOperatorName,
  3530. faiOperatorId: row.faiOperatorId,
  3531. faiOperatorName: row.faiOperatorName,
  3532. nodeConclusion: '',
  3533. rejectOpinion: '',
  3534. stepId: row.stepId,
  3535. rejectFlag: row.rejectFlag,
  3536. rejectStepId: row.rejectStepId,
  3537. isReject: row.isReject,
  3538. menuId: this.$route.meta.menuId,
  3539. userName: this.$store.state.user.name,
  3540. nodeId: row.nodeId,
  3541. buNo: row.buNo,
  3542. createBy2: row.createBy2,
  3543. tpProcessControl: row.tpProcessControl,
  3544. csProcessControl: row.csProcessControl
  3545. }
  3546. this.changeTitle = '变更申请-' + this.modalData.changeNo
  3547. // 查选择的ECN种类
  3548. this.getChangeChooseEcnType()
  3549. // 查变更单明细
  3550. this.changeRequestDetailSearch()
  3551. // 查变更单库存成本影响
  3552. this.inventoryCostImpactSearch()
  3553. // 查变更单TP&执行信息
  3554. this.tpExecutionInfoSearch()
  3555. // 查变更单会签信息
  3556. this.countersignatureSearch()
  3557. this.activeName = 'basicInformation'
  3558. this.modalFlag = true
  3559. this.modalDisableFlag = true
  3560. },
  3561. // 下达
  3562. issueModal (row) {
  3563. this.$confirm(`是否确认下达?`, '提示', {
  3564. confirmButtonText: '确定',
  3565. cancelButtonText: '取消',
  3566. type: 'warning'
  3567. }).then(() => {
  3568. let tempData = {
  3569. site: row.site,
  3570. userName: this.$store.state.user.name,
  3571. changeNo: row.changeNo,
  3572. menuId: this.$route.meta.menuId
  3573. }
  3574. issueChange(tempData).then(({data}) => {
  3575. if (data && data.code === 0) {
  3576. this.getDataList()
  3577. this.$message({message: '操作成功', type: 'success'})
  3578. } else {
  3579. this.$alert(data.msg, '错误', {
  3580. confirmButtonText: '确定'
  3581. })
  3582. }
  3583. })
  3584. })
  3585. },
  3586. // 打开提交模态框
  3587. submitDataModal () {
  3588. this.rejectOpinion = ''
  3589. this.submitModalFlag = true
  3590. },
  3591. // 同意提交
  3592. agreeSubmit () {
  3593. this.$confirm(`是否确认提交?`, '提示', {
  3594. confirmButtonText: '确定',
  3595. cancelButtonText: '取消',
  3596. type: 'warning'
  3597. }).then(() => {
  3598. this.modalData.nodeConclusion = 'Y'
  3599. this.submitData()
  3600. })
  3601. },
  3602. // 驳回提交
  3603. rejectSubmit () {
  3604. this.$confirm(`是否确认驳回?`, '提示', {
  3605. confirmButtonText: '确定',
  3606. cancelButtonText: '取消',
  3607. type: 'warning'
  3608. }).then(() => {
  3609. this.modalData.rejectOpinion = this.rejectOpinion
  3610. this.modalData.nodeConclusion = 'N'
  3611. this.submitData()
  3612. })
  3613. },
  3614. // 提交
  3615. submitData () {
  3616. if (this.plmChangeRequestArr) {
  3617. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  3618. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  3619. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  3620. return
  3621. }
  3622. }
  3623. }
  3624. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  3625. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  3626. // 判断集合中的该属性是否都有值
  3627. let val = this.chooseDataList.every(item => {
  3628. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  3629. return value !== null && value !== ''
  3630. })
  3631. // 如果没有值 且该字段为必填
  3632. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  3633. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  3634. return
  3635. }
  3636. }
  3637. }
  3638. if (this.plmChangeCostImpactArr) { // 库存成本影响
  3639. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  3640. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  3641. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  3642. return
  3643. }
  3644. }
  3645. }
  3646. if (this.plmChangeFAItemArr) { // 评估信息
  3647. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  3648. let val = this.chooseItemList2.every(item => {
  3649. const value = item[this.plmChangeFAItemArr[i].fieldId]
  3650. return value !== null && value !== ''
  3651. })
  3652. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  3653. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  3654. return
  3655. }
  3656. }
  3657. }
  3658. if (this.plmChangeExecutionInfoArr) {
  3659. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  3660. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  3661. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  3662. return
  3663. }
  3664. }
  3665. }
  3666. if (this.plmChangeItemArr) { // 执行信息
  3667. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  3668. let val = this.chooseItemList.every(item => {
  3669. const value = item[this.plmChangeItemArr[i].fieldId]
  3670. return value !== null && value !== ''
  3671. })
  3672. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  3673. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  3674. return
  3675. }
  3676. }
  3677. }
  3678. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  3679. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  3680. let val = this.currentChooseCSItemList.every(item => {
  3681. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  3682. return value !== null && value !== ''
  3683. })
  3684. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  3685. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  3686. return
  3687. }
  3688. }
  3689. }
  3690. if (this.chooseDataList.length === 0) {
  3691. this.$message.warning('请添加需要变更的技术参数卡!')
  3692. return
  3693. }
  3694. this.costImpactData.changeTotalCost = this.totalCost
  3695. this.executionInfoData.chooseItemList = this.chooseItemList
  3696. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3697. this.countersignatureData.changeNo = this.modalData.changeNo
  3698. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  3699. this.modalData.userName = this.$store.state.user.name
  3700. this.modalData.menuId = this.$route.meta.menuId
  3701. this.modalData.detailList = this.chooseDataList
  3702. this.modalData.ecnTypeData = this.form
  3703. this.modalData.costImpactData = this.costImpactData
  3704. this.modalData.executionInfoData = this.executionInfoData
  3705. this.modalData.countersignatureData = this.countersignatureData
  3706. this.submitLoading = true
  3707. submitChange(this.modalData).then(({data}) => {
  3708. if (data && data.code === 0) {
  3709. this.getDataList()
  3710. this.$message({message: '操作成功', type: 'success'})
  3711. this.submitModalFlag = false
  3712. this.modalFlag = false
  3713. } else {
  3714. this.$alert(data.msg, '错误', {
  3715. confirmButtonText: '确定'
  3716. })
  3717. }
  3718. this.submitLoading = false
  3719. }).catch(()=>{
  3720. this.submitLoading = false
  3721. })
  3722. },
  3723. // 获取选择的ECN种类
  3724. getChangeChooseEcnType () {
  3725. getChooseEcnType(this.modalData).then(({data}) => {
  3726. if (data && data.code === 0) {
  3727. this.form = data.rows
  3728. } else {
  3729. this.$alert(data.msg, '错误', {
  3730. confirmButtonText: '确定'
  3731. })
  3732. }
  3733. })
  3734. },
  3735. // 打开ECN种类模态框
  3736. chooseEcnTypeModal () {
  3737. this.ecnTypeModalFlag = true
  3738. },
  3739. // 保存ECN种类
  3740. saveEcnTypeData () {
  3741. this.ecnTypeModalFlag = false
  3742. },
  3743. // 查询ECN的模板
  3744. getEcnModel () {
  3745. let tempData = {
  3746. site: this.$store.state.user.site,
  3747. functionType: 'ECN',
  3748. codeNo: 'E001'
  3749. }
  3750. getEcnModel(tempData).then(({data}) => {
  3751. if (data.code === 0) {
  3752. this.modelList = data.rows
  3753. }
  3754. })
  3755. },
  3756. // 查询变更明细表
  3757. changeRequestDetailSearch () {
  3758. requestDetailSearch(this.modalData).then(({data}) => {
  3759. if (data && data.code === 0) {
  3760. this.chooseDataList = data.rows
  3761. } else {
  3762. this.$alert(data.msg, '错误', {
  3763. confirmButtonText: '确定'
  3764. })
  3765. }
  3766. })
  3767. },
  3768. // 查询库存成本影响对象
  3769. inventoryCostImpactSearch () {
  3770. costImpactSearch(this.modalData).then(({data}) => {
  3771. if (data && data.code === 0) {
  3772. this.costImpactData = data.rows
  3773. } else {
  3774. this.$alert(data.msg, '错误', {
  3775. confirmButtonText: '确定'
  3776. })
  3777. }
  3778. })
  3779. },
  3780. // 查询库存成本影响对象
  3781. inventoryCostImpactSearch2 () {
  3782. costImpactSearch(this.currentRow).then(({data}) => {
  3783. if (data && data.code === 0) {
  3784. this.currentCostImpactData = data.rows
  3785. } else {
  3786. this.$alert(data.msg, '错误', {
  3787. confirmButtonText: '确定'
  3788. })
  3789. }
  3790. })
  3791. },
  3792. // 查询审批信息
  3793. getApprovalList () {
  3794. let tempData = {
  3795. site: this.$store.state.user.site,
  3796. menuId: this.$route.meta.menuId,
  3797. documentNo: this.currentRow.changeNo
  3798. }
  3799. getApprovalList(tempData).then(({data}) => {
  3800. if (data && data.code === 0) {
  3801. this.approvalList = data.rows
  3802. } else {
  3803. this.approvalList = []
  3804. }
  3805. })
  3806. },
  3807. // 查询执行信息
  3808. tpExecutionInfoSearch () {
  3809. executionInfoSearch(this.modalData).then(({data}) => {
  3810. if (data && data.code === 0) {
  3811. this.executionInfoData = data.rows.executionInfoData
  3812. this.executionInfoData.createBy = this.$store.state.user.name
  3813. this.chooseItemList = data.rows.chooseItemList
  3814. this.chooseItemList2 = data.rows.chooseItemList2
  3815. } else {
  3816. this.$alert(data.msg, '错误', {
  3817. confirmButtonText: '确定'
  3818. })
  3819. }
  3820. })
  3821. },
  3822. tpExecutionInfoSearch2 () {
  3823. executionInfoSearch(this.currentRow).then(({data}) => {
  3824. if (data && data.code === 0) {
  3825. this.currentExecutionInfoData = data.rows.executionInfoData
  3826. this.currentExecutionInfoData.createBy = this.$store.state.user.name
  3827. this.currentChooseItemList = data.rows.chooseItemList
  3828. this.currentChooseItemList2 = data.rows.chooseItemList2
  3829. } else {
  3830. this.$alert(data.msg, '错误', {
  3831. confirmButtonText: '确定'
  3832. })
  3833. }
  3834. })
  3835. },
  3836. // 查询会签信息
  3837. countersignatureSearch () {
  3838. countersignatureSearch(this.modalData).then(({data}) => {
  3839. if (data && data.code === 0) {
  3840. this.chooseCSItemList = data.rows.chooseCSItemList
  3841. } else {
  3842. this.$alert(data.msg, '错误', {
  3843. confirmButtonText: '确定'
  3844. })
  3845. }
  3846. })
  3847. },
  3848. countersignatureSearch2 () {
  3849. countersignatureSearch(this.currentRow).then(({data}) => {
  3850. if (data && data.code === 0) {
  3851. this.currentChooseCSItemList = data.rows.chooseCSItemList
  3852. } else {
  3853. this.$alert(data.msg, '错误', {
  3854. confirmButtonText: '确定'
  3855. })
  3856. }
  3857. })
  3858. },
  3859. // 删除所选技术参数卡
  3860. deleteChooseDataModal (row) {
  3861. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  3862. confirmButtonText: '确定',
  3863. cancelButtonText: '取消',
  3864. type: 'warning'
  3865. }).then(() => {
  3866. deleteChangeDetail(row).then(({data}) => {
  3867. if (data && data.code === 0) {
  3868. this.changeRequestDetailSearch()
  3869. this.$message({
  3870. message: '操作成功',
  3871. type: 'success',
  3872. duration: 1500,
  3873. onClose: () => {}
  3874. })
  3875. } else {
  3876. this.$alert(data.msg, '错误', {
  3877. confirmButtonText: '确定'
  3878. })
  3879. }
  3880. })
  3881. })
  3882. },
  3883. // 修改变更申请
  3884. saveData () {
  3885. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  3886. this.$message.warning('请选择申请人员!')
  3887. return
  3888. }
  3889. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  3890. this.$message.warning('请选择申请日期!')
  3891. return
  3892. }
  3893. // if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  3894. // this.$message.warning('请选择ECN变更影响!')
  3895. // return
  3896. // }
  3897. // if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  3898. // this.$message.warning('请填写变更影响描述!')
  3899. // return
  3900. // }
  3901. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  3902. this.$message.warning('请选择ECN阶段!')
  3903. return
  3904. }
  3905. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  3906. this.$message.warning('请选择变更类别!')
  3907. return
  3908. }
  3909. if (this.form.length === 0) {
  3910. this.$message.warning('请选择ECN种类!')
  3911. return
  3912. }
  3913. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  3914. this.$message.warning('请选择审批人员!')
  3915. return
  3916. }
  3917. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  3918. this.$message.warning('请选择变更生效日期!')
  3919. return
  3920. }
  3921. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  3922. this.$message.warning('请选择是否DF产品!')
  3923. return
  3924. }
  3925. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  3926. this.$message.warning('请选择I/E!')
  3927. return
  3928. }
  3929. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  3930. this.$message.warning('请填写变更要求描述!')
  3931. return
  3932. }
  3933. if (this.modalData.printing === '' || this.modalData.printing == null) {
  3934. this.$message.warning('请选择印刷方式!')
  3935. return
  3936. }
  3937. // if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
  3938. // this.$message.warning('请选择CQC或者FAI人员!')
  3939. // return
  3940. // }
  3941. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3942. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3943. this.$message.warning('请填写在生产品处理意见!')
  3944. return
  3945. }
  3946. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3947. this.$message.warning('请填写在生产品执行人!')
  3948. return
  3949. }
  3950. }
  3951. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3952. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3953. this.$message.warning('请填写成品库存处理意见!')
  3954. return
  3955. }
  3956. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3957. this.$message.warning('请填写成品库存执行人!')
  3958. return
  3959. }
  3960. }
  3961. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3962. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3963. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3964. return
  3965. }
  3966. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3967. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3968. return
  3969. }
  3970. }
  3971. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  3972. this.$message.warning('请填写原碑刀编号!')
  3973. return;
  3974. }
  3975. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  3976. this.$message.warning('请填写新碑刀编号!')
  3977. return;
  3978. }
  3979. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  3980. this.$message.warning('请填写原网板/印版编号!')
  3981. return;
  3982. }
  3983. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  3984. this.$message.warning('请填写新网板/印版编号!')
  3985. return;
  3986. }
  3987. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  3988. this.$message.warning('请选择ECN执行日期!')
  3989. return;
  3990. }
  3991. if (this.chooseDataList.length === 0) {
  3992. this.$message.warning('请添加需要变更的技术参数卡!')
  3993. return
  3994. }
  3995. this.costImpactData.changeTotalCost = this.totalCost
  3996. this.executionInfoData.chooseItemList = this.chooseItemList
  3997. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3998. this.countersignatureData.changeNo = this.modalData.changeNo
  3999. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4000. this.modalData.detailList = this.chooseDataList
  4001. this.modalData.ecnTypeData = this.form
  4002. this.modalData.costImpactData = this.costImpactData
  4003. this.modalData.executionInfoData = this.executionInfoData
  4004. this.modalData.countersignatureData = this.countersignatureData
  4005. this.saveLoading = true
  4006. changeRequestUpdate(this.modalData).then(({data}) => {
  4007. if (data && data.code === 0) {
  4008. this.modalData = data.rows.modalData
  4009. this.modalData.menuId = this.$route.meta.menuId
  4010. this.changeTitle = '变更申请-' + this.modalData.changeNo
  4011. this.form = data.rows.form
  4012. this.chooseDataList = data.rows.chooseDataList
  4013. this.costImpactData = data.rows.costImpactData
  4014. this.executionInfoData = data.rows.executionInfoData
  4015. this.executionInfoData.createBy = this.$store.state.user.name
  4016. this.chooseItemList = data.rows.chooseItemList
  4017. this.chooseItemList2 = data.rows.chooseItemList2
  4018. this.chooseCSItemList = data.rows.chooseCSItemList
  4019. this.getDataList()
  4020. this.$message({
  4021. message: '操作成功',
  4022. type: 'success',
  4023. duration: 1500,
  4024. onClose: () => {}
  4025. })
  4026. } else {
  4027. this.$alert(data.msg, '错误', {
  4028. confirmButtonText: '确定'
  4029. })
  4030. }
  4031. this.saveLoading = false
  4032. }).catch(()=>{
  4033. this.saveLoading = false
  4034. })
  4035. },
  4036. // 选择模板属性
  4037. chooseModel () {
  4038. this.chooseModelData = {
  4039. site: this.$store.state.user.site,
  4040. itemNo: '',
  4041. itemDesc: '',
  4042. functionType: 'ECN',
  4043. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  4044. }
  4045. // 先清空缓存选中
  4046. //this.$nextTick(() => this.$refs.itemTable.clearSelection())
  4047. // 查询所有属性
  4048. getItemList(this.chooseModelData).then(({data}) => {
  4049. if (data && data.code === 0) {
  4050. this.itemList = data.rows
  4051. this.itemList.forEach(val => {
  4052. // 回显选中的部门
  4053. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  4054. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  4055. }
  4056. })
  4057. } else {
  4058. this.$alert(data.msg, '错误', {
  4059. confirmButtonText: '确定'
  4060. })
  4061. }
  4062. })
  4063. this.chooseModelFlag = true
  4064. },
  4065. // 查询属性
  4066. searchItemList () {
  4067. getItemList(this.chooseModelData).then(({data}) => {
  4068. if (data.code === 0) {
  4069. this.itemList = data.rows
  4070. }
  4071. })
  4072. },
  4073. // 单机选择
  4074. itemClickRow (row) {
  4075. this.$refs.itemTable.toggleRowSelection(row)
  4076. },
  4077. // 复选属性
  4078. selectionItem (val) {
  4079. this.itemSelections = val
  4080. },
  4081. // 确认多选属性
  4082. confirmItem () {
  4083. if (this.itemSelections.length === 0) {
  4084. this.$message.warning("请勾选属性!")
  4085. return
  4086. }
  4087. // 临时集合
  4088. let temp = []
  4089. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  4090. this.chooseItemList.forEach(itemA => {
  4091. if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  4092. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  4093. temp.push(itemA)
  4094. }
  4095. })
  4096. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  4097. this.itemSelections.forEach(itemB => {
  4098. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  4099. // 如果b中的对象名字不在结果中,则添加到结果中
  4100. temp.push(itemB)
  4101. }
  4102. })
  4103. this.chooseItemList = temp
  4104. this.chooseModelFlag = false
  4105. },
  4106. // 执行所选属性
  4107. executeModal (row) {
  4108. this.$confirm(`是否确认提交?`, '提示', {
  4109. confirmButtonText: '确定',
  4110. cancelButtonText: '取消',
  4111. type: 'warning'
  4112. }).then(() => {
  4113. if (this.plmChangeRequestArr) { // 主信息
  4114. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4115. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4116. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4117. return
  4118. }
  4119. }
  4120. }
  4121. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4122. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4123. // 判断集合中的该属性是否都有值
  4124. let val = this.chooseDataList.every(item => {
  4125. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4126. return value !== null && value !== ''
  4127. })
  4128. // 如果没有值 且该字段为必填
  4129. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4130. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4131. return
  4132. }
  4133. }
  4134. }
  4135. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4136. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4137. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4138. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4139. return
  4140. }
  4141. }
  4142. }
  4143. if (this.plmChangeFAItemArr) { // 评估信息
  4144. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4145. let val = this.chooseItemList2.every(item => {
  4146. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4147. return value !== null && value !== ''
  4148. })
  4149. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4150. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4151. return
  4152. }
  4153. }
  4154. }
  4155. if (this.plmChangeExecutionInfoArr) {
  4156. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4157. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4158. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4159. return
  4160. }
  4161. }
  4162. }
  4163. if (this.plmChangeItemArr) { // 执行信息
  4164. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4165. let val = this.chooseItemList.every(item => {
  4166. const value = item[this.plmChangeItemArr[i].fieldId]
  4167. return value !== null && value !== ''
  4168. })
  4169. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4170. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4171. return
  4172. }
  4173. }
  4174. }
  4175. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4176. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4177. let val = this.currentChooseCSItemList.every(item => {
  4178. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4179. return value !== null && value !== ''
  4180. })
  4181. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4182. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4183. return
  4184. }
  4185. }
  4186. }
  4187. if (this.chooseDataList.length === 0) {
  4188. this.$message.warning('请添加需要变更的技术参数卡!')
  4189. return
  4190. }
  4191. row.executeFlag = 'Y'
  4192. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4193. this.costImpactData.changeTotalCost = this.totalCost
  4194. this.executionInfoData.chooseItemList = this.chooseItemList
  4195. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4196. this.countersignatureData.changeNo = this.modalData.changeNo
  4197. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4198. this.modalData.userName = this.$store.state.user.name
  4199. this.modalData.menuId = this.$route.meta.menuId
  4200. this.modalData.detailList = this.chooseDataList
  4201. this.modalData.ecnTypeData = this.form
  4202. this.modalData.costImpactData = this.costImpactData
  4203. this.modalData.executionInfoData = this.executionInfoData
  4204. this.modalData.countersignatureData = this.countersignatureData
  4205. this.modalData.nodeConclusion = 'Y'
  4206. this.submitLoading = true
  4207. tpExecute(this.modalData).then(({data}) => {
  4208. if (data && data.code === 0) {
  4209. this.getDataList()
  4210. this.$message({message: '操作成功', type: 'success'})
  4211. this.submitModalFlag = false
  4212. this.modalFlag = false
  4213. } else {
  4214. this.$alert(data.msg, '错误', {
  4215. confirmButtonText: '确定'
  4216. })
  4217. row.executeFlag = ''
  4218. row.itemExecutionDate = ''
  4219. }
  4220. this.submitLoading = false
  4221. }).catch(()=>{
  4222. this.submitLoading = false
  4223. })
  4224. })
  4225. // row.executeFlag = 'Y'
  4226. // row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4227. // row.executor = this.$store.state.user.name
  4228. // // 执行时调用同意提交方法 // 2025-04-15 海波要求修改 一定会是审批中状态
  4229. // if (this.modalData.changeStatus === '审批中') {
  4230. // this.agreeSubmit()
  4231. // }
  4232. },
  4233. // 执行所选属性
  4234. executeCSModal (row) {
  4235. this.$confirm(`是否确认会签?`, '提示', {
  4236. confirmButtonText: '确定',
  4237. cancelButtonText: '取消',
  4238. type: 'warning'
  4239. }).then(() => {
  4240. if (this.plmChangeRequestArr) { // 主信息
  4241. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4242. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4243. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4244. return
  4245. }
  4246. }
  4247. }
  4248. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4249. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4250. // 判断集合中的该属性是否都有值
  4251. let val = this.chooseDataList.every(item => {
  4252. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4253. return value !== null && value !== ''
  4254. })
  4255. // 如果没有值 且该字段为必填
  4256. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4257. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4258. return
  4259. }
  4260. }
  4261. }
  4262. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4263. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4264. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4265. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4266. return
  4267. }
  4268. }
  4269. }
  4270. if (this.plmChangeFAItemArr) { // 评估信息
  4271. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4272. let val = this.chooseItemList2.every(item => {
  4273. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4274. return value !== null && value !== ''
  4275. })
  4276. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4277. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4278. return
  4279. }
  4280. }
  4281. }
  4282. if (this.plmChangeExecutionInfoArr) {
  4283. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4284. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4285. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4286. return
  4287. }
  4288. }
  4289. }
  4290. if (this.plmChangeItemArr) { // 执行信息
  4291. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4292. let val = this.chooseItemList.every(item => {
  4293. const value = item[this.plmChangeItemArr[i].fieldId]
  4294. return value !== null && value !== ''
  4295. })
  4296. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4297. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4298. return
  4299. }
  4300. }
  4301. }
  4302. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4303. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4304. let val = this.currentChooseCSItemList.every(item => {
  4305. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4306. return value !== null && value !== ''
  4307. })
  4308. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4309. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4310. return
  4311. }
  4312. }
  4313. }
  4314. if (this.chooseDataList.length === 0) {
  4315. this.$message.warning('请添加需要变更的技术参数卡!')
  4316. return
  4317. }
  4318. row.executeFlag = 'Y'
  4319. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4320. this.costImpactData.changeTotalCost = this.totalCost
  4321. this.executionInfoData.chooseItemList = this.chooseItemList
  4322. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4323. this.countersignatureData.changeNo = this.modalData.changeNo
  4324. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4325. this.modalData.userName = this.$store.state.user.name
  4326. this.modalData.menuId = this.$route.meta.menuId
  4327. this.modalData.detailList = this.chooseDataList
  4328. this.modalData.ecnTypeData = this.form
  4329. this.modalData.costImpactData = this.costImpactData
  4330. this.modalData.executionInfoData = this.executionInfoData
  4331. this.modalData.countersignatureData = this.countersignatureData
  4332. this.modalData.nodeConclusion = 'Y'
  4333. this.submitLoading = true
  4334. csExecute(this.modalData).then(({data}) => {
  4335. if (data && data.code === 0) {
  4336. this.getDataList()
  4337. this.$message({message: '操作成功', type: 'success'})
  4338. this.submitModalFlag = false
  4339. this.modalFlag = false
  4340. } else {
  4341. this.$alert(data.msg, '错误', {
  4342. confirmButtonText: '确定'
  4343. })
  4344. row.executeFlag = ''
  4345. row.itemExecutionDate = ''
  4346. }
  4347. this.submitLoading = false
  4348. }).catch(()=>{
  4349. this.submitLoading = false
  4350. })
  4351. })
  4352. },
  4353. // 执行所选属性
  4354. executeModal2 (row) {
  4355. row.executeFlag = 'Y'
  4356. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4357. row.executor = this.$store.state.user.name
  4358. },
  4359. // 编辑执行信息
  4360. executionInformationSave () {
  4361. this.executionInfoData.chooseItemList = this.chooseItemList
  4362. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4363. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  4364. this.$message.warning('请填写原碑刀编号!')
  4365. return;
  4366. }
  4367. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  4368. this.$message.warning('请填写新碑刀编号!')
  4369. return;
  4370. }
  4371. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  4372. this.$message.warning('请填写原网板/印版编号!')
  4373. return;
  4374. }
  4375. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  4376. this.$message.warning('请填写新网板/印版编号!')
  4377. return;
  4378. }
  4379. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  4380. this.$message.warning('请选择ECN执行日期!')
  4381. return;
  4382. }
  4383. executionUpdate(this.executionInfoData).then(({data}) => {
  4384. if (data && data.code === 0) {
  4385. this.executionInfoData = data.rows.executionInfoData
  4386. this.executionInfoData.createBy = this.$store.state.user.name
  4387. this.chooseItemList = data.rows.chooseItemList
  4388. this.chooseItemList2 = data.rows.chooseItemList2
  4389. this.getDataList()
  4390. this.$message({
  4391. message: '操作成功',
  4392. type: 'success',
  4393. duration: 1500,
  4394. onClose: () => {}
  4395. })
  4396. } else {
  4397. this.$alert(data.msg, '错误', {
  4398. confirmButtonText: '确定'
  4399. })
  4400. }
  4401. })
  4402. },
  4403. // 编辑会签信息
  4404. countersignatureSave () {
  4405. this.countersignatureData.changeNo = this.modalData.changeNo
  4406. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4407. countersignatureUpdate(this.countersignatureData).then(({data}) => {
  4408. if (data && data.code === 0) {
  4409. this.chooseCSItemList = data.rows.chooseCSItemList
  4410. this.getDataList()
  4411. this.$message({
  4412. message: '操作成功',
  4413. type: 'success',
  4414. duration: 1500,
  4415. onClose: () => {}
  4416. })
  4417. } else {
  4418. this.$alert(data.msg, '错误', {
  4419. confirmButtonText: '确定'
  4420. })
  4421. }
  4422. })
  4423. },
  4424. // 新增技术参数卡
  4425. addChangeDetail () {
  4426. this.searchData2.buNo = this.modalData.buNo
  4427. technicalSpecificationSearch2(this.searchData2).then(({data}) => {
  4428. if (data.code === 0) {
  4429. this.dataList2 = data.rows
  4430. const shouldExclude = (item) => {
  4431. return this.chooseDataList.some(cdItem =>
  4432. cdItem.site === item.site && cdItem.codeNo === item.codeNo
  4433. )
  4434. }
  4435. this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
  4436. this.addDetailModal = true
  4437. } else {
  4438. this.dataList2 = []
  4439. }
  4440. })
  4441. },
  4442. // 复选物料信息
  4443. selectionData2 (val) {
  4444. this.dataSelections2 = val
  4445. },
  4446. // 确认选择技术参数卡
  4447. addDetail () {
  4448. if (this.dataSelections2.length === 0) {
  4449. this.$message.warning("请勾选技术参数卡!")
  4450. return
  4451. }
  4452. this.dataSelections2.forEach(item => {
  4453. // 确保没有重复的元素
  4454. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
  4455. this.chooseDataList.push(item)
  4456. }
  4457. })
  4458. this.addDetailModal = false
  4459. this.dataSelections2 = []
  4460. },
  4461. // 回车换行
  4462. focusNextInput (index, type) {
  4463. let aaa = ''
  4464. if (this.chooseDataList.length - 1 === index) {
  4465. aaa = `${type}0`
  4466. } else {
  4467. aaa = `${type}${index + 1}`
  4468. }
  4469. this.$nextTick(() => {
  4470. this.$refs[aaa].focus()
  4471. })
  4472. },
  4473. // 根据人员编码查人员部门
  4474. getDepartmentByUserName () {
  4475. let tempData = {
  4476. site: this.$store.state.user.site,
  4477. username: this.modalData.applicantId
  4478. }
  4479. getDepartmentByUserName(tempData).then(({data}) => {
  4480. if (data.code === 0) {
  4481. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  4482. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  4483. }
  4484. })
  4485. },
  4486. // 预览
  4487. previewFile (row) {
  4488. // 预览文件
  4489. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  4490. let type = ''
  4491. if (image.includes(row.fileType.toLowerCase())) {
  4492. type = 'image/' + row.fileType
  4493. }
  4494. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  4495. if (video.includes(row.fileType.toLowerCase())) {
  4496. type = 'video/' + row.fileType
  4497. }
  4498. let txt = ['txt']
  4499. if (txt.includes(row.fileType.toLowerCase())) {
  4500. type = 'text/plain'
  4501. }
  4502. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  4503. if (office.includes(row.fileType.toLowerCase())) {
  4504. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  4505. return
  4506. }
  4507. let pdf = ['pdf']
  4508. if (pdf.includes(row.fileType.toLowerCase())) {
  4509. type = 'application/pdf'
  4510. }
  4511. if (type === ''){
  4512. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  4513. return;
  4514. }
  4515. downLoadQuotationFile(row).then(({data}) => {
  4516. const blob = new Blob([data], { type: type });
  4517. // 创建URL来生成预览
  4518. const fileURL = URL.createObjectURL(blob);
  4519. // 在新标签页中打开文件预览
  4520. const newTab = window.open(fileURL, '_blank')
  4521. })
  4522. },
  4523. // ======== chooseList相关方法 ========
  4524. // 获取基础数据列表S
  4525. getBaseList (val, type) {
  4526. this.tagNo = val
  4527. this.tagNo1 = type
  4528. this.$nextTick(() => {
  4529. let strVal = ''
  4530. let conSql = ''
  4531. if (val === 103) {
  4532. if (type === 1) {
  4533. strVal = this.modalData.applicantId
  4534. } else if (type === 3) {
  4535. strVal = this.costImpactData.productionProductExecutor
  4536. } else if (type === 4) {
  4537. strVal = this.costImpactData.inventoryProductExecutor
  4538. } else if (type === 5) {
  4539. strVal = this.costImpactData.affectedExecutor
  4540. }
  4541. // else if (type === 7) {
  4542. // strVal = this.tempExecutorRow.executor
  4543. // }
  4544. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4545. }
  4546. if (val === 133) {
  4547. strVal = this.tempPartRow.newPartNo
  4548. }
  4549. if (val === 2005) {
  4550. strVal = this.modalData.tpEngineerId
  4551. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4552. }
  4553. if (val === 2006) {
  4554. strVal = this.modalData.industrialEngineerId
  4555. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4556. }
  4557. if (val === 2007) {
  4558. strVal = this.modalData.cqcOperatorId
  4559. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4560. }
  4561. if (val === 2008) {
  4562. strVal = this.modalData.faiOperatorId
  4563. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4564. }
  4565. if (val === 2010) {
  4566. strVal = this.tempExecutorRow.executor
  4567. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4568. }
  4569. this.$refs.baseList.init(val, strVal, conSql)
  4570. })
  4571. },
  4572. // 列表方法的回调
  4573. getBaseData (val) {
  4574. if (this.tagNo === 103) {
  4575. if (this.tagNo1 === 1) {
  4576. this.modalData.applicantId = val.username
  4577. this.modalData.applicantName = val.user_display
  4578. this.getDepartmentByUserName()
  4579. } else if (this.tagNo1 === 3) {
  4580. this.costImpactData.productionProductExecutor = val.username
  4581. this.costImpactData.productionProductExecutorName = val.user_display
  4582. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  4583. } else if (this.tagNo1 === 4) {
  4584. this.costImpactData.inventoryProductExecutor = val.username
  4585. this.costImpactData.inventoryProductExecutorName = val.user_display
  4586. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  4587. } else if (this.tagNo1 === 5) {
  4588. this.costImpactData.affectedExecutor = val.username
  4589. this.costImpactData.affectedExecutorName = val.user_display
  4590. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  4591. }
  4592. // else if (this.tagNo1 === 7) {
  4593. // this.$set(this.tempExecutorRow,'executor',val.username)
  4594. // }
  4595. }
  4596. if (this.tagNo === 133) {
  4597. //this.tempPartRow.newPartNo = val.part_no
  4598. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  4599. }
  4600. if (this.tagNo === 2005) {
  4601. this.modalData.tpEngineerId = val.username
  4602. this.modalData.tpEngineerName = val.user_display
  4603. }
  4604. if (this.tagNo === 2006) {
  4605. this.modalData.industrialEngineerId = val.username
  4606. this.modalData.industrialEngineerName = val.user_display
  4607. }
  4608. if (this.tagNo === 2007) {
  4609. this.modalData.cqcOperatorId = val.username
  4610. this.modalData.cqcOperatorName = val.user_display
  4611. }
  4612. if (this.tagNo === 2008) {
  4613. this.modalData.faiOperatorId = val.username
  4614. this.modalData.faiOperatorName = val.user_display
  4615. }
  4616. if (this.tagNo === 2010) {
  4617. this.$set(this.tempExecutorRow,'executor',val.username)
  4618. }
  4619. },
  4620. // 申请人输入校验
  4621. applicantBlur (tagNo) {
  4622. if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
  4623. let tempData = {
  4624. tagno: tagNo,
  4625. conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
  4626. }
  4627. verifyData(tempData).then(({data}) => {
  4628. if (data && data.code === 0) {
  4629. if (data.baseListData.length > 0) {
  4630. this.modalData.applicantId = data.baseListData[0].username
  4631. this.modalData.applicantName = data.baseListData[0].user_display
  4632. this.getDepartmentByUserName()
  4633. return
  4634. }
  4635. }
  4636. })
  4637. }
  4638. this.modalData.applicantName = ''
  4639. this.modalData.applicationDepartmentId = ''
  4640. this.modalData.applicationDepartmentName = ''
  4641. },
  4642. // 审批人员输入校验
  4643. tpEngineerBlur (tagNo) {
  4644. if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
  4645. let tempData = {
  4646. tagno: tagNo,
  4647. conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  4648. }
  4649. verifyData(tempData).then(({data}) => {
  4650. if (data && data.code === 0) {
  4651. if (data.baseListData.length > 0) {
  4652. this.modalData.tpEngineerId = data.baseListData[0].username
  4653. this.modalData.tpEngineerName = data.baseListData[0].user_display
  4654. return
  4655. }
  4656. }
  4657. })
  4658. }
  4659. this.modalData.tpEngineerName = ''
  4660. },
  4661. // I/E输入校验
  4662. industrialEngineerBlur (tagNo) {
  4663. if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
  4664. let tempData = {
  4665. tagno: tagNo,
  4666. conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  4667. }
  4668. verifyData(tempData).then(({data}) => {
  4669. if (data && data.code === 0) {
  4670. if (data.baseListData.length > 0) {
  4671. this.modalData.industrialEngineerId = data.baseListData[0].username
  4672. this.modalData.industrialEngineerName = data.baseListData[0].user_display
  4673. return
  4674. }
  4675. }
  4676. })
  4677. }
  4678. this.modalData.industrialEngineerName = ''
  4679. },
  4680. // CQC输入校验
  4681. cqcOperatorBlur (tagNo) {
  4682. if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
  4683. let tempData = {
  4684. tagno: tagNo,
  4685. conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  4686. }
  4687. verifyData(tempData).then(({data}) => {
  4688. if (data && data.code === 0) {
  4689. if (data.baseListData.length > 0) {
  4690. this.modalData.cqcOperatorId = data.baseListData[0].username
  4691. this.modalData.cqcOperatorName = data.baseListData[0].user_display
  4692. return
  4693. }
  4694. }
  4695. })
  4696. }
  4697. this.modalData.cqcOperatorName = ''
  4698. },
  4699. // FAI输入校验
  4700. faiOperatorBlur (tagNo) {
  4701. if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
  4702. let tempData = {
  4703. tagno: tagNo,
  4704. conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  4705. }
  4706. verifyData(tempData).then(({data}) => {
  4707. if (data && data.code === 0) {
  4708. if (data.baseListData.length > 0) {
  4709. this.modalData.faiOperatorId = data.baseListData[0].username
  4710. this.modalData.faiOperatorName = data.baseListData[0].user_display
  4711. return
  4712. }
  4713. }
  4714. })
  4715. }
  4716. this.modalData.faiOperatorName = ''
  4717. },
  4718. toMenu (row) {
  4719. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  4720. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4721. } else {
  4722. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo: row.oriCodeNo},})
  4723. }
  4724. },
  4725. // ======== 导出相关方法 ========
  4726. /**
  4727. * 导出excel
  4728. */
  4729. async createExportData () {
  4730. this.searchData.limit = -1
  4731. this.searchData.page = 1
  4732. await changeRecordSearch(this.searchData).then(({data}) => {
  4733. this.resultList = data.page.list
  4734. })
  4735. return this.resultList
  4736. },
  4737. startDownload () {},
  4738. finishDownload () {},
  4739. fields () {
  4740. let json = '{'
  4741. this.columnList.forEach((item, index) => {
  4742. if (index === this.columnList.length - 1) {
  4743. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  4744. } else {
  4745. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  4746. }
  4747. })
  4748. json += '}'
  4749. let s = eval('(' + json + ')')
  4750. return s
  4751. },
  4752. rowStyle ({row}) {
  4753. if (this.currentRow.changeNo === row.changeNo) {
  4754. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  4755. }
  4756. },
  4757. // 获取按钮的权限数据
  4758. getButtonAuthData () {
  4759. this.authSearch = this.isAuth(this.menuId+":search")
  4760. this.authUpdate = this.isAuth(this.menuId+":update")
  4761. this.authIssue = this.isAuth(this.menuId+":issue")
  4762. this.authSubmit = this.isAuth(this.menuId+":submit")
  4763. this.authReject = this.isAuth(this.menuId+":reject")
  4764. this.authFileSave = this.isAuth(this.menuId+":fileSave")
  4765. this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad")
  4766. this.authFileRemove = this.isAuth(this.menuId+":fileRemove")
  4767. this.authFilePreview = this.isAuth(this.menuId+":filePreview")
  4768. },
  4769. }
  4770. }
  4771. </script>
  4772. <style scoped lang="scss">
  4773. /deep/ .customer-tab .el-tabs__content {
  4774. padding: 0px !important;
  4775. }
  4776. .numInput /deep/ .el-input__inner{
  4777. text-align: right;
  4778. }
  4779. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  4780. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  4781. -webkit-appearance: none;
  4782. }
  4783. /deep/ .inlineNumber input[type="number"]{
  4784. -moz-appearance: textfield;
  4785. padding-right: 5px !important;
  4786. }
  4787. </style>