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.

4931 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
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  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.map(item => {
  3053. if (item.availableValueList.length > 0) {
  3054. item.chooseValue = item.availableValueList[0].availableValue
  3055. }
  3056. return item
  3057. })
  3058. this.chooseModelFlag2 = false
  3059. },
  3060. // 确认多选CS属性
  3061. confirmCSItem () {
  3062. if (this.itemCSSelections.length === 0) {
  3063. this.$message.warning("请勾选属性!")
  3064. return
  3065. }
  3066. // 临时集合
  3067. let temp = []
  3068. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  3069. this.chooseCSItemList.forEach(itemA => {
  3070. if (this.itemCSSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  3071. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  3072. temp.push(itemA)
  3073. }
  3074. })
  3075. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  3076. this.itemCSSelections.forEach(itemB => {
  3077. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  3078. // 如果b中的对象名字不在结果中,则添加到结果中
  3079. temp.push(itemB)
  3080. }
  3081. })
  3082. this.chooseCSItemList = temp
  3083. this.chooseCSModelFlag = false
  3084. },
  3085. // 查询属性
  3086. searchItemList2 () {
  3087. getItemList(this.chooseModelData2).then(({data}) => {
  3088. if (data.code === 0) {
  3089. this.itemList2 = data.rows
  3090. }
  3091. })
  3092. },
  3093. // 查询CS属性
  3094. searchCSItemList () {
  3095. getItemList(this.chooseCSModelData).then(({data}) => {
  3096. if (data.code === 0) {
  3097. this.itemCSList = data.rows
  3098. }
  3099. })
  3100. },
  3101. // 单机选择
  3102. itemClickRow2 (row) {
  3103. this.$refs.itemTable2.toggleRowSelection(row)
  3104. },
  3105. // 单击选择
  3106. itemCSClickRow (row) {
  3107. this.$refs.itemCSTable.toggleRowSelection(row)
  3108. },
  3109. // 复选属性
  3110. selectionItem2 (val) {
  3111. this.itemSelections2 = val
  3112. },
  3113. // 复选CS属性
  3114. selectionCSItem (val) {
  3115. this.itemCSSelections = val
  3116. },
  3117. // 获取流程的配置权限
  3118. async getNodeAuthority (row) {
  3119. let tempData = {
  3120. site: row.site,
  3121. changeNo: row.changeNo,
  3122. stepId: row.stepId,
  3123. menuId: this.$route.meta.menuId
  3124. }
  3125. await getNodeAuthority(tempData).then(({data}) => {
  3126. if (data && data.code === 0) {
  3127. this.plmChangeRequestArr = data.rows.plm_change_request
  3128. this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail
  3129. this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact
  3130. this.plmChangeFAItemArr = data.rows.plm_change_FA_item
  3131. this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info
  3132. this.plmChangeItemArr = data.rows.plm_change_item
  3133. this.plmChangeCountersignatureItemArr = data.rows.plm_change_countersignature_item
  3134. }
  3135. })
  3136. },
  3137. // ======= 正则校验 =======
  3138. handleInput (value, type) {
  3139. // 大于等于0,且只能输入16位小数
  3140. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,16})?.*$/,'$1')
  3141. if (val === null || val === undefined || val === '') {
  3142. val = 0
  3143. }
  3144. if (type === 1) {
  3145. this.costImpactData.productionProductScrapAmount = val
  3146. } else if (type === 2) {
  3147. this.costImpactData.inventoryProductScrapAmount = val
  3148. } else if (type === 3) {
  3149. this.costImpactData.affectedScrapAmount = val
  3150. }
  3151. },
  3152. partInput (row, val) {
  3153. row.newPartNo = val.toUpperCase()
  3154. },
  3155. executorInput (row, val) {
  3156. //row.executor = val.toUpperCase()
  3157. },
  3158. choosePartNo (row) {
  3159. this.partData.site = row.site
  3160. this.partData.buNo = row.buNo
  3161. this.tempPartRow = row
  3162. if (this.tempPartRow.newPartNo == null) {
  3163. this.tempPartRow.newPartNo = ''
  3164. }
  3165. this.queryPartList()
  3166. //this.getBaseList(133)
  3167. },
  3168. // 查询物料
  3169. queryPartList () {
  3170. this.partData.limit = this.pageSize2
  3171. this.partData.page = this.pageIndex2
  3172. choosePartNoList(this.partData).then(({data}) => {
  3173. if (data && data.code === 0) {
  3174. this.partList = data.page.list
  3175. this.pageIndex2 = data.page.currPage
  3176. this.pageSize2 = data.page.pageSize
  3177. this.totalPage2 = data.page.totalCount
  3178. this.partModelFlag = true
  3179. } else {
  3180. this.partList = []
  3181. }
  3182. })
  3183. },
  3184. // 双击选中物料
  3185. getRowData (row) {
  3186. this.$set(this.tempPartRow,'newPartNo', row.testPartNo)
  3187. this.partModelFlag = false
  3188. },
  3189. // 每页数
  3190. sizeChangeHandle2 (val) {
  3191. this.pageSize2 = val
  3192. this.pageIndex2 = 1
  3193. this.queryPartList()
  3194. },
  3195. // 当前页
  3196. currentChangeHandle2 (val) {
  3197. this.pageIndex2 = val
  3198. this.queryPartList()
  3199. },
  3200. chooseExecutor (row) {
  3201. this.tempExecutorRow = row
  3202. if (this.tempExecutorRow.executor == null) {
  3203. this.tempExecutorRow.executor = ''
  3204. }
  3205. this.getBaseList(2010)
  3206. },
  3207. ecnTypeHeaderChange (val,index) {
  3208. if (val === 'Y') {
  3209. for (let i = 0; i < this.form[index].list.length; i++) {
  3210. this.form[index].list[i].flag = 'Y'
  3211. }
  3212. } else {
  3213. for (let i = 0; i < this.form[index].list.length; i++) {
  3214. this.form[index].list[i].flag = 'N'
  3215. }
  3216. }
  3217. },
  3218. ecnTypeDetailChange (val,index) {
  3219. if (this.form[index].list.every(x => x.flag === 'Y')) {
  3220. this.form[index].flag = 'Y'
  3221. }else {
  3222. this.form[index].flag = 'N'
  3223. }
  3224. },
  3225. // ======== 分页相关方法 ========
  3226. // 每页数
  3227. sizeChangeHandle (val) {
  3228. this.pageSize = val
  3229. this.pageIndex = 1
  3230. this.getDataList()
  3231. },
  3232. // 当前页
  3233. currentChangeHandle (val) {
  3234. this.pageIndex = val
  3235. this.getDataList()
  3236. },
  3237. // ======== 列表选择相关方法 ========
  3238. selectFlag () {
  3239. return true
  3240. },
  3241. // ======== 页签切换相关方法 ========
  3242. // 单机选中询价信息
  3243. changeClickRow (row) {
  3244. this.$refs.changeTable.toggleRowSelection(row)
  3245. this.currentRow = JSON.parse(JSON.stringify(row))
  3246. },
  3247. // // 列表表格选择替换
  3248. // tabClick (tab, event) {
  3249. // // 刷新列表数据
  3250. // this.refreshCurrentTabTable()
  3251. // },
  3252. // 当前值发生变化的时候修改
  3253. currentChange (row, oldRow) {
  3254. // 判断是否是获取焦点的事件
  3255. if (row) {
  3256. this.currentRow = JSON.parse(JSON.stringify(row))
  3257. // 刷新当前页表
  3258. this.refreshCurrentTabTable()
  3259. }
  3260. },
  3261. // 刷新页签的table数据
  3262. refreshChangeTab () {},
  3263. // 新增库存成本影响
  3264. inventoryCostImpactSave () {
  3265. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3266. if (this.costImpactData.productionProductNumber == null || this.costImpactData.productionProductNumber === '') {
  3267. this.$message.warning('请填写在生产品数量!')
  3268. return
  3269. }
  3270. if (this.costImpactData.productionProductNumber <= 0) {
  3271. this.$message.warning('在生产品数量不能小于等于0!')
  3272. return
  3273. }
  3274. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3275. this.$message.warning('请填写在生产品处理意见!')
  3276. return
  3277. }
  3278. if (this.costImpactData.productionProductScrapAmount === 0) {
  3279. this.$message.warning('请填写在生产品报废金额!')
  3280. return
  3281. }
  3282. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3283. this.$message.warning('请填写在生产品执行人!')
  3284. return
  3285. }
  3286. }
  3287. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3288. if (this.costImpactData.inventoryProductNumber == null || this.costImpactData.inventoryProductNumber === '') {
  3289. this.$message.warning('请填写成品库存数量!')
  3290. return
  3291. }
  3292. if (this.costImpactData.inventoryProductNumber <= 0) {
  3293. this.$message.warning('成品库存数量不能小于等于0!')
  3294. return
  3295. }
  3296. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3297. this.$message.warning('请填写成品库存处理意见!')
  3298. return
  3299. }
  3300. if (this.costImpactData.inventoryProductScrapAmount === 0) {
  3301. this.$message.warning('请填写成品库存报废金额!')
  3302. return
  3303. }
  3304. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3305. this.$message.warning('请填写成品库存执行人!')
  3306. return
  3307. }
  3308. }
  3309. if (this.costImpactData.newOrderFlag === 'Y') { // 新订单
  3310. if (this.costImpactData.newOrderNumber == null || this.costImpactData.newOrderNumber === '') {
  3311. this.$message.warning('请填写新订单数量!')
  3312. return
  3313. }
  3314. if (this.costImpactData.newOrderNumber <= 0) {
  3315. this.$message.warning('新订单数量不能小于等于0!')
  3316. return
  3317. }
  3318. }
  3319. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3320. if (this.costImpactData.affectedNumber == null || this.costImpactData.affectedNumber === '') {
  3321. this.$message.warning('请填写影响的原材料及其库存量数量!')
  3322. return
  3323. }
  3324. if (this.costImpactData.affectedNumber <= 0) {
  3325. this.$message.warning('影响的原材料及其库存量数量不能小于等于0!')
  3326. return
  3327. }
  3328. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3329. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3330. return
  3331. }
  3332. if (this.costImpactData.affectedScrapAmount === 0) {
  3333. this.$message.warning('请填写影响的原材料及其库存量报废金额!')
  3334. return
  3335. }
  3336. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3337. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3338. return
  3339. }
  3340. }
  3341. this.costImpactData.changeTotalCost = this.totalCost
  3342. costImpactUpdate(this.costImpactData).then(({data}) => {
  3343. if (data && data.code === 0) {
  3344. this.costImpactData = data.rows.costImpactData
  3345. this.getDataList()
  3346. this.$message({
  3347. message: '操作成功',
  3348. type: 'success',
  3349. duration: 1500,
  3350. onClose: () => {}
  3351. })
  3352. } else {
  3353. this.$alert(data.msg, '错误', {
  3354. confirmButtonText: '确定'
  3355. })
  3356. }
  3357. })
  3358. },
  3359. // 刷新页签的table数据
  3360. refreshCurrentTabTable () {
  3361. if (this.activeTable === 'basicInformation') {
  3362. this.getChangeDetailList()
  3363. } else if (this.activeTable === 'fileInformation') {
  3364. this.getChangeFileList()
  3365. } else if (this.activeTable === 'inventoryCostImpact') {
  3366. this.inventoryCostImpactSearch2()
  3367. } else if (this.activeTable === 'actionInformation') {
  3368. this.tpExecutionInfoSearch2()
  3369. } else if (this.activeTable === 'countersignature') {
  3370. this.countersignatureSearch2()
  3371. } else if (this.activeTable === 'approvalInformation') {
  3372. this.getApprovalList()
  3373. }
  3374. },
  3375. // ======== 列表数据刷新方法 ========
  3376. // 获取数据列表
  3377. getDataList () {
  3378. if(localStorage.getItem('ecnData')!=undefined){
  3379. let data=JSON.parse(localStorage.getItem('ecnData'));
  3380. this.searchData.changeNo=data.ecnNo
  3381. localStorage.removeItem('ecnData');
  3382. }
  3383. this.searchData.limit = this.pageSize
  3384. this.searchData.page = this.pageIndex
  3385. changeRecordSearch(this.searchData).then(({data}) => {
  3386. if (data.code === 0) {
  3387. this.dataList = data.page.list
  3388. this.pageIndex = data.page.currPage
  3389. this.pageSize = data.page.pageSize
  3390. this.totalPage = data.page.totalCount
  3391. // 判断是否全部存在数据
  3392. if (this.dataList.length > 0) {
  3393. // 设置选中行
  3394. this.$refs.changeTable.setCurrentRow(this.dataList[0])
  3395. } else {
  3396. this.currentRow = {}
  3397. }
  3398. }
  3399. })
  3400. },
  3401. // 变更单详情的列表
  3402. getChangeDetailList () {
  3403. let tempData = {
  3404. site: this.$store.state.user.site,
  3405. changeNo: this.currentRow.changeNo
  3406. }
  3407. changeDetailSearch(tempData).then(({data}) => {
  3408. if (data && data.code === 0) {
  3409. this.detailList = data.rows
  3410. } else {
  3411. this.detailList = []
  3412. }
  3413. })
  3414. },
  3415. // 变更单文件的列表
  3416. getChangeFileList () {
  3417. let tempData = {
  3418. orderRef1: this.$store.state.user.site,
  3419. orderRef2: this.currentRow.changeNo
  3420. }
  3421. changeFileSearch(tempData).then(({data}) => {
  3422. if (data && data.code === 0) {
  3423. this.fileList = data.rows
  3424. } else {
  3425. this.fileList = []
  3426. }
  3427. })
  3428. },
  3429. // 复选变更单文件
  3430. selectionFile (val) {
  3431. this.fileSelections = val
  3432. },
  3433. // 上传文件
  3434. uploadFileModal () {
  3435. let currentData = {
  3436. titleCon: '工程变更文件上传',
  3437. site: this.currentRow.site,
  3438. createBy: this.$store.state.user.name,
  3439. dataNo: this.currentRow.changeNo,
  3440. fileRemark: '',
  3441. folder: 'change',
  3442. }
  3443. this.uploadDialog = true
  3444. //打开组件 去做新增业务
  3445. // this.$nextTick(() => {
  3446. // this.$refs.changeUploadFile.init(currentData);
  3447. // })
  3448. },
  3449. // 删除变更单文件
  3450. deleteChangeFile () {
  3451. if (this.fileSelections.length === 0) {
  3452. this.$message.warning('请选择要删除的文件!')
  3453. return
  3454. }
  3455. let tempData = {
  3456. fileList: this.fileSelections
  3457. }
  3458. this.$confirm('确定删除文件?', '提示', {
  3459. confirmButtonText: '确定',
  3460. cancelButtonText: '取消',
  3461. type: 'warning'
  3462. }).then(() => {
  3463. deleteChangeFile(tempData).then(({data}) => {
  3464. if (data && data.code === 0) {
  3465. this.getChangeFileList()
  3466. this.$message({
  3467. message: '操作成功',
  3468. type: 'success',
  3469. duration: 1500,
  3470. onClose: () => {}
  3471. })
  3472. } else {
  3473. this.$alert(data.msg, '错误', {
  3474. confirmButtonText: '确定'
  3475. })
  3476. }
  3477. })
  3478. })
  3479. },
  3480. // 下载
  3481. downloadFile (row) {
  3482. downLoadQuotationFile(row)
  3483. .then(({data}) => {
  3484. // 不限制文件下载类型
  3485. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3486. // 下载文件名称
  3487. const fileName = row.fileName
  3488. // a标签下载
  3489. const linkNode = document.createElement('a')
  3490. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3491. linkNode.style.display = 'none'
  3492. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3493. document.body.appendChild(linkNode)
  3494. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3495. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3496. document.body.removeChild(linkNode)
  3497. })
  3498. },
  3499. // 修改变更单模态框
  3500. async updateModal (row) {
  3501. await this.getNodeAuthority(row)
  3502. this.modalData = {
  3503. site: row.site,
  3504. changeNo: row.changeNo,
  3505. applicantId: row.applicantId,
  3506. applicantName: row.applicantName,
  3507. applicationDepartmentId: row.applicationDepartmentId,
  3508. applicationDepartmentName: row.applicationDepartmentName,
  3509. applyDate: row.applyDate,
  3510. ecnType: row.ecnType,
  3511. changeImpact: row.changeImpact,
  3512. changeImpactDesc: row.changeImpactDesc,
  3513. ecnStage: row.ecnStage,
  3514. changeType: row.changeType,
  3515. tpEngineerId: row.tpEngineerId,
  3516. tpEngineerName: row.tpEngineerName,
  3517. changePhaseInDate: row.changePhaseInDate,
  3518. dfIsProduct: row.dfIsProduct,
  3519. printing: row.printing,
  3520. manufacturingCostIsChange: row.manufacturingCostIsChange,
  3521. changeRequestDesc: row.changeRequestDesc,
  3522. isReQuote: row.isReQuote,
  3523. ulCertificationRequirements: row.ulCertificationRequirements,
  3524. ulContinueToMeetDemand: row.ulContinueToMeetDemand,
  3525. gpCertificationRequirements: row.gpCertificationRequirements,
  3526. gpContinueToMeetDemand: row.gpContinueToMeetDemand,
  3527. updateBy: this.$store.state.user.name,
  3528. detailList: [],
  3529. ecnTypeData: [],
  3530. industrialEngineerId: row.industrialEngineerId,
  3531. industrialEngineerName: row.industrialEngineerName,
  3532. changeStatus: row.changeStatus,
  3533. cqcOperatorId: row.cqcOperatorId,
  3534. cqcOperatorName: row.cqcOperatorName,
  3535. faiOperatorId: row.faiOperatorId,
  3536. faiOperatorName: row.faiOperatorName,
  3537. nodeConclusion: '',
  3538. rejectOpinion: '',
  3539. stepId: row.stepId,
  3540. rejectFlag: row.rejectFlag,
  3541. rejectStepId: row.rejectStepId,
  3542. isReject: row.isReject,
  3543. menuId: this.$route.meta.menuId,
  3544. userName: this.$store.state.user.name,
  3545. nodeId: row.nodeId,
  3546. buNo: row.buNo,
  3547. createBy2: row.createBy2,
  3548. tpProcessControl: row.tpProcessControl,
  3549. csProcessControl: row.csProcessControl
  3550. }
  3551. this.changeTitle = '变更申请-' + this.modalData.changeNo
  3552. // 查选择的ECN种类
  3553. this.getChangeChooseEcnType()
  3554. // 查变更单明细
  3555. this.changeRequestDetailSearch()
  3556. // 查变更单库存成本影响
  3557. this.inventoryCostImpactSearch()
  3558. // 查变更单TP&执行信息
  3559. this.tpExecutionInfoSearch()
  3560. // 查变更单会签信息
  3561. this.countersignatureSearch()
  3562. this.activeName = 'basicInformation'
  3563. this.modalFlag = true
  3564. this.modalDisableFlag = true
  3565. },
  3566. // 下达
  3567. issueModal (row) {
  3568. this.$confirm(`是否确认下达?`, '提示', {
  3569. confirmButtonText: '确定',
  3570. cancelButtonText: '取消',
  3571. type: 'warning'
  3572. }).then(() => {
  3573. let tempData = {
  3574. site: row.site,
  3575. userName: this.$store.state.user.name,
  3576. changeNo: row.changeNo,
  3577. menuId: this.$route.meta.menuId
  3578. }
  3579. issueChange(tempData).then(({data}) => {
  3580. if (data && data.code === 0) {
  3581. this.getDataList()
  3582. this.$message({message: '操作成功', type: 'success'})
  3583. } else {
  3584. this.$alert(data.msg, '错误', {
  3585. confirmButtonText: '确定'
  3586. })
  3587. }
  3588. })
  3589. })
  3590. },
  3591. // 打开提交模态框
  3592. submitDataModal () {
  3593. this.rejectOpinion = ''
  3594. this.submitModalFlag = true
  3595. },
  3596. // 同意提交
  3597. agreeSubmit () {
  3598. this.$confirm(`是否确认提交?`, '提示', {
  3599. confirmButtonText: '确定',
  3600. cancelButtonText: '取消',
  3601. type: 'warning'
  3602. }).then(() => {
  3603. this.modalData.nodeConclusion = 'Y'
  3604. this.submitData()
  3605. })
  3606. },
  3607. // 驳回提交
  3608. rejectSubmit () {
  3609. this.$confirm(`是否确认驳回?`, '提示', {
  3610. confirmButtonText: '确定',
  3611. cancelButtonText: '取消',
  3612. type: 'warning'
  3613. }).then(() => {
  3614. this.modalData.rejectOpinion = this.rejectOpinion
  3615. this.modalData.nodeConclusion = 'N'
  3616. this.submitData()
  3617. })
  3618. },
  3619. // 提交
  3620. submitData () {
  3621. if (this.plmChangeRequestArr) {
  3622. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  3623. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  3624. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  3625. return
  3626. }
  3627. }
  3628. }
  3629. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  3630. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  3631. // 判断集合中的该属性是否都有值
  3632. let val = this.chooseDataList.every(item => {
  3633. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  3634. return value !== null && value !== ''
  3635. })
  3636. // 如果没有值 且该字段为必填
  3637. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  3638. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  3639. return
  3640. }
  3641. }
  3642. }
  3643. if (this.plmChangeCostImpactArr) { // 库存成本影响
  3644. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  3645. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  3646. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  3647. return
  3648. }
  3649. }
  3650. }
  3651. if (this.plmChangeFAItemArr) { // 评估信息
  3652. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  3653. let val = this.chooseItemList2.every(item => {
  3654. const value = item[this.plmChangeFAItemArr[i].fieldId]
  3655. return value !== null && value !== ''
  3656. })
  3657. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  3658. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  3659. return
  3660. }
  3661. }
  3662. }
  3663. if (this.plmChangeExecutionInfoArr) {
  3664. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  3665. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  3666. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  3667. return
  3668. }
  3669. }
  3670. }
  3671. if (this.plmChangeItemArr) { // 执行信息
  3672. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  3673. let val = this.chooseItemList.every(item => {
  3674. const value = item[this.plmChangeItemArr[i].fieldId]
  3675. return value !== null && value !== ''
  3676. })
  3677. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  3678. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  3679. return
  3680. }
  3681. }
  3682. }
  3683. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  3684. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  3685. let val = this.currentChooseCSItemList.every(item => {
  3686. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  3687. return value !== null && value !== ''
  3688. })
  3689. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  3690. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  3691. return
  3692. }
  3693. }
  3694. }
  3695. if (this.chooseDataList.length === 0) {
  3696. this.$message.warning('请添加需要变更的技术参数卡!')
  3697. return
  3698. }
  3699. this.costImpactData.changeTotalCost = this.totalCost
  3700. this.executionInfoData.chooseItemList = this.chooseItemList
  3701. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  3702. this.countersignatureData.changeNo = this.modalData.changeNo
  3703. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  3704. this.modalData.userName = this.$store.state.user.name
  3705. this.modalData.menuId = this.$route.meta.menuId
  3706. this.modalData.detailList = this.chooseDataList
  3707. this.modalData.ecnTypeData = this.form
  3708. this.modalData.costImpactData = this.costImpactData
  3709. this.modalData.executionInfoData = this.executionInfoData
  3710. this.modalData.countersignatureData = this.countersignatureData
  3711. this.submitLoading = true
  3712. submitChange(this.modalData).then(({data}) => {
  3713. if (data && data.code === 0) {
  3714. this.getDataList()
  3715. this.$message({message: '操作成功', type: 'success'})
  3716. this.submitModalFlag = false
  3717. this.modalFlag = false
  3718. } else {
  3719. this.$alert(data.msg, '错误', {
  3720. confirmButtonText: '确定'
  3721. })
  3722. }
  3723. this.submitLoading = false
  3724. }).catch(()=>{
  3725. this.submitLoading = false
  3726. })
  3727. },
  3728. // 获取选择的ECN种类
  3729. getChangeChooseEcnType () {
  3730. getChooseEcnType(this.modalData).then(({data}) => {
  3731. if (data && data.code === 0) {
  3732. this.form = data.rows
  3733. } else {
  3734. this.$alert(data.msg, '错误', {
  3735. confirmButtonText: '确定'
  3736. })
  3737. }
  3738. })
  3739. },
  3740. // 打开ECN种类模态框
  3741. chooseEcnTypeModal () {
  3742. this.ecnTypeModalFlag = true
  3743. },
  3744. // 保存ECN种类
  3745. saveEcnTypeData () {
  3746. this.ecnTypeModalFlag = false
  3747. },
  3748. // 查询ECN的模板
  3749. getEcnModel () {
  3750. let tempData = {
  3751. site: this.$store.state.user.site,
  3752. functionType: 'ECN',
  3753. codeNo: 'E001'
  3754. }
  3755. getEcnModel(tempData).then(({data}) => {
  3756. if (data.code === 0) {
  3757. this.modelList = data.rows
  3758. }
  3759. })
  3760. },
  3761. // 查询变更明细表
  3762. changeRequestDetailSearch () {
  3763. requestDetailSearch(this.modalData).then(({data}) => {
  3764. if (data && data.code === 0) {
  3765. this.chooseDataList = data.rows
  3766. } else {
  3767. this.$alert(data.msg, '错误', {
  3768. confirmButtonText: '确定'
  3769. })
  3770. }
  3771. })
  3772. },
  3773. // 查询库存成本影响对象
  3774. inventoryCostImpactSearch () {
  3775. costImpactSearch(this.modalData).then(({data}) => {
  3776. if (data && data.code === 0) {
  3777. this.costImpactData = data.rows
  3778. } else {
  3779. this.$alert(data.msg, '错误', {
  3780. confirmButtonText: '确定'
  3781. })
  3782. }
  3783. })
  3784. },
  3785. // 查询库存成本影响对象
  3786. inventoryCostImpactSearch2 () {
  3787. costImpactSearch(this.currentRow).then(({data}) => {
  3788. if (data && data.code === 0) {
  3789. this.currentCostImpactData = data.rows
  3790. } else {
  3791. this.$alert(data.msg, '错误', {
  3792. confirmButtonText: '确定'
  3793. })
  3794. }
  3795. })
  3796. },
  3797. // 查询审批信息
  3798. getApprovalList () {
  3799. let tempData = {
  3800. site: this.$store.state.user.site,
  3801. menuId: this.$route.meta.menuId,
  3802. documentNo: this.currentRow.changeNo
  3803. }
  3804. getApprovalList(tempData).then(({data}) => {
  3805. if (data && data.code === 0) {
  3806. this.approvalList = data.rows
  3807. } else {
  3808. this.approvalList = []
  3809. }
  3810. })
  3811. },
  3812. // 查询执行信息
  3813. tpExecutionInfoSearch () {
  3814. executionInfoSearch(this.modalData).then(({data}) => {
  3815. if (data && data.code === 0) {
  3816. this.executionInfoData = data.rows.executionInfoData
  3817. this.executionInfoData.createBy = this.$store.state.user.name
  3818. this.chooseItemList = data.rows.chooseItemList
  3819. this.chooseItemList2 = data.rows.chooseItemList2
  3820. } else {
  3821. this.$alert(data.msg, '错误', {
  3822. confirmButtonText: '确定'
  3823. })
  3824. }
  3825. })
  3826. },
  3827. tpExecutionInfoSearch2 () {
  3828. executionInfoSearch(this.currentRow).then(({data}) => {
  3829. if (data && data.code === 0) {
  3830. this.currentExecutionInfoData = data.rows.executionInfoData
  3831. this.currentExecutionInfoData.createBy = this.$store.state.user.name
  3832. this.currentChooseItemList = data.rows.chooseItemList
  3833. this.currentChooseItemList2 = data.rows.chooseItemList2
  3834. } else {
  3835. this.$alert(data.msg, '错误', {
  3836. confirmButtonText: '确定'
  3837. })
  3838. }
  3839. })
  3840. },
  3841. // 查询会签信息
  3842. countersignatureSearch () {
  3843. countersignatureSearch(this.modalData).then(({data}) => {
  3844. if (data && data.code === 0) {
  3845. this.chooseCSItemList = data.rows.chooseCSItemList
  3846. } else {
  3847. this.$alert(data.msg, '错误', {
  3848. confirmButtonText: '确定'
  3849. })
  3850. }
  3851. })
  3852. },
  3853. countersignatureSearch2 () {
  3854. countersignatureSearch(this.currentRow).then(({data}) => {
  3855. if (data && data.code === 0) {
  3856. this.currentChooseCSItemList = data.rows.chooseCSItemList
  3857. } else {
  3858. this.$alert(data.msg, '错误', {
  3859. confirmButtonText: '确定'
  3860. })
  3861. }
  3862. })
  3863. },
  3864. // 删除所选技术参数卡
  3865. deleteChooseDataModal (row) {
  3866. this.$confirm(`是否删除该技术参数卡的变更?`, '提示', {
  3867. confirmButtonText: '确定',
  3868. cancelButtonText: '取消',
  3869. type: 'warning'
  3870. }).then(() => {
  3871. deleteChangeDetail(row).then(({data}) => {
  3872. if (data && data.code === 0) {
  3873. this.changeRequestDetailSearch()
  3874. this.$message({
  3875. message: '操作成功',
  3876. type: 'success',
  3877. duration: 1500,
  3878. onClose: () => {}
  3879. })
  3880. } else {
  3881. this.$alert(data.msg, '错误', {
  3882. confirmButtonText: '确定'
  3883. })
  3884. }
  3885. })
  3886. })
  3887. },
  3888. // 修改变更申请
  3889. saveData () {
  3890. if (this.modalData.applicantId === '' || this.modalData.applicantId == null) {
  3891. this.$message.warning('请选择申请人员!')
  3892. return
  3893. }
  3894. if (this.modalData.applyDate === '' || this.modalData.applyDate == null) {
  3895. this.$message.warning('请选择申请日期!')
  3896. return
  3897. }
  3898. // if (this.modalData.changeImpact === '' || this.modalData.changeImpact == null) {
  3899. // this.$message.warning('请选择ECN变更影响!')
  3900. // return
  3901. // }
  3902. // if ((this.modalData.changeImpactDesc === '' || this.modalData.changeImpactDesc == null) && this.modalData.changeImpact === 'Y') {
  3903. // this.$message.warning('请填写变更影响描述!')
  3904. // return
  3905. // }
  3906. if (this.modalData.ecnStage === '' || this.modalData.ecnStage == null) {
  3907. this.$message.warning('请选择ECN阶段!')
  3908. return
  3909. }
  3910. if (this.modalData.changeType === '' || this.modalData.changeType == null) {
  3911. this.$message.warning('请选择变更类别!')
  3912. return
  3913. }
  3914. if (this.form.length === 0) {
  3915. this.$message.warning('请选择ECN种类!')
  3916. return
  3917. }
  3918. if (this.modalData.tpEngineerId === '' || this.modalData.tpEngineerId == null) {
  3919. this.$message.warning('请选择审批人员!')
  3920. return
  3921. }
  3922. if (this.modalData.changePhaseInDate === '' || this.modalData.changePhaseInDate == null) {
  3923. this.$message.warning('请选择变更生效日期!')
  3924. return
  3925. }
  3926. if (this.modalData.dfIsProduct === '' || this.modalData.dfIsProduct == null) {
  3927. this.$message.warning('请选择是否DF产品!')
  3928. return
  3929. }
  3930. if ((this.modalData.industrialEngineerId === '' || this.modalData.industrialEngineerId == null) && this.modalData.dfIsProduct === 'Y') {
  3931. this.$message.warning('请选择I/E!')
  3932. return
  3933. }
  3934. if (this.modalData.changeRequestDesc === '' || this.modalData.changeRequestDesc == null) {
  3935. this.$message.warning('请填写变更要求描述!')
  3936. return
  3937. }
  3938. if (this.modalData.printing === '' || this.modalData.printing == null) {
  3939. this.$message.warning('请选择印刷方式!')
  3940. return
  3941. }
  3942. // if ((this.modalData.cqcOperatorId === '' || this.modalData.cqcOperatorId == null) && (this.modalData.faiOperatorId === '' || this.modalData.faiOperatorId == null)) {
  3943. // this.$message.warning('请选择CQC或者FAI人员!')
  3944. // return
  3945. // }
  3946. if (this.costImpactData.productionProductFlag === 'Y') { // 在生产品
  3947. if (this.costImpactData.productionProductOpinions == null || this.costImpactData.productionProductOpinions === '') {
  3948. this.$message.warning('请填写在生产品处理意见!')
  3949. return
  3950. }
  3951. if (this.costImpactData.productionProductExecutor == null || this.costImpactData.productionProductExecutor === '') {
  3952. this.$message.warning('请填写在生产品执行人!')
  3953. return
  3954. }
  3955. }
  3956. if (this.costImpactData.inventoryProductFlag === 'Y') { // 成品库存
  3957. if (this.costImpactData.inventoryProductOpinions == null || this.costImpactData.inventoryProductOpinions === '') {
  3958. this.$message.warning('请填写成品库存处理意见!')
  3959. return
  3960. }
  3961. if (this.costImpactData.inventoryProductExecutor == null || this.costImpactData.inventoryProductExecutor === '') {
  3962. this.$message.warning('请填写成品库存执行人!')
  3963. return
  3964. }
  3965. }
  3966. if (this.costImpactData.affectedFlag === 'Y') { // 影响的原材料及其库存量
  3967. if (this.costImpactData.affectedOpinions == null || this.costImpactData.affectedOpinions === '') {
  3968. this.$message.warning('请填写影响的原材料及其库存量处理意见!')
  3969. return
  3970. }
  3971. if (this.costImpactData.affectedExecutor == null || this.costImpactData.affectedExecutor === '') {
  3972. this.$message.warning('请填写影响的原材料及其库存量执行人!')
  3973. return
  3974. }
  3975. }
  3976. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  3977. this.$message.warning('请填写原碑刀编号!')
  3978. return;
  3979. }
  3980. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  3981. this.$message.warning('请填写新碑刀编号!')
  3982. return;
  3983. }
  3984. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  3985. this.$message.warning('请填写原网板/印版编号!')
  3986. return;
  3987. }
  3988. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  3989. this.$message.warning('请填写新网板/印版编号!')
  3990. return;
  3991. }
  3992. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  3993. this.$message.warning('请选择ECN执行日期!')
  3994. return;
  3995. }
  3996. if (this.chooseDataList.length === 0) {
  3997. this.$message.warning('请添加需要变更的技术参数卡!')
  3998. return
  3999. }
  4000. this.costImpactData.changeTotalCost = this.totalCost
  4001. this.executionInfoData.chooseItemList = this.chooseItemList
  4002. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4003. this.countersignatureData.changeNo = this.modalData.changeNo
  4004. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4005. this.modalData.detailList = this.chooseDataList
  4006. this.modalData.ecnTypeData = this.form
  4007. this.modalData.costImpactData = this.costImpactData
  4008. this.modalData.executionInfoData = this.executionInfoData
  4009. this.modalData.countersignatureData = this.countersignatureData
  4010. this.saveLoading = true
  4011. changeRequestUpdate(this.modalData).then(({data}) => {
  4012. if (data && data.code === 0) {
  4013. this.modalData = data.rows.modalData
  4014. this.modalData.menuId = this.$route.meta.menuId
  4015. this.changeTitle = '变更申请-' + this.modalData.changeNo
  4016. this.form = data.rows.form
  4017. this.chooseDataList = data.rows.chooseDataList
  4018. this.costImpactData = data.rows.costImpactData
  4019. this.executionInfoData = data.rows.executionInfoData
  4020. this.executionInfoData.createBy = this.$store.state.user.name
  4021. this.chooseItemList = data.rows.chooseItemList
  4022. this.chooseItemList2 = data.rows.chooseItemList2
  4023. this.chooseCSItemList = data.rows.chooseCSItemList
  4024. this.getDataList()
  4025. this.$message({
  4026. message: '操作成功',
  4027. type: 'success',
  4028. duration: 1500,
  4029. onClose: () => {}
  4030. })
  4031. } else {
  4032. this.$alert(data.msg, '错误', {
  4033. confirmButtonText: '确定'
  4034. })
  4035. }
  4036. this.saveLoading = false
  4037. }).catch(()=>{
  4038. this.saveLoading = false
  4039. })
  4040. },
  4041. // 选择模板属性
  4042. chooseModel () {
  4043. this.chooseModelData = {
  4044. site: this.$store.state.user.site,
  4045. itemNo: '',
  4046. itemDesc: '',
  4047. functionType: 'ECN',
  4048. codeNo: this.modelList.length > 0 ? this.modelList[0].codeNo : ''
  4049. }
  4050. // 先清空缓存选中
  4051. //this.$nextTick(() => this.$refs.itemTable.clearSelection())
  4052. // 查询所有属性
  4053. getItemList(this.chooseModelData).then(({data}) => {
  4054. if (data && data.code === 0) {
  4055. this.itemList = data.rows
  4056. this.itemList.forEach(val => {
  4057. // 回显选中的部门
  4058. if (this.chooseItemList.map(val => val.itemNo).includes(val.itemNo)) {
  4059. this.$nextTick(() => this.$refs.itemTable.toggleRowSelection(val, true))
  4060. }
  4061. })
  4062. } else {
  4063. this.$alert(data.msg, '错误', {
  4064. confirmButtonText: '确定'
  4065. })
  4066. }
  4067. })
  4068. this.chooseModelFlag = true
  4069. },
  4070. // 查询属性
  4071. searchItemList () {
  4072. getItemList(this.chooseModelData).then(({data}) => {
  4073. if (data.code === 0) {
  4074. this.itemList = data.rows
  4075. }
  4076. })
  4077. },
  4078. // 单机选择
  4079. itemClickRow (row) {
  4080. this.$refs.itemTable.toggleRowSelection(row)
  4081. },
  4082. // 复选属性
  4083. selectionItem (val) {
  4084. this.itemSelections = val
  4085. },
  4086. // 确认多选属性
  4087. confirmItem () {
  4088. if (this.itemSelections.length === 0) {
  4089. this.$message.warning("请勾选属性!")
  4090. return
  4091. }
  4092. // 临时集合
  4093. let temp = []
  4094. // 首先,遍历a,检查每个对象的名字是否在b中也存在
  4095. this.chooseItemList.forEach(itemA => {
  4096. if (this.itemSelections.some(itemB => itemB.itemNo === itemA.itemNo)) {
  4097. // 如果存在,则将a中的对象添加到结果中(这里直接用a的原对象,因为要求是保留a中对象)
  4098. temp.push(itemA)
  4099. }
  4100. })
  4101. // 然后,遍历b,检查是否有对象的名字不在结果中已存在的名字中
  4102. this.itemSelections.forEach(itemB => {
  4103. if (!temp.some(itemR => itemR.itemNo === itemB.itemNo)) {
  4104. // 如果b中的对象名字不在结果中,则添加到结果中
  4105. temp.push(itemB)
  4106. }
  4107. })
  4108. this.chooseItemList = temp
  4109. this.chooseModelFlag = false
  4110. },
  4111. // 执行所选属性
  4112. executeModal (row) {
  4113. this.$confirm(`是否确认提交?`, '提示', {
  4114. confirmButtonText: '确定',
  4115. cancelButtonText: '取消',
  4116. type: 'warning'
  4117. }).then(() => {
  4118. if (this.plmChangeRequestArr) { // 主信息
  4119. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4120. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4121. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4122. return
  4123. }
  4124. }
  4125. }
  4126. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4127. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4128. // 判断集合中的该属性是否都有值
  4129. let val = this.chooseDataList.every(item => {
  4130. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4131. return value !== null && value !== ''
  4132. })
  4133. // 如果没有值 且该字段为必填
  4134. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4135. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4136. return
  4137. }
  4138. }
  4139. }
  4140. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4141. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4142. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4143. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4144. return
  4145. }
  4146. }
  4147. }
  4148. if (this.plmChangeFAItemArr) { // 评估信息
  4149. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4150. let val = this.chooseItemList2.every(item => {
  4151. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4152. return value !== null && value !== ''
  4153. })
  4154. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4155. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4156. return
  4157. }
  4158. }
  4159. }
  4160. if (this.plmChangeExecutionInfoArr) {
  4161. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4162. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4163. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4164. return
  4165. }
  4166. }
  4167. }
  4168. if (this.plmChangeItemArr) { // 执行信息
  4169. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4170. let val = this.chooseItemList.every(item => {
  4171. const value = item[this.plmChangeItemArr[i].fieldId]
  4172. return value !== null && value !== ''
  4173. })
  4174. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4175. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4176. return
  4177. }
  4178. }
  4179. }
  4180. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4181. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4182. let val = this.currentChooseCSItemList.every(item => {
  4183. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4184. return value !== null && value !== ''
  4185. })
  4186. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4187. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4188. return
  4189. }
  4190. }
  4191. }
  4192. if (this.chooseDataList.length === 0) {
  4193. this.$message.warning('请添加需要变更的技术参数卡!')
  4194. return
  4195. }
  4196. row.executeFlag = 'Y'
  4197. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4198. this.costImpactData.changeTotalCost = this.totalCost
  4199. this.executionInfoData.chooseItemList = this.chooseItemList
  4200. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4201. this.countersignatureData.changeNo = this.modalData.changeNo
  4202. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4203. this.modalData.userName = this.$store.state.user.name
  4204. this.modalData.menuId = this.$route.meta.menuId
  4205. this.modalData.detailList = this.chooseDataList
  4206. this.modalData.ecnTypeData = this.form
  4207. this.modalData.costImpactData = this.costImpactData
  4208. this.modalData.executionInfoData = this.executionInfoData
  4209. this.modalData.countersignatureData = this.countersignatureData
  4210. this.modalData.nodeConclusion = 'Y'
  4211. this.submitLoading = true
  4212. tpExecute(this.modalData).then(({data}) => {
  4213. if (data && data.code === 0) {
  4214. this.getDataList()
  4215. this.$message({message: '操作成功', type: 'success'})
  4216. this.submitModalFlag = false
  4217. this.modalFlag = false
  4218. } else {
  4219. this.$alert(data.msg, '错误', {
  4220. confirmButtonText: '确定'
  4221. })
  4222. row.executeFlag = ''
  4223. row.itemExecutionDate = ''
  4224. }
  4225. this.submitLoading = false
  4226. }).catch(()=>{
  4227. this.submitLoading = false
  4228. })
  4229. })
  4230. // row.executeFlag = 'Y'
  4231. // row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4232. // row.executor = this.$store.state.user.name
  4233. // // 执行时调用同意提交方法 // 2025-04-15 海波要求修改 一定会是审批中状态
  4234. // if (this.modalData.changeStatus === '审批中') {
  4235. // this.agreeSubmit()
  4236. // }
  4237. },
  4238. // 执行所选属性
  4239. executeCSModal (row) {
  4240. this.$confirm(`是否确认会签?`, '提示', {
  4241. confirmButtonText: '确定',
  4242. cancelButtonText: '取消',
  4243. type: 'warning'
  4244. }).then(() => {
  4245. if (this.plmChangeRequestArr) { // 主信息
  4246. for (let i = 0; i < this.plmChangeRequestArr.length; i++) {
  4247. if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') {
  4248. this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!')
  4249. return
  4250. }
  4251. }
  4252. }
  4253. if (this.plmChangeRequestDetailArr) { // 所选技术参数卡
  4254. for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) {
  4255. // 判断集合中的该属性是否都有值
  4256. let val = this.chooseDataList.every(item => {
  4257. const value = item[this.plmChangeRequestDetailArr[i].fieldId]
  4258. return value !== null && value !== ''
  4259. })
  4260. // 如果没有值 且该字段为必填
  4261. if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') {
  4262. this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!')
  4263. return
  4264. }
  4265. }
  4266. }
  4267. if (this.plmChangeCostImpactArr) { // 库存成本影响
  4268. for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) {
  4269. if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') {
  4270. this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!')
  4271. return
  4272. }
  4273. }
  4274. }
  4275. if (this.plmChangeFAItemArr) { // 评估信息
  4276. for (let i = 0; i < this.plmChangeFAItemArr.length; i++) {
  4277. let val = this.chooseItemList2.every(item => {
  4278. const value = item[this.plmChangeFAItemArr[i].fieldId]
  4279. return value !== null && value !== ''
  4280. })
  4281. if (!val && this.plmChangeFAItemArr[i].required === 'Y') {
  4282. this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!')
  4283. return
  4284. }
  4285. }
  4286. }
  4287. if (this.plmChangeExecutionInfoArr) {
  4288. for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) {
  4289. if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') {
  4290. this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!')
  4291. return
  4292. }
  4293. }
  4294. }
  4295. if (this.plmChangeItemArr) { // 执行信息
  4296. for (let i = 0; i < this.plmChangeItemArr.length; i++) {
  4297. let val = this.chooseItemList.every(item => {
  4298. const value = item[this.plmChangeItemArr[i].fieldId]
  4299. return value !== null && value !== ''
  4300. })
  4301. if (!val && this.plmChangeItemArr[i].required === 'Y') {
  4302. this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!')
  4303. return
  4304. }
  4305. }
  4306. }
  4307. if (this.plmChangeCountersignatureItemArr) { // 会签信息
  4308. for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) {
  4309. let val = this.currentChooseCSItemList.every(item => {
  4310. const value = item[this.plmChangeCountersignatureItemArr[i].fieldId]
  4311. return value !== null && value !== ''
  4312. })
  4313. if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') {
  4314. this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!')
  4315. return
  4316. }
  4317. }
  4318. }
  4319. if (this.chooseDataList.length === 0) {
  4320. this.$message.warning('请添加需要变更的技术参数卡!')
  4321. return
  4322. }
  4323. row.executeFlag = 'Y'
  4324. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4325. this.costImpactData.changeTotalCost = this.totalCost
  4326. this.executionInfoData.chooseItemList = this.chooseItemList
  4327. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4328. this.countersignatureData.changeNo = this.modalData.changeNo
  4329. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4330. this.modalData.userName = this.$store.state.user.name
  4331. this.modalData.menuId = this.$route.meta.menuId
  4332. this.modalData.detailList = this.chooseDataList
  4333. this.modalData.ecnTypeData = this.form
  4334. this.modalData.costImpactData = this.costImpactData
  4335. this.modalData.executionInfoData = this.executionInfoData
  4336. this.modalData.countersignatureData = this.countersignatureData
  4337. this.modalData.nodeConclusion = 'Y'
  4338. this.submitLoading = true
  4339. csExecute(this.modalData).then(({data}) => {
  4340. if (data && data.code === 0) {
  4341. this.getDataList()
  4342. this.$message({message: '操作成功', type: 'success'})
  4343. this.submitModalFlag = false
  4344. this.modalFlag = false
  4345. } else {
  4346. this.$alert(data.msg, '错误', {
  4347. confirmButtonText: '确定'
  4348. })
  4349. row.executeFlag = ''
  4350. row.itemExecutionDate = ''
  4351. }
  4352. this.submitLoading = false
  4353. }).catch(()=>{
  4354. this.submitLoading = false
  4355. })
  4356. })
  4357. },
  4358. // 执行所选属性
  4359. executeModal2 (row) {
  4360. row.executeFlag = 'Y'
  4361. row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
  4362. row.executor = this.$store.state.user.name
  4363. },
  4364. // 编辑执行信息
  4365. executionInformationSave () {
  4366. this.executionInfoData.chooseItemList = this.chooseItemList
  4367. this.executionInfoData.chooseItemList2 = this.chooseItemList2
  4368. if (this.executionInfoData.originalDieCuttingRuleNo == null || this.executionInfoData.originalDieCuttingRuleNo === '') {
  4369. this.$message.warning('请填写原碑刀编号!')
  4370. return;
  4371. }
  4372. if (this.executionInfoData.newDieCuttingRuleNo == null || this.executionInfoData.newDieCuttingRuleNo === '') {
  4373. this.$message.warning('请填写新碑刀编号!')
  4374. return;
  4375. }
  4376. if (this.executionInfoData.originalStencilNo == null || this.executionInfoData.originalStencilNo === '') {
  4377. this.$message.warning('请填写原网板/印版编号!')
  4378. return;
  4379. }
  4380. if (this.executionInfoData.newStencilNo == null || this.executionInfoData.newStencilNo === '') {
  4381. this.$message.warning('请填写新网板/印版编号!')
  4382. return;
  4383. }
  4384. if (this.executionInfoData.executionDate == null || this.executionInfoData.executionDate === '') {
  4385. this.$message.warning('请选择ECN执行日期!')
  4386. return;
  4387. }
  4388. executionUpdate(this.executionInfoData).then(({data}) => {
  4389. if (data && data.code === 0) {
  4390. this.executionInfoData = data.rows.executionInfoData
  4391. this.executionInfoData.createBy = this.$store.state.user.name
  4392. this.chooseItemList = data.rows.chooseItemList
  4393. this.chooseItemList2 = data.rows.chooseItemList2
  4394. this.getDataList()
  4395. this.$message({
  4396. message: '操作成功',
  4397. type: 'success',
  4398. duration: 1500,
  4399. onClose: () => {}
  4400. })
  4401. } else {
  4402. this.$alert(data.msg, '错误', {
  4403. confirmButtonText: '确定'
  4404. })
  4405. }
  4406. })
  4407. },
  4408. // 编辑会签信息
  4409. countersignatureSave () {
  4410. this.countersignatureData.changeNo = this.modalData.changeNo
  4411. this.countersignatureData.chooseCSItemList = this.chooseCSItemList
  4412. countersignatureUpdate(this.countersignatureData).then(({data}) => {
  4413. if (data && data.code === 0) {
  4414. this.chooseCSItemList = data.rows.chooseCSItemList
  4415. this.getDataList()
  4416. this.$message({
  4417. message: '操作成功',
  4418. type: 'success',
  4419. duration: 1500,
  4420. onClose: () => {}
  4421. })
  4422. } else {
  4423. this.$alert(data.msg, '错误', {
  4424. confirmButtonText: '确定'
  4425. })
  4426. }
  4427. })
  4428. },
  4429. // 新增技术参数卡
  4430. addChangeDetail () {
  4431. this.searchData2.buNo = this.modalData.buNo
  4432. technicalSpecificationSearch2(this.searchData2).then(({data}) => {
  4433. if (data.code === 0) {
  4434. this.dataList2 = data.rows
  4435. const shouldExclude = (item) => {
  4436. return this.chooseDataList.some(cdItem =>
  4437. cdItem.site === item.site && cdItem.codeNo === item.codeNo
  4438. )
  4439. }
  4440. this.dataList2 = this.dataList2.filter(item => !shouldExclude(item))
  4441. this.addDetailModal = true
  4442. } else {
  4443. this.dataList2 = []
  4444. }
  4445. })
  4446. },
  4447. // 复选物料信息
  4448. selectionData2 (val) {
  4449. this.dataSelections2 = val
  4450. },
  4451. // 确认选择技术参数卡
  4452. addDetail () {
  4453. if (this.dataSelections2.length === 0) {
  4454. this.$message.warning("请勾选技术参数卡!")
  4455. return
  4456. }
  4457. this.dataSelections2.forEach(item => {
  4458. // 确保没有重复的元素
  4459. if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.codeNo === item.codeNo)) {
  4460. this.chooseDataList.push(item)
  4461. }
  4462. })
  4463. this.addDetailModal = false
  4464. this.dataSelections2 = []
  4465. },
  4466. // 回车换行
  4467. focusNextInput (index, type) {
  4468. let aaa = ''
  4469. if (this.chooseDataList.length - 1 === index) {
  4470. aaa = `${type}0`
  4471. } else {
  4472. aaa = `${type}${index + 1}`
  4473. }
  4474. this.$nextTick(() => {
  4475. this.$refs[aaa].focus()
  4476. })
  4477. },
  4478. // 根据人员编码查人员部门
  4479. getDepartmentByUserName () {
  4480. let tempData = {
  4481. site: this.$store.state.user.site,
  4482. username: this.modalData.applicantId
  4483. }
  4484. getDepartmentByUserName(tempData).then(({data}) => {
  4485. if (data.code === 0) {
  4486. this.modalData.applicationDepartmentId = data.rows[0].departmentNo
  4487. this.modalData.applicationDepartmentName = data.rows[0].departmentName
  4488. }
  4489. })
  4490. },
  4491. // 预览
  4492. previewFile (row) {
  4493. // 预览文件
  4494. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  4495. let type = ''
  4496. if (image.includes(row.fileType.toLowerCase())) {
  4497. type = 'image/' + row.fileType
  4498. }
  4499. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  4500. if (video.includes(row.fileType.toLowerCase())) {
  4501. type = 'video/' + row.fileType
  4502. }
  4503. let txt = ['txt']
  4504. if (txt.includes(row.fileType.toLowerCase())) {
  4505. type = 'text/plain'
  4506. }
  4507. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  4508. if (office.includes(row.fileType.toLowerCase())) {
  4509. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  4510. return
  4511. }
  4512. let pdf = ['pdf']
  4513. if (pdf.includes(row.fileType.toLowerCase())) {
  4514. type = 'application/pdf'
  4515. }
  4516. if (type === ''){
  4517. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  4518. return;
  4519. }
  4520. downLoadQuotationFile(row).then(({data}) => {
  4521. const blob = new Blob([data], { type: type });
  4522. // 创建URL来生成预览
  4523. const fileURL = URL.createObjectURL(blob);
  4524. // 在新标签页中打开文件预览
  4525. const newTab = window.open(fileURL, '_blank')
  4526. })
  4527. },
  4528. // ======== chooseList相关方法 ========
  4529. // 获取基础数据列表S
  4530. getBaseList (val, type) {
  4531. this.tagNo = val
  4532. this.tagNo1 = type
  4533. this.$nextTick(() => {
  4534. let strVal = ''
  4535. let conSql = ''
  4536. if (val === 103) {
  4537. if (type === 1) {
  4538. strVal = this.modalData.applicantId
  4539. } else if (type === 3) {
  4540. strVal = this.costImpactData.productionProductExecutor
  4541. } else if (type === 4) {
  4542. strVal = this.costImpactData.inventoryProductExecutor
  4543. } else if (type === 5) {
  4544. strVal = this.costImpactData.affectedExecutor
  4545. }
  4546. // else if (type === 7) {
  4547. // strVal = this.tempExecutorRow.executor
  4548. // }
  4549. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4550. }
  4551. if (val === 133) {
  4552. strVal = this.tempPartRow.newPartNo
  4553. }
  4554. if (val === 2005) {
  4555. strVal = this.modalData.tpEngineerId
  4556. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4557. }
  4558. if (val === 2006) {
  4559. strVal = this.modalData.industrialEngineerId
  4560. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4561. }
  4562. if (val === 2007) {
  4563. strVal = this.modalData.cqcOperatorId
  4564. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4565. }
  4566. if (val === 2008) {
  4567. strVal = this.modalData.faiOperatorId
  4568. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4569. }
  4570. if (val === 2010) {
  4571. strVal = this.tempExecutorRow.executor
  4572. conSql = " and b.site = '" + this.$store.state.user.site + "'"
  4573. }
  4574. this.$refs.baseList.init(val, strVal, conSql)
  4575. })
  4576. },
  4577. // 列表方法的回调
  4578. getBaseData (val) {
  4579. if (this.tagNo === 103) {
  4580. if (this.tagNo1 === 1) {
  4581. this.modalData.applicantId = val.username
  4582. this.modalData.applicantName = val.user_display
  4583. this.getDepartmentByUserName()
  4584. } else if (this.tagNo1 === 3) {
  4585. this.costImpactData.productionProductExecutor = val.username
  4586. this.costImpactData.productionProductExecutorName = val.user_display
  4587. //this.$set(this.costImpactData,'productionProductExecutorName',val.user_display)
  4588. } else if (this.tagNo1 === 4) {
  4589. this.costImpactData.inventoryProductExecutor = val.username
  4590. this.costImpactData.inventoryProductExecutorName = val.user_display
  4591. //this.$set(this.costImpactData,'inventoryProductExecutorName',val.user_display)
  4592. } else if (this.tagNo1 === 5) {
  4593. this.costImpactData.affectedExecutor = val.username
  4594. this.costImpactData.affectedExecutorName = val.user_display
  4595. //this.$set(this.costImpactData,'affectedExecutorName',val.user_display)
  4596. }
  4597. // else if (this.tagNo1 === 7) {
  4598. // this.$set(this.tempExecutorRow,'executor',val.username)
  4599. // }
  4600. }
  4601. if (this.tagNo === 133) {
  4602. //this.tempPartRow.newPartNo = val.part_no
  4603. this.$set(this.tempPartRow,'newPartNo',val.part_no)
  4604. }
  4605. if (this.tagNo === 2005) {
  4606. this.modalData.tpEngineerId = val.username
  4607. this.modalData.tpEngineerName = val.user_display
  4608. }
  4609. if (this.tagNo === 2006) {
  4610. this.modalData.industrialEngineerId = val.username
  4611. this.modalData.industrialEngineerName = val.user_display
  4612. }
  4613. if (this.tagNo === 2007) {
  4614. this.modalData.cqcOperatorId = val.username
  4615. this.modalData.cqcOperatorName = val.user_display
  4616. }
  4617. if (this.tagNo === 2008) {
  4618. this.modalData.faiOperatorId = val.username
  4619. this.modalData.faiOperatorName = val.user_display
  4620. }
  4621. if (this.tagNo === 2010) {
  4622. this.$set(this.tempExecutorRow,'executor',val.username)
  4623. }
  4624. },
  4625. // 申请人输入校验
  4626. applicantBlur (tagNo) {
  4627. if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
  4628. let tempData = {
  4629. tagno: tagNo,
  4630. conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
  4631. }
  4632. verifyData(tempData).then(({data}) => {
  4633. if (data && data.code === 0) {
  4634. if (data.baseListData.length > 0) {
  4635. this.modalData.applicantId = data.baseListData[0].username
  4636. this.modalData.applicantName = data.baseListData[0].user_display
  4637. this.getDepartmentByUserName()
  4638. return
  4639. }
  4640. }
  4641. })
  4642. }
  4643. this.modalData.applicantName = ''
  4644. this.modalData.applicationDepartmentId = ''
  4645. this.modalData.applicationDepartmentName = ''
  4646. },
  4647. // 审批人员输入校验
  4648. tpEngineerBlur (tagNo) {
  4649. if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
  4650. let tempData = {
  4651. tagno: tagNo,
  4652. conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  4653. }
  4654. verifyData(tempData).then(({data}) => {
  4655. if (data && data.code === 0) {
  4656. if (data.baseListData.length > 0) {
  4657. this.modalData.tpEngineerId = data.baseListData[0].username
  4658. this.modalData.tpEngineerName = data.baseListData[0].user_display
  4659. return
  4660. }
  4661. }
  4662. })
  4663. }
  4664. this.modalData.tpEngineerName = ''
  4665. },
  4666. // I/E输入校验
  4667. industrialEngineerBlur (tagNo) {
  4668. if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
  4669. let tempData = {
  4670. tagno: tagNo,
  4671. conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
  4672. }
  4673. verifyData(tempData).then(({data}) => {
  4674. if (data && data.code === 0) {
  4675. if (data.baseListData.length > 0) {
  4676. this.modalData.industrialEngineerId = data.baseListData[0].username
  4677. this.modalData.industrialEngineerName = data.baseListData[0].user_display
  4678. return
  4679. }
  4680. }
  4681. })
  4682. }
  4683. this.modalData.industrialEngineerName = ''
  4684. },
  4685. // CQC输入校验
  4686. cqcOperatorBlur (tagNo) {
  4687. if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
  4688. let tempData = {
  4689. tagno: tagNo,
  4690. conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  4691. }
  4692. verifyData(tempData).then(({data}) => {
  4693. if (data && data.code === 0) {
  4694. if (data.baseListData.length > 0) {
  4695. this.modalData.cqcOperatorId = data.baseListData[0].username
  4696. this.modalData.cqcOperatorName = data.baseListData[0].user_display
  4697. return
  4698. }
  4699. }
  4700. })
  4701. }
  4702. this.modalData.cqcOperatorName = ''
  4703. },
  4704. // FAI输入校验
  4705. faiOperatorBlur (tagNo) {
  4706. if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
  4707. let tempData = {
  4708. tagno: tagNo,
  4709. conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
  4710. }
  4711. verifyData(tempData).then(({data}) => {
  4712. if (data && data.code === 0) {
  4713. if (data.baseListData.length > 0) {
  4714. this.modalData.faiOperatorId = data.baseListData[0].username
  4715. this.modalData.faiOperatorName = data.baseListData[0].user_display
  4716. return
  4717. }
  4718. }
  4719. })
  4720. }
  4721. this.modalData.faiOperatorName = ''
  4722. },
  4723. toMenu (row) {
  4724. if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404') {
  4725. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4726. } else {
  4727. this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{nowCodeNo: row.oriCodeNo},})
  4728. }
  4729. },
  4730. // ======== 导出相关方法 ========
  4731. /**
  4732. * 导出excel
  4733. */
  4734. async createExportData () {
  4735. this.searchData.limit = -1
  4736. this.searchData.page = 1
  4737. await changeRecordSearch(this.searchData).then(({data}) => {
  4738. this.resultList = data.page.list
  4739. })
  4740. return this.resultList
  4741. },
  4742. startDownload () {},
  4743. finishDownload () {},
  4744. fields () {
  4745. let json = '{'
  4746. this.columnList.forEach((item, index) => {
  4747. if (index === this.columnList.length - 1) {
  4748. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  4749. } else {
  4750. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  4751. }
  4752. })
  4753. json += '}'
  4754. let s = eval('(' + json + ')')
  4755. return s
  4756. },
  4757. rowStyle ({row}) {
  4758. if (this.currentRow.changeNo === row.changeNo) {
  4759. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  4760. }
  4761. },
  4762. // 获取按钮的权限数据
  4763. getButtonAuthData () {
  4764. this.authSearch = this.isAuth(this.menuId+":search")
  4765. this.authUpdate = this.isAuth(this.menuId+":update")
  4766. this.authIssue = this.isAuth(this.menuId+":issue")
  4767. this.authSubmit = this.isAuth(this.menuId+":submit")
  4768. this.authReject = this.isAuth(this.menuId+":reject")
  4769. this.authFileSave = this.isAuth(this.menuId+":fileSave")
  4770. this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad")
  4771. this.authFileRemove = this.isAuth(this.menuId+":fileRemove")
  4772. this.authFilePreview = this.isAuth(this.menuId+":filePreview")
  4773. },
  4774. }
  4775. }
  4776. </script>
  4777. <style scoped lang="scss">
  4778. /deep/ .customer-tab .el-tabs__content {
  4779. padding: 0px !important;
  4780. }
  4781. .numInput /deep/ .el-input__inner{
  4782. text-align: right;
  4783. }
  4784. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  4785. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  4786. -webkit-appearance: none;
  4787. }
  4788. /deep/ .inlineNumber input[type="number"]{
  4789. -moz-appearance: textfield;
  4790. padding-right: 5px !important;
  4791. }
  4792. </style>