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.

5267 lines
183 KiB

2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
8 months ago
1 year ago
1 year ago
8 months ago
1 year ago
8 months ago
1 year ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
1 year ago
8 months ago
1 year ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
2 years ago
2 years ago
2 years ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
2 years ago
8 months ago
2 years ago
2 years ago
2 years ago
8 months ago
2 years ago
8 months ago
2 years ago
8 months ago
8 months 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="'PLM物料编码'">
  6. <el-input v-model="searchData.plmPartNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'IFS物料编码'">
  9. <el-input v-model="searchData.ifsPartNo" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'物料名称'">
  12. <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <el-form-item :label="'工艺类型'">
  15. <el-select v-model="searchData.routingType" clearable style="width: 120px">
  16. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  17. <el-option label="Repair" value="Repair"></el-option>
  18. <el-option label="Prototype" value="Prototype"></el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item :label="'Routing版本号'">
  22. <el-input v-model="searchData.routingRevision" clearable style="width: 120px"></el-input>
  23. </el-form-item>
  24. <el-form-item :label="' '">
  25. <el-button :loading="queryLoading" @click="getDataList()">查询</el-button>
  26. <el-button v-if="isAuth('104003001:save')" type="primary" @click="addModal()">新增</el-button>
  27. <el-button v-if="isAuth('104003001:delete')" type="primary" @click="delModal()">删除</el-button>
  28. <download-excel
  29. :fields="fields()"
  30. :data="exportData"
  31. type="xls"
  32. :name="exportName"
  33. :header="exportHeader"
  34. :footer="exportFooter"
  35. :fetch="createExportData"
  36. :before-generate="startDownload"
  37. :before-finish="finishDownload"
  38. worksheet="导出信息"
  39. class="el-button el-button--primary el-button--medium">
  40. {{ "导出" }}
  41. </download-excel>
  42. </el-form-item>
  43. </el-form>
  44. <!-- routing列表 -->
  45. <el-table
  46. :height="height"
  47. :data="dataList"
  48. border
  49. @selection-change="selectionRouting"
  50. style="width: 100%;">
  51. <el-table-column
  52. type="selection"
  53. header-align="center"
  54. align="center"
  55. width="50">
  56. </el-table-column>
  57. <el-table-column
  58. v-for="(item,index) in columnList" :key="index"
  59. :sortable="item.columnSortable"
  60. :prop="item.columnProp"
  61. :header-align="item.headerAlign"
  62. :show-overflow-tooltip="item.showOverflowTooltip"
  63. :align="item.align"
  64. :fixed="item.fixed === ''?false:item.fixed"
  65. :min-width="item.columnWidth"
  66. :label="item.columnLabel">
  67. <template slot-scope="scope">
  68. <div v-if="item.columnProp === 'ifsPartNo'">
  69. <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="toPartMenu(scope.row.ifsPartNo)">
  70. {{ scope.row[item.columnProp] }}
  71. </el-link>
  72. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  73. </div>
  74. <div v-else>
  75. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  76. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  77. </div>
  78. </template>
  79. </el-table-column>
  80. <el-table-column
  81. fixed="right"
  82. header-align="center"
  83. align="center"
  84. width="135"
  85. label="操作">
  86. <template slot-scope="scope">
  87. <el-link v-if="isAuth('104003001:details')" style="cursor: pointer" @click="detailsModal(scope.row)">详情</el-link>
  88. <el-link v-if="isAuth('104003001:update')" style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
  89. <el-link style="cursor: pointer" @click="checkOutToBom(scope.row.plmPartNo)">切换BOM</el-link>
  90. </template>
  91. </el-table-column>
  92. </el-table>
  93. <!-- 复选统计 -->
  94. <selectDiv ref="selectDiv"></selectDiv>
  95. <!-- 分页插件 -->
  96. <el-pagination style="margin-top: 0px"
  97. @size-change="sizeChangeHandle"
  98. @current-change="currentChangeHandle"
  99. :current-page="pageIndex"
  100. :page-sizes="[20, 50, 100, 200, 500]"
  101. :page-size="pageSize"
  102. :total="totalPage"
  103. layout="total, sizes, prev, pager, next, jumper">
  104. </el-pagination>
  105. <!-- routing新增/编辑模态框 -->
  106. <el-dialog :close-on-click-modal="false" top="8vh" v-drag :before-close="closeModalX" :visible.sync="modalFlag" width="1110px">
  107. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px">
  108. <el-form-item prop="partNo" :rules="rules.partNo">
  109. <span v-if="!modalDisableFlag" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  110. <span v-else slot="label">物料编码</span>
  111. <el-input v-model="modalData.partNo" :disabled="modalDisableFlag" @blur="partNoBlur" style="width: 221px"></el-input>
  112. </el-form-item>
  113. <el-form-item :label="'物料名称'" prop="partDesc" :rules="rules.partDesc">
  114. <el-input v-model="modalData.partDesc" disabled style="width: 221px"></el-input>
  115. </el-form-item>
  116. <el-form-item :label="'物料单位'">
  117. <el-input v-model="modalData.printUnit" disabled style="width: 221px"></el-input>
  118. </el-form-item>
  119. <el-form-item :label="'工艺类型'" prop="routingType" :rules="rules.routingType">
  120. <el-select v-model="modalData.routingType" @change="routingTypeChange" :disabled="modalDisableFlag" style="width: 120px">
  121. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  122. <el-option label="Repair" value="Repair"></el-option>
  123. <el-option label="Prototype" value="Prototype"></el-option>
  124. </el-select>
  125. </el-form-item>
  126. </el-form>
  127. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  128. <el-form-item label="生效日期" prop="phaseInDate" :rules="rules.phaseInDate">
  129. <el-date-picker
  130. style="width: 221px"
  131. v-model="modalData.phaseInDate"
  132. type="date"
  133. value-format="yyyy-MM-dd"
  134. placeholder="请选择日期"
  135. :editable=false>
  136. </el-date-picker>
  137. </el-form-item>
  138. <el-form-item label="失效日期">
  139. <el-date-picker
  140. style="width: 221px"
  141. v-model="modalData.phaseOutDate"
  142. type="date"
  143. value-format="yyyy-MM-dd"
  144. placeholder="请选择日期"
  145. :editable=false>
  146. </el-date-picker>
  147. </el-form-item>
  148. <el-form-item :label="'Routing版本号'" prop="routingRevision" :rules="rules.routingRevision">
  149. <el-input v-model="modalData.routingRevision" type="number" disabled style="width: 221px"></el-input>
  150. </el-form-item>
  151. <el-form-item>
  152. <el-button v-if="modalData.flag === '1' && headerSaveFlag" :loading="saveHeaderLoading" type="primary" @click="saveRoutingHeader" style="margin-top: 23px;width: 120px">保存
  153. </el-button>
  154. <el-button v-else-if="modalData.flag === '2'" type="primary" @click="copyRoutingRevision" style="margin-top: 23px;width: 120px">Copy
  155. </el-button>
  156. </el-form-item>
  157. </el-form>
  158. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  159. <el-form-item label="备注">
  160. <el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
  161. </el-form-item>
  162. </el-form>
  163. <el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
  164. <!-- Routing明细信息页签 -->
  165. <el-tab-pane label="Routings" name="routing_detail">
  166. <el-form label-position="top" style="margin-top: -10px">
  167. <el-form-item v-if="modalData.flag === '3'"></el-form-item>
  168. <el-form-item v-else>
  169. <el-button type="primary" @click="saveRoutingDetail" style="margin-left: 7px">新增</el-button>
  170. <el-button type="primary" @click="deleteRoutingDetail">删除</el-button>
  171. <el-button type="primary" @click="updateRoutingDetail">编辑</el-button>
  172. <el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button>
  173. <el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build
  174. </el-button>
  175. <el-button
  176. v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')"
  177. type="primary" @click="updateStatusToObsolete">Retire
  178. </el-button>
  179. <el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting" :loading="toBecomeOfficialLoading">转正式Routing
  180. </el-button>
  181. </el-form-item>
  182. </el-form>
  183. <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
  184. <el-form-item :label="'替代编码'">
  185. <el-select v-model="detailData.alternativeNo" @change="alternativeChange" style="width: 221px">
  186. <el-option
  187. v-for="(i, index) in detailDataList"
  188. :key="index"
  189. :label="i.alternativeNo"
  190. :value="i.alternativeNo">
  191. </el-option>
  192. </el-select>
  193. </el-form-item>
  194. <el-form-item :label="'替代名称'">
  195. <el-input v-model="detailData.alternativeDescription" readonly style="width: 221px"></el-input>
  196. </el-form-item>
  197. <el-form-item :label="'状态'">
  198. <el-input v-model="detailData.status" readonly style="width: 221px"></el-input>
  199. </el-form-item>
  200. </el-form>
  201. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
  202. <el-form-item label="备注">
  203. <el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit readonly style="width: 1073px;height: 20px"></el-input>
  204. </el-form-item>
  205. </el-form>
  206. </el-tab-pane>
  207. <!-- Routing工具页签 -->
  208. <el-tab-pane label="Routing Tools" name="routing_tool">
  209. <el-form label-position="top" style="margin-top: -10px">
  210. <el-form-item v-if="modalData.flag === '3'"></el-form-item>
  211. <el-form-item v-else>
  212. <el-button type="primary" @click="saveRoutingTool" style="margin-left: 7px">新增</el-button>
  213. <el-button type="primary" @click="deleteRoutingTool">删除</el-button>
  214. </el-form-item>
  215. </el-form>
  216. <el-table
  217. :data="routingToolList"
  218. height="500px"
  219. border
  220. ref="toolTable"
  221. @row-click="toolClickRow"
  222. @selection-change="toolSelectionChange"
  223. style="width:100%">
  224. <el-table-column type="selection" align="center" width="50"></el-table-column>
  225. <el-table-column
  226. v-for="(item,index) in columnRoutingToolList" :key="index"
  227. :sortable="item.columnSortable"
  228. :prop="item.columnProp"
  229. :header-align="item.headerAlign"
  230. :show-overflow-tooltip="item.showOverflowTooltip"
  231. :align="item.align"
  232. :fixed="item.fixed == ''?false:item.fixed"
  233. :min-width="item.columnWidth"
  234. :label="item.columnLabel">
  235. <template slot-scope="scope">
  236. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  237. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  238. </template>
  239. </el-table-column>
  240. <el-table-column
  241. v-if="modalData.flag !== '3'"
  242. fixed="right"
  243. header-align="center"
  244. align="center"
  245. width="100"
  246. label="操作">
  247. <template slot-scope="scope">
  248. <el-link style="cursor: pointer" @click="updateToolModal(scope.row)">编辑</el-link>
  249. </template>
  250. </el-table-column>
  251. </el-table>
  252. </el-tab-pane>
  253. </el-tabs>
  254. <el-tabs v-show="detailTable === 'routing_detail'" v-model="subDetailTable" style="width: 100%; min-height: 330px" type="border-card" @tab-click="tabSubDetailClick" class="sub_detail-tab">
  255. <!-- Routing子明细信息页签 -->
  256. <el-tab-pane label="Operations" name="routing_sub_detail">
  257. <el-form label-position="top" style="margin-top: 5px">
  258. <el-form-item v-if="modalData.flag === '3'"></el-form-item>
  259. <el-form-item v-else>
  260. <el-button type="primary" @click="saveComponentModal" style="margin-left: 7px">新增</el-button>
  261. <el-button type="primary" @click="deleteComponentPart">删除</el-button>
  262. </el-form-item>
  263. </el-form>
  264. <el-table
  265. :data="subDetailList"
  266. height="256px"
  267. border
  268. ref="componentTable"
  269. @row-click="componentClickRow"
  270. :row-class-name="rowClassName"
  271. @selection-change="componentSelectionChange"
  272. style="width:100%">
  273. <el-table-column type="selection" align="center" width="50"></el-table-column>
  274. <el-table-column
  275. v-for="(item,index) in columnSubDetailList" :key="index"
  276. :sortable="item.columnSortable"
  277. :prop="item.columnProp"
  278. :header-align="item.headerAlign"
  279. :show-overflow-tooltip="item.showOverflowTooltip"
  280. :align="item.align"
  281. :fixed="item.fixed == ''?false:item.fixed"
  282. :min-width="item.columnWidth"
  283. :label="item.columnLabel">
  284. <template slot-scope="scope">
  285. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  286. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  287. </template>
  288. </el-table-column>
  289. <el-table-column
  290. v-if="modalData.flag !== '3'"
  291. fixed="right"
  292. header-align="center"
  293. align="center"
  294. width="100"
  295. label="操作">
  296. <template slot-scope="scope">
  297. <a type="text" size="small" @click="workGuidelineModal(scope.row)">工艺指导</a>
  298. <a type="text" size="small" @click="updateComponentModal(scope.row)">编辑</a>
  299. </template>
  300. </el-table-column>
  301. </el-table>
  302. </el-tab-pane>
  303. </el-tabs>
  304. <el-footer style="height:30px;margin-top:20px;text-align:center">
  305. <el-button v-if="modalData.flag !== '3'" :loading="saveAllLoading" type="primary" @click="saveData()">保存</el-button>
  306. <el-button type="primary" @click="closeModal">关闭</el-button>
  307. </el-footer>
  308. </el-dialog>
  309. <!-- 明细新增模态框 -->
  310. <el-dialog title="替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="730px">
  311. <el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px">
  312. <el-form-item :label="'替代编码'" prop="alternativeNo" :disabled="saveDetailModalDisable" :rules="detailRules.alternativeNo">
  313. <el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input>
  314. </el-form-item>
  315. <el-form-item :label="'替代名称'" prop="alternativeDescription" :rules="detailRules.alternativeDescription">
  316. <el-input v-model="saveDetailData.alternativeDescription" style="width: 221px"></el-input>
  317. </el-form-item>
  318. <el-form-item :label="'状态'" prop="status" :rules="detailRules.status">
  319. <el-input v-model="saveDetailData.status" disabled style="width: 221px"></el-input>
  320. </el-form-item>
  321. </el-form>
  322. <el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px">
  323. <el-form-item label="备注">
  324. <el-input type="textarea" v-model="saveDetailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 690px;height: 20px"></el-input>
  325. </el-form-item>
  326. </el-form>
  327. <el-footer style="height:35px;margin-top:65px;text-align:center">
  328. <el-button :loading="saveDetailLoading" type="primary" @click="detailDataSave()">保存</el-button>
  329. <el-button type="primary" @click="saveDetailModalFlag = false">关闭</el-button>
  330. </el-footer>
  331. </el-dialog>
  332. <!-- 物料模态框 -->
  333. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="900px">
  334. <div class="rq">
  335. <el-form :inline="true" label-position="top" :model="partData">
  336. <el-form-item :label="'PLM物料编码'">
  337. <el-input v-model="partData.plmPartNo" clearable style="width: 120px"></el-input>
  338. </el-form-item>
  339. <el-form-item :label="'IFS物料编码'">
  340. <el-input v-model="partData.ifsPartNo" clearable style="width: 120px"></el-input>
  341. </el-form-item>
  342. <el-form-item :label="'物料名称'">
  343. <el-input v-model="partData.partDesc" clearable style="width: 200px"></el-input>
  344. </el-form-item>
  345. <el-form-item :label="' '">
  346. <el-button type="primary" @click="queryPartList">查询</el-button>
  347. </el-form-item>
  348. </el-form>
  349. <el-table
  350. :height="300"
  351. :data="partList"
  352. @row-dblclick="getRowData"
  353. border
  354. style="width: 100%;">
  355. <el-table-column
  356. v-for="(item,index) in partColumnList" :key="index"
  357. :sortable="item.columnSortable"
  358. :prop="item.columnProp"
  359. :header-align="item.headerAlign"
  360. :show-overflow-tooltip="item.showOverflowTooltip"
  361. :align="item.align"
  362. :fixed="item.fixed==''?false:item.fixed"
  363. :min-width="item.columnWidth"
  364. :label="item.columnLabel">
  365. <template slot-scope="scope">
  366. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  367. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  368. </template>
  369. </el-table-column>
  370. </el-table>
  371. <!-- 分页插件 -->
  372. <el-pagination
  373. style="margin-top: 5px"
  374. @size-change="sizeChangeHandle2"
  375. @current-change="currentChangeHandle2"
  376. :current-page="pageIndex2"
  377. :page-sizes="[20, 50, 100, 200, 500]"
  378. :page-size="pageSize2"
  379. :total="totalPage2"
  380. layout="total, sizes, prev, pager, next, jumper">
  381. </el-pagination>
  382. </div>
  383. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  384. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  385. </el-footer>
  386. </el-dialog>
  387. <!-- 子明细工序模态框 -->
  388. <el-dialog title="工序清单" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag"
  389. width="520px">
  390. <el-form :inline="true" label-position="top" :model="operationData">
  391. <el-form-item :label="'工序编码'">
  392. <el-input v-model="operationData.operationNo" clearable style="width: 120px"></el-input>
  393. </el-form-item>
  394. <el-form-item :label="'工序名称'">
  395. <el-input v-model="operationData.operationName" clearable style="width: 200px"></el-input>
  396. </el-form-item>
  397. <el-form-item :label="' '">
  398. <el-button type="primary" @click="queryOperationList()">查询</el-button>
  399. </el-form-item>
  400. </el-form>
  401. <el-table
  402. :height="300"
  403. :data="operationList"
  404. @row-dblclick="getComponentRowData"
  405. border
  406. style="width: 100%;">
  407. <el-table-column
  408. v-for="(item,index) in componentOperationColumnList" :key="index"
  409. :sortable="item.columnSortable"
  410. :prop="item.columnProp"
  411. :header-align="item.headerAlign"
  412. :show-overflow-tooltip="item.showOverflowTooltip"
  413. :align="item.align"
  414. :fixed="item.fixed==''?false:item.fixed"
  415. :min-width="item.columnWidth"
  416. :label="item.columnLabel">
  417. <template slot-scope="scope">
  418. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  419. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  420. style="width: 100px; height: 80px"/></span>
  421. </template>
  422. </el-table-column>
  423. </el-table>
  424. <el-footer style="height:30px;margin-top:10px;text-align:center">
  425. <el-button type="primary" @click="componentPartModelFlag = false">关闭</el-button>
  426. </el-footer>
  427. </el-dialog>
  428. <!-- 工具态框 -->
  429. <el-dialog title="工具清单" :close-on-click-modal="false" v-drag :visible.sync="toolModelFlag" width="570px">
  430. <div class="rq">
  431. <el-form :inline="true" label-position="top" :model="toolData">
  432. <el-form-item :label="'工具编码'">
  433. <el-input v-model="toolData.toolId" clearable style="width: 120px"></el-input>
  434. </el-form-item>
  435. <el-form-item :label="'工具名称'">
  436. <el-input v-model="toolData.toolDescription" clearable style="width: 200px"></el-input>
  437. </el-form-item>
  438. <el-form-item :label="' '">
  439. <el-button type="primary" @click="queryToolList">查询</el-button>
  440. </el-form-item>
  441. </el-form>
  442. <el-table
  443. :height="250"
  444. :data="toolList"
  445. @row-dblclick="doubleClickTool"
  446. border
  447. style="width: 100%;">
  448. <el-table-column
  449. v-for="(item,index) in toolColumnList" :key="index"
  450. :sortable="item.columnSortable"
  451. :prop="item.columnProp"
  452. :header-align="item.headerAlign"
  453. :show-overflow-tooltip="item.showOverflowTooltip"
  454. :align="item.align"
  455. :fixed="item.fixed==''?false:item.fixed"
  456. :min-width="item.columnWidth"
  457. :label="item.columnLabel">
  458. <template slot-scope="scope">
  459. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  460. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  461. </template>
  462. </el-table-column>
  463. </el-table>
  464. <!-- 分页插件 -->
  465. <el-pagination
  466. style="margin-top: 5px"
  467. @size-change="sizeChangeHandle3"
  468. @current-change="currentChangeHandle3"
  469. :current-page="pageIndex3"
  470. :page-sizes="[20, 50, 100, 200, 500]"
  471. :page-size="pageSize3"
  472. :total="totalPage3"
  473. :pager-count="3"
  474. layout="total, sizes, prev, pager, next, jumper">
  475. </el-pagination>
  476. </div>
  477. <el-footer style="height:35px;margin-top: 10px;text-align:center">
  478. <el-button type="primary" @click="toolModelFlag=false">关闭</el-button>
  479. </el-footer>
  480. </el-dialog>
  481. <!-- 子明细新增模态框 -->
  482. <el-dialog title="工序" :close-on-click-modal="false" v-drag :visible.sync="componentSaveModal" width="500px">
  483. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  484. style="margin-left: 5px">
  485. <el-form-item :label="'工序编码'" prop="operationNo" :rules="componentRules.operationNo">
  486. <el-input-number :controls="false" :step="0" v-model="componentData.operationNo"
  487. style="width: 221px"></el-input-number>
  488. </el-form-item>
  489. <el-form-item :label="'工序名称'" prop="operationName" :rules="componentRules.operationName">
  490. <el-input v-model="componentData.operationName" style="width: 221px"></el-input>
  491. </el-form-item>
  492. </el-form>
  493. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  494. style="margin-left: 5px">
  495. <el-form-item prop="workCenterNo" :rules="componentRules.workCenterNo">
  496. <span style="cursor: pointer" slot="label" @click="queryWorkCenter"><a herf="#">加工中心编码</a></span>
  497. <el-input v-model="componentData.workCenterNo" @blur="workCenterBlur(119)" style="width: 103px"></el-input>
  498. </el-form-item>
  499. <el-form-item label=" ">
  500. <el-input v-model="componentData.workCenterType" disabled style="width: 103px"></el-input>
  501. </el-form-item>
  502. <el-form-item :label="'加工中心名称'">
  503. <el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input>
  504. </el-form-item>
  505. </el-form>
  506. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  507. style="margin-left: 5px">
  508. <el-form-item :label="'机器调机时间'" prop="machSetupTime" :rules="componentRules.machSetupTime">
  509. <el-input-number :controls="false" :step="0" v-model="componentData.machSetupTime"
  510. @change="changeMachSetupTime" style="width: 221px"></el-input-number>
  511. </el-form-item>
  512. <el-form-item :label="'人工调机时间'" prop="laborSetupTime" :rules="componentRules.laborSetupTime">
  513. <el-input-number :controls="false" :step="0" v-model="componentData.laborSetupTime"
  514. style="width: 221px"></el-input-number>
  515. </el-form-item>
  516. </el-form>
  517. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  518. style="margin-left: 5px">
  519. <el-form-item style="margin-left: 235px" prop="setupLaborClassNo" :rules="componentRules.setupLaborClassNo">
  520. <span style="cursor: pointer" slot="label" @click="queryWorkerLevel1()"><a
  521. herf="#">调机过程中人员等级</a></span>
  522. <el-input v-model="componentData.setupLaborClassNo" @blur="setupLaborClassBlur(118)"
  523. style="width: 90px"></el-input>
  524. <el-input v-model="componentData.setupLaborClassDesc" disabled style="width: 127px"></el-input>
  525. </el-form-item>
  526. </el-form>
  527. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  528. style="margin-left: 5px">
  529. <el-form-item :label="'调机过程中人数'" style="margin-left: 235px" prop="setupCrewSize"
  530. :rules="componentRules.setupCrewSize">
  531. <el-input-number :controls="false" :step="0" v-model="componentData.setupCrewSize"
  532. style="width: 221px"></el-input-number>
  533. </el-form-item>
  534. </el-form>
  535. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  536. style="margin-left: 5px">
  537. <el-form-item :label="'机器单位产出'" prop="machRunFactor" :rules="componentRules.machRunFactor">
  538. <el-input-number :controls="false" :step="0" v-model="componentData.machRunFactor"
  539. @change="changeMachRunFactor" style="width: 221px"></el-input-number>
  540. </el-form-item>
  541. <el-form-item :label="'人工单位产出'" prop="laborRunFactor" :rules="componentRules.laborRunFactor">
  542. <el-input-number :controls="false" :step="0" v-model="componentData.laborRunFactor"
  543. style="width: 221px"></el-input-number>
  544. </el-form-item>
  545. </el-form>
  546. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  547. style="margin-left: 5px">
  548. <el-form-item :label="'产出单位'" prop="runTimeCode" :rules="componentRules.runTimeCode">
  549. <el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
  550. <el-option label="单位/小时" value="Units/Hour"></el-option>
  551. <el-option label="小时/单位" value="Hours/Unit"></el-option>
  552. <el-option label="小时" value="Hours"></el-option>
  553. </el-select>
  554. </el-form-item>
  555. <el-form-item prop="laborClassNo" :rules="componentRules.laborClassNo">
  556. <span style="cursor: pointer" slot="label" @click="queryWorkerLevel2()"><a
  557. herf="#">人员等级</a></span>
  558. <el-input v-model="componentData.laborClassNo" @blur="laborClassBlur(118)" style="width: 90px"></el-input>
  559. <el-input v-model="componentData.laborClassDesc" disabled style="width: 127px"></el-input>
  560. </el-form-item>
  561. </el-form>
  562. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules"
  563. style="margin-left: 5px">
  564. <el-form-item :label="'效率%'" prop="efficiencyFactor" :rules="componentRules.efficiencyFactor">
  565. <el-input-number :controls="false" :step="0" min="0" max="100" v-model="componentData.efficiencyFactor"
  566. style="width: 221px"></el-input-number>
  567. </el-form-item>
  568. <el-form-item :label="'生产过程中人数'" prop="crewSize" :rules="componentRules.crewSize">
  569. <el-input-number :controls="false" :step="0" v-model="componentData.crewSize"
  570. style="width: 221px"></el-input-number>
  571. </el-form-item>
  572. </el-form>
  573. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  574. <el-form-item :label="'外协采购料号'">
  575. <el-input v-model="componentData.outsideOpItem" :readonly="componentData.workCenterType !== '外部'"
  576. style="width: 456px"></el-input>
  577. </el-form-item>
  578. </el-form>
  579. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  580. <el-form-item label="备注">
  581. <el-input type="textarea" v-model="componentData.noteText" :rows="3" resize='none' show-word-limit
  582. style="width: 456px;height: 20px"></el-input>
  583. </el-form-item>
  584. </el-form>
  585. <el-footer style="height:35px;margin-top:65px;text-align:center">
  586. <el-button v-if="componentData.flag === '1'" type="primary" @click="componentDataSave(true)">应用</el-button>
  587. <el-button type="primary" @click="componentDataSave(false)">保存</el-button>
  588. <el-button type="primary" @click="componentSaveModal = false">关闭</el-button>
  589. </el-footer>
  590. </el-dialog>
  591. <!-- routingTool 新增模态框 -->
  592. <el-dialog title="工艺工具" :close-on-click-modal="false" v-drag :visible.sync="saveRoutingToolModal" width="500px">
  593. <el-form :inline="true" label-position="top" :model="routingToolData" :rules="RoutingToolRules"
  594. style="margin-left: 5px">
  595. <el-form-item :label="'替代'" prop="alternativeNo" :rules="RoutingToolRules.alternativeNo">
  596. <el-select v-model="routingToolData.alternativeNo" placeholder="请选择"
  597. :disabled="saveRoutingToolDisableModal" style="width: 464px">
  598. <el-option
  599. v-for="i in alternativeList"
  600. :key="i.alternativeNo"
  601. :label="i.alternativeDescription"
  602. :value="i.alternativeNo">
  603. <span style="float: left;width: 100px">{{ i.alternativeNo }}</span>
  604. <span
  605. style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 150px">{{
  606. i.alternativeDescription
  607. }}</span>
  608. </el-option>
  609. </el-select>
  610. </el-form-item>
  611. </el-form>
  612. <el-form :inline="true" label-position="top" :model="routingToolData" :rules="RoutingToolRules"
  613. style="margin-left: 5px">
  614. <el-form-item prop="operationNo" :rules="RoutingToolRules.operationNo">
  615. <span style="cursor: pointer" slot="label" v-if="saveRoutingToolDisableModal === false"
  616. @click="queryOperationList()"><a>工序</a></span>
  617. <span v-else slot="label">工序</span>
  618. <el-input v-model="routingToolData.operationNo" :disabled="saveRoutingToolDisableModal"
  619. @change="routingToolOperationBlur()" style="width: 120px"></el-input>
  620. <el-input v-model="routingToolData.operationName" disabled style="width: 340px"></el-input>
  621. </el-form-item>
  622. </el-form>
  623. <el-form :inline="true" label-position="top" :model="routingToolData" :rules="RoutingToolRules"
  624. style="margin-left: 5px">
  625. <el-form-item prop="toolId" :rules="RoutingToolRules.toolId">
  626. <span style="cursor: pointer" slot="label" v-if="!saveRoutingToolDisableModal"
  627. @click="queryToolList()"><a>工具</a></span>
  628. <span v-else slot="label">工具</span>
  629. <el-input v-model="routingToolData.toolId" :disabled="saveRoutingToolDisableModal"
  630. @change="routingToolBlur(122)" style="width: 120px"></el-input>
  631. <el-input v-model="routingToolData.toolDescription" disabled style="width: 340px"></el-input>
  632. </el-form-item>
  633. </el-form>
  634. <el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
  635. <el-form-item :label="'工具数量'" prop="toolQty" :rules="RoutingToolRules.toolQty">
  636. <el-input-number :controls="false" :step="0" v-model="routingToolData.toolQty"
  637. style="width: 120px"></el-input-number>
  638. </el-form-item>
  639. <el-form-item :label="'备注'">
  640. <el-input v-model="routingToolData.remark" style="width: 340px;margin-left: -10px"></el-input>
  641. </el-form-item>
  642. </el-form>
  643. <el-footer style="height:35px;margin-top:25px;text-align:center">
  644. <el-button type="primary" :loading="loading" @click="routingToolSave()">保存</el-button>
  645. <el-button type="primary" @click="saveRoutingToolModal = false">关闭</el-button>
  646. </el-footer>
  647. </el-dialog>
  648. <!-- copyRouting -->
  649. <el-dialog title="Copy Structure Revision" :close-on-click-modal="false" v-drag :visible.sync="copyRoutingModelFlag"
  650. width="450px">
  651. <fieldset style="width: 426px">
  652. <legend>Source Revision</legend>
  653. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  654. <el-form-item label="物料编码">
  655. <el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input>
  656. </el-form-item>
  657. <el-form-item label="物料名称">
  658. <el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
  659. </el-form-item>
  660. </el-form>
  661. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  662. <el-form-item label="Site">
  663. <el-input v-model="modalData.site" readonly style="width: 85px"></el-input>
  664. </el-form-item>
  665. <el-form-item label="Routing版本号">
  666. <el-input v-model="modalData.routingRevision" readonly style="width: 85px"></el-input>
  667. </el-form-item>
  668. <el-form-item label="工艺类型">
  669. <el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input>
  670. </el-form-item>
  671. </el-form>
  672. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  673. <el-form-item label="生效日期">
  674. <el-date-picker style="width: 185px" v-model="modalData.phaseInDate" readonly type="date"
  675. value-format="yyyy-MM-dd"></el-date-picker>
  676. </el-form-item>
  677. <el-form-item label="失效日期">
  678. <el-date-picker style="width: 185px" v-model="modalData.phaseOutDate" readonly type="date"
  679. value-format="yyyy-MM-dd"></el-date-picker>
  680. </el-form-item>
  681. </el-form>
  682. <el-table
  683. :data="detailDataList"
  684. height="100px"
  685. border
  686. style="width:100%">
  687. <el-table-column
  688. v-for="(item,index) in columnRoutingDetailList" :key="index"
  689. :sortable="item.columnSortable"
  690. :prop="item.columnProp"
  691. :header-align="item.headerAlign"
  692. :show-overflow-tooltip="item.showOverflowTooltip"
  693. :align="item.align"
  694. :fixed="item.fixed == ''?false:item.fixed"
  695. :min-width="item.columnWidth"
  696. :label="item.columnLabel">
  697. <template slot-scope="scope">
  698. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  699. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  700. </template>
  701. </el-table-column>
  702. </el-table>
  703. </fieldset>
  704. <fieldset style="width: 426px">
  705. <legend>Destination Revision</legend>
  706. <el-form :inline="true" label-position="top" :model="copyRoutingData"
  707. style="margin-left: 7px;margin-top: -5px;">
  708. <el-form-item>
  709. <span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
  710. <el-input v-model="copyRoutingData.partNo" @change="copyRoutingTypeChange" @blur="copyPartBlur"
  711. style="width: 120px"></el-input>
  712. </el-form-item>
  713. <el-form-item :label="'物料名称'">
  714. <el-input v-model="copyRoutingData.partDesc" disabled style="width: 249px"></el-input>
  715. </el-form-item>
  716. </el-form>
  717. <el-form :inline="true" label-position="top" :model="copyRoutingData"
  718. style="margin-left: 7px;margin-top: -5px;">
  719. <el-form-item label="Site">
  720. <el-input v-model="copyRoutingData.site" disabled style="width: 85px"></el-input>
  721. </el-form-item>
  722. <el-form-item label="Routing版本号">
  723. <el-input v-model="copyRoutingData.routingRevision" disabled style="width: 85px"></el-input>
  724. </el-form-item>
  725. <el-form-item label="工艺类型">
  726. <el-select v-model="copyRoutingData.routingType" @change="copyRoutingTypeChange" style="width: 185px">
  727. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  728. <el-option label="Repair" value="Repair"></el-option>
  729. <el-option label="Prototype" value="Prototype"></el-option>
  730. </el-select>
  731. </el-form-item>
  732. </el-form>
  733. <el-form :inline="true" label-position="top" :model="copyRoutingData"
  734. style="margin-left: 7px;margin-top: -5px;">
  735. <el-form-item label="生效日期">
  736. <el-date-picker style="width: 185px" v-model="copyRoutingData.phaseInDate" type="date"
  737. value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  738. </el-form-item>
  739. <el-form-item label="失效日期">
  740. <el-date-picker style="width: 185px" v-model="copyRoutingData.phaseOutDate" type="date"
  741. value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  742. </el-form-item>
  743. </el-form>
  744. </fieldset>
  745. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  746. <el-button type="primary" :loading="copyLoading" @click="copyRouting">保存</el-button>
  747. <el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button>
  748. </el-footer>
  749. </el-dialog>
  750. <!-- copyAlternative -->
  751. <el-dialog title="Copy Alternate" :close-on-click-modal="false" v-drag :visible.sync="copyAlternativeModelFlag"
  752. width="450px">
  753. <fieldset style="width: 426px">
  754. <legend>Source Revision</legend>
  755. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  756. <el-form-item label="物料编码">
  757. <el-input v-model="detailData.partNo" readonly style="width: 120px"></el-input>
  758. </el-form-item>
  759. <el-form-item label="物料名称">
  760. <el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
  761. </el-form-item>
  762. </el-form>
  763. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  764. <el-form-item label="Site">
  765. <el-input v-model="detailData.site" readonly style="width: 85px"></el-input>
  766. </el-form-item>
  767. <el-form-item label="Routing版本号">
  768. <el-input v-model="detailData.routingRevision" readonly style="width: 85px"></el-input>
  769. </el-form-item>
  770. <el-form-item label="工艺类型">
  771. <el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input>
  772. </el-form-item>
  773. </el-form>
  774. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  775. <el-form-item label="替代编码">
  776. <el-input v-model="detailData.alternativeNo" readonly style="width: 185px"></el-input>
  777. </el-form-item>
  778. <el-form-item label="替代名称">
  779. <el-input v-model="detailData.alternativeDescription" readonly style="width: 185px"></el-input>
  780. </el-form-item>
  781. </el-form>
  782. </fieldset>
  783. <fieldset style="width: 426px">
  784. <legend>Destination Revision</legend>
  785. <el-form :inline="true" label-position="top" :model="copyAlternativeData"
  786. style="margin-left: 7px;margin-top: -5px;">
  787. <el-form-item>
  788. <span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
  789. <el-input v-model="copyAlternativeData.partNo" @blur="copyPartBlur" style="width: 120px"></el-input>
  790. </el-form-item>
  791. <el-form-item :label="'物料名称'">
  792. <el-input v-model="copyAlternativeData.partDesc" disabled style="width: 249px"></el-input>
  793. </el-form-item>
  794. </el-form>
  795. <el-form :inline="true" label-position="top" :model="copyAlternativeData"
  796. style="margin-left: 7px;margin-top: -5px;">
  797. <el-form-item label="Site">
  798. <el-input v-model="copyAlternativeData.site" disabled style="width: 85px"></el-input>
  799. </el-form-item>
  800. <el-form-item label="Routing版本号">
  801. <el-input v-model="copyAlternativeData.routingRevision" style="width: 85px"></el-input>
  802. </el-form-item>
  803. <el-form-item label="工艺类型">
  804. <el-select v-model="copyAlternativeData.routingType" style="width: 185px">
  805. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  806. <el-option label="Repair" value="Repair"></el-option>
  807. <el-option label="Prototype" value="Prototype"></el-option>
  808. </el-select>
  809. </el-form-item>
  810. </el-form>
  811. <el-form :inline="true" label-position="top" :model="copyAlternativeData"
  812. style="margin-left: 7px;margin-top: -5px;">
  813. <el-form-item label="替代编码">
  814. <el-input v-model="copyAlternativeData.alternativeNo" style="width: 185px"></el-input>
  815. </el-form-item>
  816. <el-form-item label="替代名称">
  817. <el-input v-model="copyAlternativeData.alternativeDescription" style="width: 185px"></el-input>
  818. </el-form-item>
  819. </el-form>
  820. </fieldset>
  821. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  822. <el-button type="primary" :loading="copyLoading" @click="copyAlternative">保存</el-button>
  823. <el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
  824. </el-footer>
  825. </el-dialog>
  826. <!-- workGuideline -->
  827. <el-dialog title="工艺指导" :close-on-click-modal="false" v-drag :visible.sync="queryWorkGuidelineModal"
  828. width="1000px">
  829. <el-form :inline="true" label-position="top" :model="workGuidelineData" style="margin-left: 5px">
  830. <el-form-item :label="'物料编码'">
  831. <el-input v-model="workGuidelineData.partNo" readonly style="width: 120px"></el-input>
  832. </el-form-item>
  833. <el-form-item :label="'物料名称'">
  834. <el-input v-model="workGuidelineData.partDesc" readonly style="width: 240px"></el-input>
  835. </el-form-item>
  836. <el-form-item :label="'Routing版本号'">
  837. <el-input v-model="workGuidelineData.routingRevision" readonly style="width: 80px"></el-input>
  838. </el-form-item>
  839. <el-form-item :label="'工艺类型'">
  840. <el-input v-model="workGuidelineData.routingType" readonly style="width: 120px"></el-input>
  841. </el-form-item>
  842. </el-form>
  843. <el-form :inline="true" label-position="top" :model="workGuidelineData" style="margin-left: 5px">
  844. <el-form-item :label="'替代编码'">
  845. <el-input v-model="workGuidelineData.alternativeNo" readonly style="width: 120px"></el-input>
  846. </el-form-item>
  847. <el-form-item :label="'替代名称'">
  848. <el-input v-model="workGuidelineData.alternativeDescription" readonly style="width: 240px"></el-input>
  849. </el-form-item>
  850. <el-form-item :label="'工序编码'">
  851. <el-input v-model="workGuidelineData.operationNo" readonly style="width: 120px"></el-input>
  852. </el-form-item>
  853. <el-form-item :label="'工序名称'">
  854. <el-input v-model="workGuidelineData.operationName" readonly style="width: 240px"></el-input>
  855. </el-form-item>
  856. </el-form>
  857. <!-- 页签 -->
  858. <el-tabs style="width: 100%" type="border-card" class="customer-tab">
  859. <!-- Graphical Structure页签 -->
  860. <el-tab-pane label="Work Guidelines">
  861. <el-form label-position="top" style="margin-top: 0px">
  862. <el-button type="primary" @click="saveWorkGuideline()" style="margin-left: 2px">新增</el-button>
  863. <el-button type="primary" @click="deleteModal()">删除</el-button>
  864. </el-form>
  865. <el-table
  866. height="400px"
  867. :data="workGuidelineList"
  868. border
  869. @selection-change="selectionWorkGuideline"
  870. style="width: 100%">
  871. <el-table-column
  872. type="selection"
  873. header-align="center"
  874. align="center"
  875. width="50">
  876. </el-table-column>
  877. <el-table-column
  878. v-for="(item,index) in workGuidelineColumnList" :key="index"
  879. :sortable="item.columnSortable"
  880. :prop="item.columnProp"
  881. :header-align="item.headerAlign"
  882. :show-overflow-tooltip="item.showOverflowTooltip"
  883. :align="item.align"
  884. :fixed="item.fixed==''?false:item.fixed"
  885. :min-width="item.columnWidth"
  886. :label="item.columnLabel">
  887. <template slot-scope="scope">
  888. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  889. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  890. style="width: 100px; height: 80px"/></span>
  891. </template>
  892. </el-table-column>
  893. <el-table-column
  894. fixed="right"
  895. header-align="center"
  896. align="center"
  897. width="100"
  898. label="操作">
  899. <template slot-scope="scope">
  900. <a type="text" size="small" @click="updateWorkGuidelineModal(scope.row)">编辑</a>
  901. </template>
  902. </el-table-column>
  903. </el-table>
  904. </el-tab-pane>
  905. </el-tabs>
  906. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  907. <el-button type="primary" @click="queryWorkGuidelineModal = false">关闭</el-button>
  908. </el-footer>
  909. </el-dialog>
  910. <!-- workGuideline 新增模态框 -->
  911. <el-dialog title="工艺指导" :close-on-click-modal="false" v-drag :visible.sync="saveWorkGuidelineModal"
  912. width="664px">
  913. <el-form :inline="true" label-position="top" :model="saveWorkGuidelineData" :rules="guidelineRules"
  914. style="margin-left: 5px">
  915. <el-form-item :label="'序号'" prop="guidelineSeq" :rules="guidelineRules.guidelineSeq">
  916. <el-input-number :controls="false" :step="0" v-model="saveWorkGuidelineData.guidelineSeq"
  917. style="width: 60px"></el-input-number>
  918. </el-form-item>
  919. <el-form-item :label="'工艺指导名称'" prop="guidelineDesc" :rules="guidelineRules.guidelineDesc">
  920. <el-input v-model="saveWorkGuidelineData.guidelineDesc" style="width: 126px"></el-input>
  921. </el-form-item>
  922. <el-form-item :label="'工艺指导描述'" prop="guidelineText" :rules="guidelineRules.guidelineText">
  923. <el-input v-model="saveWorkGuidelineData.guidelineText" style="width: 413px"></el-input>
  924. </el-form-item>
  925. </el-form>
  926. <el-form :inline="true" label-position="top" :model="saveWorkGuidelineData" :rules="guidelineRules"
  927. style="margin-left: 5px">
  928. <el-form-item :label="'工艺指导类型'" prop="guidelineType" :rules="guidelineRules.guidelineType">
  929. <el-select v-model="saveWorkGuidelineData.guidelineType" style="width: 200px">
  930. <el-option label="Subtask" value="Subtask"></el-option>
  931. <el-option label="Instruction" value="Instruction"></el-option>
  932. </el-select>
  933. </el-form-item>
  934. <el-form-item :label="'签字'" prop="signOffRequired" :rules="guidelineRules.signOffRequired">
  935. <el-select v-model="saveWorkGuidelineData.signOffRequired" style="width: 200px">
  936. <el-option label="Required to Close Operation" value="Required to Close Operation"></el-option>
  937. <el-option label="Not Required" value="Not Required"></el-option>
  938. </el-select>
  939. </el-form-item>
  940. <el-form-item :label="'检验签字'" prop="inspectionSignOffRequired"
  941. :rules="guidelineRules.inspectionSignOffRequired">
  942. <el-select v-model="saveWorkGuidelineData.inspectionSignOffRequired" style="width: 200px">
  943. <el-option label="Required to Shop Order" value="Required to Shop Order"></el-option>
  944. <el-option label="Required to Close Operation" value="Required to Close Operation"></el-option>
  945. <el-option label="Not Required" value="Not Required"></el-option>
  946. </el-select>
  947. </el-form-item>
  948. </el-form>
  949. <el-footer style="height:35px;margin-top:25px;text-align:center">
  950. <el-button type="primary" :loading="guidelineLoading" @click="workGuidelineCommit">保存</el-button>
  951. <el-button type="primary" @click="saveWorkGuidelineModal = false">关闭</el-button>
  952. </el-footer>
  953. </el-dialog>
  954. <!-- copy物料模态框 -->
  955. <el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag"
  956. width="700px">
  957. <el-form :inline="true" label-position="top" :model="copyPartData">
  958. <el-form-item :label="'PLM物料编码'">
  959. <el-input v-model="copyPartData.plmPartNo" clearable style="width: 120px"></el-input>
  960. </el-form-item>
  961. <el-form-item :label="'IFS物料编码'">
  962. <el-input v-model="copyPartData.ifsPartNo" clearable style="width: 120px"></el-input>
  963. </el-form-item>
  964. <el-form-item :label="'物料名称'">
  965. <el-input v-model="copyPartData.partDesc" clearable style="width: 120px"></el-input>
  966. </el-form-item>
  967. <el-form-item :label="' '">
  968. <el-button type="primary" @click="queryCopyPartList">查询</el-button>
  969. </el-form-item>
  970. </el-form>
  971. <el-table
  972. :height="250"
  973. :data="copyPartList"
  974. @row-dblclick="getCopyRowData"
  975. border
  976. style="width: 100%;">
  977. <el-table-column
  978. v-for="(item,index) in componentPartColumnList" :key="index"
  979. :sortable="item.columnSortable"
  980. :prop="item.columnProp"
  981. :header-align="item.headerAlign"
  982. :show-overflow-tooltip="item.showOverflowTooltip"
  983. :align="item.align"
  984. :fixed="item.fixed==''?false:item.fixed"
  985. :min-width="item.columnWidth"
  986. :label="item.columnLabel">
  987. <template slot-scope="scope">
  988. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  989. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  990. style="width: 100px; height: 80px"/></span>
  991. </template>
  992. </el-table-column>
  993. </el-table>
  994. <!-- 分页插件 -->
  995. <el-pagination
  996. style="margin-top: 5px"
  997. @size-change="sizeChangeHandle4"
  998. @current-change="currentChangeHandle4"
  999. :current-page="pageIndex4"
  1000. :page-sizes="[20, 50, 100, 200, 500]"
  1001. :page-size="pageSize4"
  1002. :total="totalPage4"
  1003. layout="total, sizes, prev, pager, next, jumper">
  1004. </el-pagination>
  1005. <el-footer style="height:35px;margin-top:10px;text-align:center">
  1006. <el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button>
  1007. </el-footer>
  1008. </el-dialog>
  1009. <!-- chooseList模态框 -->
  1010. <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
  1011. <!-- 加工中心模态框 -->
  1012. <el-dialog title="加工中心" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="workCenterModelFlag"
  1013. width="940px">
  1014. <el-form :inline="true" label-position="top" :model="searchData">
  1015. <el-form-item :label="'编码'">
  1016. <el-input v-model="searchData.workCenterNo" clearable style="width: 120px"></el-input>
  1017. </el-form-item>
  1018. <el-form-item :label="'加工中心名称'">
  1019. <el-input v-model="searchData.workCenterDesc" clearable style="width: 120px"></el-input>
  1020. </el-form-item>
  1021. <el-form-item :label="' '">
  1022. <el-button type="primary" @click="queryWorkCenter">查询</el-button>
  1023. </el-form-item>
  1024. </el-form>
  1025. <el-table
  1026. :height="250"
  1027. :data="workCenterList"
  1028. @row-dblclick="getWorkCenterRowData"
  1029. border
  1030. style="width: 100%;">
  1031. <el-table-column
  1032. v-for="(item,index) in workCenterColumnList" :key="index"
  1033. :sortable="item.columnSortable"
  1034. :prop="item.columnProp"
  1035. :header-align="item.headerAlign"
  1036. :show-overflow-tooltip="item.showOverflowTooltip"
  1037. :align="item.align"
  1038. :fixed="item.fixed==''?false:item.fixed"
  1039. :min-width="item.columnWidth"
  1040. :label="item.columnLabel">
  1041. <template slot-scope="scope">
  1042. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1043. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1044. style="width: 100px; height: 80px"/></span>
  1045. </template>
  1046. </el-table-column>
  1047. </el-table>
  1048. <!-- 分页插件 -->
  1049. <el-pagination
  1050. style="margin-top: 5px"
  1051. @size-change="sizeChangeHandle5"
  1052. @current-change="currentChangeHandle5"
  1053. :current-page="pageIndex5"
  1054. :page-sizes="[20, 50, 100, 200, 500]"
  1055. :page-size="pageSize5"
  1056. :total="totalPage5"
  1057. layout="total, sizes, prev, pager, next, jumper">
  1058. </el-pagination>
  1059. <el-footer style="height:35px;margin-top:10px;text-align:center">
  1060. <el-button type="primary" @click="workCenterModelFlag = false">关闭</el-button>
  1061. </el-footer>
  1062. </el-dialog>
  1063. <!-- 人员等级模态框 -->
  1064. <el-dialog title="人员等级" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="workerLevelModelFlag1"
  1065. width="940px">
  1066. <el-form :inline="true" label-position="top" :model="searchData">
  1067. <el-form-item :label="'编码'">
  1068. <el-input v-model="searchData.levelId" clearable style="width: 120px"></el-input>
  1069. </el-form-item>
  1070. <el-form-item :label="'名称'">
  1071. <el-input v-model="searchData.levelDesc" clearable style="width: 120px"></el-input>
  1072. </el-form-item>
  1073. <el-form-item :label="' '">
  1074. <el-button type="primary" @click="queryWorkerLevel1()">查询</el-button>
  1075. </el-form-item>
  1076. </el-form>
  1077. <el-table
  1078. :height="250"
  1079. :data="workerLevelList"
  1080. @row-dblclick="getWorkerLevelRowData1"
  1081. border
  1082. style="width: 100%;">
  1083. <el-table-column
  1084. v-for="(item,index) in workerLevelColumnList" :key="index"
  1085. :sortable="item.columnSortable"
  1086. :prop="item.columnProp"
  1087. :header-align="item.headerAlign"
  1088. :show-overflow-tooltip="item.showOverflowTooltip"
  1089. :align="item.align"
  1090. :fixed="item.fixed==''?false:item.fixed"
  1091. :min-width="item.columnWidth"
  1092. :label="item.columnLabel">
  1093. <template slot-scope="scope">
  1094. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1095. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1096. style="width: 100px; height: 80px"/></span>
  1097. </template>
  1098. </el-table-column>
  1099. </el-table>
  1100. <!-- 分页插件 -->
  1101. <el-pagination
  1102. style="margin-top: 5px"
  1103. @size-change="sizeChangeHandle6"
  1104. @current-change="currentChangeHandle6"
  1105. :current-page="pageIndex6"
  1106. :page-sizes="[20, 50, 100, 200, 500]"
  1107. :page-size="pageSize6"
  1108. :total="totalPage6"
  1109. layout="total, sizes, prev, pager, next, jumper">
  1110. </el-pagination>
  1111. <el-footer style="height:35px;margin-top:10px;text-align:center">
  1112. <el-button type="primary" @click="workerLevelModelFlag1 = false">关闭</el-button>
  1113. </el-footer>
  1114. </el-dialog>
  1115. <el-dialog title="人员等级" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="workerLevelModelFlag2"
  1116. width="940px">
  1117. <el-form :inline="true" label-position="top" :model="searchData">
  1118. <el-form-item :label="'编码'">
  1119. <el-input v-model="searchData.levelId" clearable style="width: 120px"></el-input>
  1120. </el-form-item>
  1121. <el-form-item :label="'名称'">
  1122. <el-input v-model="searchData.levelDesc" clearable style="width: 120px"></el-input>
  1123. </el-form-item>
  1124. <el-form-item :label="' '">
  1125. <el-button type="primary" @click="queryWorkerLevel2()">查询</el-button>
  1126. </el-form-item>
  1127. </el-form>
  1128. <el-table
  1129. :height="250"
  1130. :data="workerLevelList"
  1131. @row-dblclick="getWorkerLevelRowData2"
  1132. border
  1133. style="width: 100%;">
  1134. <el-table-column
  1135. v-for="(item,index) in workerLevelColumnList" :key="index"
  1136. :sortable="item.columnSortable"
  1137. :prop="item.columnProp"
  1138. :header-align="item.headerAlign"
  1139. :show-overflow-tooltip="item.showOverflowTooltip"
  1140. :align="item.align"
  1141. :fixed="item.fixed==''?false:item.fixed"
  1142. :min-width="item.columnWidth"
  1143. :label="item.columnLabel">
  1144. <template slot-scope="scope">
  1145. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  1146. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
  1147. style="width: 100px; height: 80px"/></span>
  1148. </template>
  1149. </el-table-column>
  1150. </el-table>
  1151. <!-- 分页插件 -->
  1152. <el-pagination
  1153. style="margin-top: 5px"
  1154. @size-change="sizeChangeHandle7"
  1155. @current-change="currentChangeHandle7"
  1156. :current-page="pageIndex6"
  1157. :page-sizes="[20, 50, 100, 200, 500]"
  1158. :page-size="pageSize6"
  1159. :total="totalPage6"
  1160. layout="total, sizes, prev, pager, next, jumper">
  1161. </el-pagination>
  1162. <el-footer style="height:35px;margin-top:10px;text-align:center">
  1163. <el-button type="primary" @click="workerLevelModelFlag2 = false">关闭</el-button>
  1164. </el-footer>
  1165. </el-dialog>
  1166. </div>
  1167. </template>
  1168. <script>
  1169. import {
  1170. routingManagementSearch, // routing 列表查询
  1171. routingManagementSave, // routing 新增
  1172. routingManagementEdit, // routing 编辑
  1173. routingManagementDelete, // routing 删除
  1174. queryRoutingHeader, // 查询 routing 主信息
  1175. saveRoutingHeader, // 新增 routing 主信息
  1176. queryRoutingDetail, // 查 routing 明细
  1177. routingDetailSave, // routing 明细新增
  1178. routingDetailUpdate, // routing 明细编辑
  1179. updateAlternativeStatus, // 修改明细状态
  1180. routingDetailDelete, // routing 明细删除
  1181. queryPartList, // 查询物料清单
  1182. queryPartListRouting, // 查出可创建Routing的物料
  1183. queryRoutingComponent, // 查询 routing 子明细
  1184. saveRoutingComponent, // 新增 routing 子明细
  1185. updateRoutingComponent, // 修改 routing 子明细
  1186. deleteRoutingComponent, // 删除 routing 子明细
  1187. queryOperationList, // 查询工序列表
  1188. getRottingRevision, // 获取物料的 routing 版本号
  1189. searchRoutingTools, // 获取 routingTools
  1190. routingToolSave, // 新增 routingTool
  1191. queryOperationListByAlternative, // 根据替代查询工序列表
  1192. queryAlternativeListByPartNo, // 根据物料查询替代
  1193. routingToolEdit, // 编辑 routingTool
  1194. deleteRoutingTool, // 删除 routingTool
  1195. copyRouting, // 复制routing
  1196. copyAlternative, // 复制alternative
  1197. toBecomeOfficialRouting, // 转正式Routing
  1198. queryMaxOperationNo, // 查询最大工序号
  1199. queryToolList, // 获取工具集合
  1200. queryLaborClassByWorkCenterNo, // 通过加工中心查人员等级
  1201. } from '@/api/part/routingManagement.js'
  1202. import {
  1203. routingSearchAlternative, // routing 替代列表查询
  1204. getRoutingWorkGuideline, // 获取 workGuideline
  1205. getGuidelineSeq, // 获取 guidelineSeq
  1206. workGuidelineSave, // 新增 workGuideline
  1207. workGuidelineEdit, // 编辑 workGuideline
  1208. deleteWorkGuideline, // 删除 workGuideline
  1209. } from '@/api/part/routingOperationWorkGuidelines.js'
  1210. import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
  1211. import ChooseList from '@/views/modules/common/Chooselist'
  1212. import {queryWorkCenterList} from "../../../api/part/workCenter";
  1213. import {queryWorkerLevelList} from "../../../api/base/laborClass";
  1214. export default {
  1215. // 组件
  1216. components: {
  1217. ChooseList
  1218. },
  1219. // 监听
  1220. watch: {
  1221. searchData: {
  1222. deep: true,
  1223. handler: function (newV, oldV) {
  1224. this.searchData.partNo = this.searchData.partNo.toUpperCase()
  1225. }
  1226. },
  1227. modalData: {
  1228. deep: true,
  1229. handler: function (newV, oldV) {
  1230. this.modalData.partNo = this.modalData.partNo.toUpperCase()
  1231. }
  1232. },
  1233. saveDetailData: {
  1234. deep: true,
  1235. handler: function (newV, oldV) {
  1236. this.saveDetailData.alternativeNo = this.saveDetailData.alternativeNo.toUpperCase()
  1237. }
  1238. },
  1239. copyAlternativeData: {
  1240. deep: true,
  1241. handler: function (newV, oldV) {
  1242. this.copyAlternativeData.partNo = this.copyAlternativeData.partNo.toUpperCase()
  1243. }
  1244. },
  1245. copyRoutingData: {
  1246. deep: true,
  1247. handler: function (newV, oldV) {
  1248. this.copyRoutingData.partNo = this.copyRoutingData.partNo.toUpperCase()
  1249. }
  1250. },
  1251. componentData: {
  1252. deep: true,
  1253. handler: function (newV, oldV) {
  1254. // 不用转大写
  1255. // this.componentData.workCenterNo = this.componentData.workCenterNo.toUpperCase()
  1256. // this.componentData.laborClassDesc = this.componentData.laborClassDesc.toUpperCase()
  1257. // this.componentData.setupLaborClassDesc = this.componentData.setupLaborClassDesc.toUpperCase()
  1258. }
  1259. },
  1260. routingToolData: {
  1261. deep: true,
  1262. handler: function (newV, oldV) {
  1263. this.routingToolData.toolId = this.routingToolData.toolId.toUpperCase()
  1264. }
  1265. }
  1266. },
  1267. // 对象
  1268. data() {
  1269. return {
  1270. initPage: false,
  1271. loading: false,
  1272. // 导出
  1273. exportData: [],
  1274. exportName: 'Routing列表' + this.dayjs().format('YYYYMMDDHHmmss'),
  1275. exportHeader: ['Routing列表'],
  1276. exportFooter: [],
  1277. resultList: [],
  1278. // ======== 行高 ========
  1279. height: 200,
  1280. // ======== 分页 ========
  1281. pageIndex: 1,
  1282. pageSize: 50,
  1283. totalPage: 0,
  1284. pageIndex2: 1,
  1285. pageSize2: 20,
  1286. totalPage2: 0,
  1287. pageIndex3: 1,
  1288. pageSize3: 20,
  1289. totalPage3: 0,
  1290. pageIndex4: 1,
  1291. pageSize4: 20,
  1292. totalPage4: 0,
  1293. pageIndex5: 1,
  1294. pageSize5: 20,
  1295. totalPage5: 0,
  1296. pageIndex6: 1,
  1297. pageSize6: 20,
  1298. totalPage6: 0,
  1299. pageIndex7: 1,
  1300. pageSize7: 20,
  1301. totalPage7: 0,
  1302. selectedDataNum: 0,
  1303. // 条件查询
  1304. searchData: {
  1305. site: this.$store.state.user.site,
  1306. partNo: '',
  1307. plmPartNo: '',
  1308. ifsPartNo: '',
  1309. partDesc: '',
  1310. routingType: '',
  1311. routingRevision: '',
  1312. page: 1,
  1313. limit: 10,
  1314. workCenterNo: '',
  1315. workCenterDesc: '',
  1316. levelId: '',
  1317. levelDesc: ''
  1318. },
  1319. // loading
  1320. queryLoading: false,
  1321. saveHeaderLoading: false,
  1322. saveDetailLoading: false,
  1323. saveAllLoading: false,
  1324. toBecomeOfficialLoading: false,
  1325. copyLoading: false,
  1326. workCenterModelFlag: false,
  1327. workerLevelModelFlag1: false,
  1328. workerLevelModelFlag2: false,
  1329. // 初始页签
  1330. detailTable: 'routing_detail',
  1331. subDetailTable: 'routing_sub_detail',
  1332. // ======== 数据对象 ========
  1333. modalData: {
  1334. flag: '',
  1335. title: '',
  1336. site: this.$store.state.user.site,
  1337. partNo: '',
  1338. partDesc: '',
  1339. routingRevision: '',
  1340. routingType: '',
  1341. noteText: '',
  1342. phaseInDate: '',
  1343. phaseOutDate: '',
  1344. createDate: '',
  1345. createBy: '',
  1346. updateDate: '',
  1347. updateBy: '',
  1348. printUnit: '',
  1349. printUnitName: '',
  1350. officialFlag: ''
  1351. },
  1352. detailData: {
  1353. site: this.$store.state.user.site,
  1354. partNo: '',
  1355. routingRevision: '',
  1356. routingType: '',
  1357. alternativeNo: '',
  1358. alternativeDescription: '',
  1359. routTemplateId: '',
  1360. planDate: '',
  1361. fixedLeadTimeDay: '',
  1362. fixedLeadTimeHour: '',
  1363. variableLeadTimeDay: '',
  1364. variableLeadTimeHour: '',
  1365. forStdLotByDay: '',
  1366. forLotByDay: '',
  1367. minLotQty: '',
  1368. detailNoteText: '',
  1369. status: '',
  1370. createDate: '',
  1371. createBy: '',
  1372. updateDate: '',
  1373. updateBy: '',
  1374. officialFlag: ''
  1375. },
  1376. componentData: {
  1377. flag: '',
  1378. site: this.$store.state.user.site,
  1379. partNo: '',
  1380. routingRevision: '',
  1381. routingType: '',
  1382. alternativeNo: '',
  1383. operationId: '',
  1384. operationNo: '',
  1385. operationName: '',
  1386. efficiencyFactor: '',
  1387. machRunFactor: '',
  1388. machSetupTime: '',
  1389. runTimeCode: '',
  1390. laborRunFactor: '',
  1391. laborSetupTime: '',
  1392. crewSize: '',
  1393. setupCrewSize: '',
  1394. outsideOpItem: '',
  1395. machineNo: '',
  1396. workCenterNo: '',
  1397. workCenterDesc: '',
  1398. workCenterType: '',
  1399. laborClassNo: '',
  1400. laborClassDesc: '',
  1401. setupLaborClassNo: '',
  1402. setupLaborClassDesc: '',
  1403. overlap: '',
  1404. noteText: '',
  1405. createDate: '',
  1406. createBy: '',
  1407. updateDate: '',
  1408. updateBy: '',
  1409. ifsRowId: '',
  1410. ifsRowVersion: '',
  1411. levelId: '',
  1412. levelDesc: '',
  1413. },
  1414. partData: {
  1415. site: this.$store.state.user.site,
  1416. partNo: '',
  1417. plmPartNo: '',
  1418. ifsPartNo: '',
  1419. partDesc: '',
  1420. page: 1,
  1421. limit: 10
  1422. },
  1423. toolData: {
  1424. site: this.$store.state.user.site,
  1425. toolId: '',
  1426. toolDescription: '',
  1427. page: 1,
  1428. limit: 10
  1429. },
  1430. operationData: {
  1431. site: this.$store.state.user.site,
  1432. partNo: '',
  1433. routingRevision: '',
  1434. routingType: '',
  1435. alternativeNo: '',
  1436. operationNo: '',
  1437. operationName: '',
  1438. },
  1439. saveDetailData: {
  1440. flag: '',
  1441. site: this.$store.state.user.site,
  1442. partNo: '',
  1443. routingRevision: '',
  1444. routingType: '',
  1445. alternativeNo: '',
  1446. alternativeDescription: '',
  1447. routTemplateId: '',
  1448. planDate: '',
  1449. fixedLeadTimeDay: '',
  1450. fixedLeadTimeHour: '',
  1451. variableLeadTimeDay: '',
  1452. variableLeadTimeHour: '',
  1453. forStdLotByDay: '',
  1454. forLotByDay: '',
  1455. minLotQty: '',
  1456. detailNoteText: '',
  1457. status: '',
  1458. createDate: '',
  1459. createBy: '',
  1460. updateDate: '',
  1461. updateBy: ''
  1462. },
  1463. routingToolData: {
  1464. id: '',
  1465. flag: '',
  1466. site: this.$store.state.user.site,
  1467. partNo: '',
  1468. partDesc: '',
  1469. routingRevision: '',
  1470. routingType: '',
  1471. alternativeNo: '',
  1472. alternativeDescription: '',
  1473. operationId: '',
  1474. operationNo: '',
  1475. operationName: '',
  1476. toolId: '',
  1477. toolDescription: '',
  1478. toolQty: '',
  1479. remark: '',
  1480. createBy: '',
  1481. updateBy: '',
  1482. ifsRowId: '',
  1483. ifsRowVersion: ''
  1484. },
  1485. copyRoutingData: {
  1486. site: '',
  1487. partNo: '',
  1488. partDesc: '',
  1489. routingRevision: '',
  1490. routingType: '',
  1491. phaseInDate: '',
  1492. phaseOutDate: '',
  1493. previousVersion: {},
  1494. createBy: ''
  1495. },
  1496. copyAlternativeData: {
  1497. site: '',
  1498. partNo: '',
  1499. partDesc: '',
  1500. routingRevision: '',
  1501. routingType: '',
  1502. alternativeNo: '',
  1503. alternativeDescription: '',
  1504. routTemplateId: '',
  1505. planDate: '',
  1506. fixedLeadTimeDay: '',
  1507. fixedLeadTimeHour: '',
  1508. variableLeadTimeDay: '',
  1509. variableLeadTimeHour: '',
  1510. forStdLotByDay: '',
  1511. forLotByDay: '',
  1512. minLotQty: '',
  1513. detailNoteText: '',
  1514. status: '',
  1515. previousVersion: {},
  1516. createBy: ''
  1517. },
  1518. workGuidelineData: {
  1519. site: this.$store.state.user.site,
  1520. partNo: '',
  1521. partDesc: '',
  1522. routingRevision: '',
  1523. routingType: '',
  1524. alternativeNo: '',
  1525. alternativeDescription: '',
  1526. operationId: '',
  1527. operationNo: '',
  1528. operationName: ''
  1529. },
  1530. saveWorkGuidelineData: {
  1531. flag: '',
  1532. id: '',
  1533. site: this.$store.state.user.site,
  1534. partNo: '',
  1535. partDesc: '',
  1536. routingRevision: '',
  1537. routingType: '',
  1538. alternativeNo: '',
  1539. alternativeDescription: '',
  1540. operationId: '',
  1541. operationNo: '',
  1542. operationName: '',
  1543. guidelineSeq: '',
  1544. guidelineDesc: '',
  1545. guidelineText: '',
  1546. guidelineType: '',
  1547. signOffRequired: '',
  1548. inspectionSignOffRequired: '',
  1549. createBy: '',
  1550. updateBy: '',
  1551. ifsRowId: '',
  1552. ifsRowVersion: ''
  1553. },
  1554. copyPartData: {
  1555. type: '',
  1556. site: this.$store.state.user.site,
  1557. partNo: '',
  1558. plmPartNo: '',
  1559. ifsPartNo: '',
  1560. partDesc: '',
  1561. page: 1,
  1562. limit: 10
  1563. },
  1564. // ======== 数据列表 ========
  1565. dataList: [],
  1566. partList: [],
  1567. operationList: [],
  1568. componentPartSelections: [],
  1569. subDetailList: [],
  1570. detailDataList: [],
  1571. checkedDetail: [],
  1572. checkedTool: [],
  1573. routingToolList: [],
  1574. alternativeList: [],
  1575. workGuidelineList: [],
  1576. copyPartList: [],
  1577. toolList: [],
  1578. workCenterList: [],
  1579. workerLevelList: [],
  1580. // ======== 列表表头 ========
  1581. columnList: [
  1582. {
  1583. userId: this.$store.state.user.name,
  1584. functionId: 104003,
  1585. serialNumber: '104003Table1PlmPartNo',
  1586. tableId: '104003Table1',
  1587. tableName: 'Routing信息表',
  1588. columnProp: 'plmPartNo',
  1589. headerAlign: 'center',
  1590. align: 'left',
  1591. columnLabel: 'PLM物料编码',
  1592. columnHidden: false,
  1593. columnImage: false,
  1594. columnSortable: false,
  1595. sortLv: 0,
  1596. status: true,
  1597. fixed: '',
  1598. columnWidth: 120
  1599. },
  1600. {
  1601. userId: this.$store.state.user.name,
  1602. functionId: 104003,
  1603. serialNumber: '104003Table1IfsPartNo',
  1604. tableId: '104003Table1',
  1605. tableName: 'Routing信息表',
  1606. columnProp: 'ifsPartNo',
  1607. headerAlign: 'center',
  1608. align: 'left',
  1609. columnLabel: 'IFS物料编码',
  1610. columnHidden: false,
  1611. columnImage: false,
  1612. columnSortable: false,
  1613. sortLv: 0,
  1614. status: true,
  1615. fixed: '',
  1616. columnWidth: 120
  1617. },
  1618. {
  1619. userId: this.$store.state.user.name,
  1620. functionId: 104003,
  1621. serialNumber: '104003Table1PartDesc',
  1622. tableId: '104003Table1',
  1623. tableName: 'Routing信息表',
  1624. columnProp: 'partDesc',
  1625. headerAlign: 'center',
  1626. align: 'left',
  1627. columnLabel: '物料名称',
  1628. columnHidden: false,
  1629. columnImage: false,
  1630. columnSortable: false,
  1631. sortLv: 0,
  1632. status: true,
  1633. fixed: '',
  1634. columnWidth: 300
  1635. },
  1636. {
  1637. userId: this.$store.state.user.name,
  1638. functionId: 104003,
  1639. serialNumber: '104003Table1RoutingType',
  1640. tableId: '104003Table1',
  1641. tableName: 'Routing信息表',
  1642. columnProp: 'routingType',
  1643. headerAlign: 'center',
  1644. align: 'left',
  1645. columnLabel: '工艺类型',
  1646. columnHidden: false,
  1647. columnImage: false,
  1648. columnSortable: false,
  1649. sortLv: 0,
  1650. status: true,
  1651. fixed: '',
  1652. columnWidth: 120
  1653. },
  1654. {
  1655. userId: this.$store.state.user.name,
  1656. functionId: 104003,
  1657. serialNumber: '104003Table1RoutingRevision',
  1658. tableId: '104003Table1',
  1659. tableName: 'Routing信息表',
  1660. columnProp: 'routingRevision',
  1661. headerAlign: 'center',
  1662. align: 'right',
  1663. columnLabel: 'Routing版本号',
  1664. columnHidden: false,
  1665. columnImage: false,
  1666. columnSortable: false,
  1667. sortLv: 0,
  1668. status: true,
  1669. fixed: '',
  1670. columnWidth: 100
  1671. },
  1672. {
  1673. userId: this.$store.state.user.name,
  1674. functionId: 104003,
  1675. serialNumber: '104003Table1CreateDate',
  1676. tableId: '104003Table1',
  1677. tableName: 'Routing信息表',
  1678. columnProp: 'createDate',
  1679. headerAlign: 'center',
  1680. align: 'center',
  1681. columnLabel: '创建时间',
  1682. columnHidden: false,
  1683. columnImage: false,
  1684. columnSortable: false,
  1685. sortLv: 0,
  1686. status: true,
  1687. fixed: '',
  1688. columnWidth: 170
  1689. },
  1690. {
  1691. userId: this.$store.state.user.name,
  1692. functionId: 104003,
  1693. serialNumber: '104003Table1CreateBy',
  1694. tableId: '104003Table1',
  1695. tableName: 'Routing信息表',
  1696. columnProp: 'createBy',
  1697. headerAlign: 'center',
  1698. align: 'center',
  1699. columnLabel: '创建人',
  1700. columnHidden: false,
  1701. columnImage: false,
  1702. columnSortable: false,
  1703. sortLv: 0,
  1704. status: true,
  1705. fixed: '',
  1706. columnWidth: 100
  1707. },
  1708. {
  1709. userId: this.$store.state.user.name,
  1710. functionId: 104003,
  1711. serialNumber: '104003Table1UpdateDate',
  1712. tableId: '104003Table1',
  1713. tableName: 'Routing信息表',
  1714. columnProp: 'updateDate',
  1715. headerAlign: 'center',
  1716. align: 'center',
  1717. columnLabel: '更新时间',
  1718. columnHidden: false,
  1719. columnImage: false,
  1720. columnSortable: false,
  1721. sortLv: 0,
  1722. status: true,
  1723. fixed: '',
  1724. columnWidth: 170
  1725. },
  1726. {
  1727. userId: this.$store.state.user.name,
  1728. functionId: 104003,
  1729. serialNumber: '104003Table1UpdateBy',
  1730. tableId: '104003Table1',
  1731. tableName: 'Routing信息表',
  1732. columnProp: 'updateBy',
  1733. headerAlign: 'center',
  1734. align: 'center',
  1735. columnLabel: '更新人',
  1736. columnHidden: false,
  1737. columnImage: false,
  1738. columnSortable: false,
  1739. sortLv: 0,
  1740. status: true,
  1741. fixed: '',
  1742. columnWidth: 100
  1743. }
  1744. ],
  1745. partColumnList: [
  1746. {
  1747. columnProp: 'plmPartNo',
  1748. headerAlign: "center",
  1749. align: "center",
  1750. columnLabel: 'PLM物料编码',
  1751. columnHidden: false,
  1752. columnImage: false,
  1753. status: true,
  1754. fixed: '',
  1755. columnWidth: 120
  1756. },
  1757. {
  1758. columnProp: 'ifsPartNo',
  1759. headerAlign: "center",
  1760. align: "center",
  1761. columnLabel: 'IFS物料编码',
  1762. columnHidden: false,
  1763. columnImage: false,
  1764. status: true,
  1765. fixed: '',
  1766. columnWidth: 120
  1767. },
  1768. {
  1769. columnProp: 'partDesc',
  1770. headerAlign: "center",
  1771. align: "left",
  1772. columnLabel: '物料名称',
  1773. columnHidden: false,
  1774. columnImage: false,
  1775. status: true,
  1776. fixed: '',
  1777. columnWidth: 300
  1778. },
  1779. {
  1780. columnProp: 'familyName',
  1781. headerAlign: "center",
  1782. align: "center",
  1783. columnLabel: '物料分类',
  1784. columnHidden: false,
  1785. columnImage: false,
  1786. status: true,
  1787. fixed: '',
  1788. columnWidth: 100
  1789. },
  1790. {
  1791. columnProp: 'printUnit',
  1792. headerAlign: "center",
  1793. align: "left",
  1794. columnLabel: '计量单位',
  1795. columnHidden: false,
  1796. columnImage: false,
  1797. status: true,
  1798. fixed: '',
  1799. columnWidth: 100
  1800. },
  1801. {
  1802. columnProp: 'spec',
  1803. headerAlign: "center",
  1804. align: "left",
  1805. columnLabel: '规格型号',
  1806. columnHidden: false,
  1807. columnImage: false,
  1808. status: true,
  1809. fixed: '',
  1810. columnWidth: 100
  1811. },
  1812. {
  1813. columnProp: 'partType',
  1814. headerAlign: "center",
  1815. align: "center",
  1816. columnLabel: '零件类型',
  1817. columnHidden: false,
  1818. columnImage: false,
  1819. status: true,
  1820. fixed: '',
  1821. columnWidth: 150
  1822. }
  1823. ],
  1824. componentOperationColumnList: [
  1825. {
  1826. columnProp: 'operationNo',
  1827. headerAlign: "center",
  1828. align: "center",
  1829. columnLabel: '工序编码',
  1830. columnHidden: false,
  1831. columnImage: false,
  1832. columnSortable: false,
  1833. sortLv: 0,
  1834. status: true,
  1835. fixed: '',
  1836. columnWidth: 100
  1837. },
  1838. {
  1839. columnProp: 'operationName',
  1840. headerAlign: "center",
  1841. align: "center",
  1842. columnLabel: '工序名称',
  1843. columnHidden: false,
  1844. columnImage: false,
  1845. columnSortable: false,
  1846. sortLv: 0,
  1847. status: true,
  1848. fixed: '',
  1849. columnWidth: 200
  1850. }
  1851. ],
  1852. columnSubDetailList: [
  1853. {
  1854. userId: this.$store.state.user.name,
  1855. functionId: 104003,
  1856. serialNumber: '104003Table2OperationNo',
  1857. tableId: '104003Table2',
  1858. tableName: 'Routing工序表',
  1859. columnProp: 'operationNo',
  1860. headerAlign: 'center',
  1861. align: 'center',
  1862. columnLabel: '工序编码',
  1863. columnHidden: false,
  1864. columnImage: false,
  1865. columnSortable: false,
  1866. sortLv: 0,
  1867. status: true,
  1868. fixed: '',
  1869. columnWidth: 100
  1870. },
  1871. {
  1872. userId: this.$store.state.user.name,
  1873. functionId: 104003,
  1874. serialNumber: '104003Table2OperationName',
  1875. tableId: '104003Table2',
  1876. tableName: 'Routing工序表',
  1877. columnProp: 'operationName',
  1878. headerAlign: 'center',
  1879. align: 'left',
  1880. columnLabel: '工序名称',
  1881. columnHidden: false,
  1882. columnImage: false,
  1883. columnSortable: false,
  1884. sortLv: 0,
  1885. status: true,
  1886. fixed: '',
  1887. columnWidth: 150
  1888. },
  1889. {
  1890. userId: this.$store.state.user.name,
  1891. functionId: 104003,
  1892. serialNumber: '104003Table2EfficiencyFactor',
  1893. tableId: '104003Table2',
  1894. tableName: 'Routing工序表',
  1895. columnProp: 'efficiencyFactor',
  1896. headerAlign: 'center',
  1897. align: 'right',
  1898. columnLabel: '效率%',
  1899. columnHidden: false,
  1900. columnImage: false,
  1901. columnSortable: false,
  1902. sortLv: 0,
  1903. status: true,
  1904. fixed: '',
  1905. columnWidth: 100
  1906. },
  1907. {
  1908. userId: this.$store.state.user.name,
  1909. functionId: 104003,
  1910. serialNumber: '104003Table2MachRunFactor',
  1911. tableId: '104003Table2',
  1912. tableName: 'Routing工序表',
  1913. columnProp: 'machRunFactor',
  1914. headerAlign: 'center',
  1915. align: 'right',
  1916. columnLabel: '机器单位产出',
  1917. columnHidden: false,
  1918. columnImage: false,
  1919. columnSortable: false,
  1920. sortLv: 0,
  1921. status: true,
  1922. fixed: '',
  1923. columnWidth: 100
  1924. },
  1925. {
  1926. userId: this.$store.state.user.name,
  1927. functionId: 104003,
  1928. serialNumber: '104003Table2MachSetupTime',
  1929. tableId: '104003Table2',
  1930. tableName: 'Routing工序表',
  1931. columnProp: 'machSetupTime',
  1932. headerAlign: 'center',
  1933. align: 'right',
  1934. columnLabel: '机器调机时间',
  1935. columnHidden: false,
  1936. columnImage: false,
  1937. columnSortable: false,
  1938. sortLv: 0,
  1939. status: true,
  1940. fixed: '',
  1941. columnWidth: 100
  1942. },
  1943. {
  1944. userId: this.$store.state.user.name,
  1945. functionId: 104003,
  1946. serialNumber: '104003Table2RunTimeCodeDesc',
  1947. tableId: '104003Table2',
  1948. tableName: 'Routing工序表',
  1949. columnProp: 'runTimeCodeDesc',
  1950. headerAlign: 'center',
  1951. align: 'center',
  1952. columnLabel: '产出单位',
  1953. columnHidden: false,
  1954. columnImage: false,
  1955. columnSortable: false,
  1956. sortLv: 0,
  1957. status: true,
  1958. fixed: '',
  1959. columnWidth: 100
  1960. },
  1961. {
  1962. userId: this.$store.state.user.name,
  1963. functionId: 104003,
  1964. serialNumber: '104003Table2LaborRunFactor',
  1965. tableId: '104003Table2',
  1966. tableName: 'Routing工序表',
  1967. columnProp: 'laborRunFactor',
  1968. headerAlign: 'center',
  1969. align: 'right',
  1970. columnLabel: '人工单位产出',
  1971. columnHidden: false,
  1972. columnImage: false,
  1973. columnSortable: false,
  1974. sortLv: 0,
  1975. status: true,
  1976. fixed: '',
  1977. columnWidth: 100
  1978. },
  1979. {
  1980. userId: this.$store.state.user.name,
  1981. functionId: 104003,
  1982. serialNumber: '104003Table2LaborSetupTime',
  1983. tableId: '104003Table2',
  1984. tableName: 'Routing工序表',
  1985. columnProp: 'laborSetupTime',
  1986. headerAlign: 'center',
  1987. align: 'right',
  1988. columnLabel: '人工调机时间',
  1989. columnHidden: false,
  1990. columnImage: false,
  1991. columnSortable: false,
  1992. sortLv: 0,
  1993. status: true,
  1994. fixed: '',
  1995. columnWidth: 100
  1996. },
  1997. {
  1998. userId: this.$store.state.user.name,
  1999. functionId: 104003,
  2000. serialNumber: '104003Table2CrewSize',
  2001. tableId: '104003Table2',
  2002. tableName: 'Routing工序表',
  2003. columnProp: 'crewSize',
  2004. headerAlign: 'center',
  2005. align: 'right',
  2006. columnLabel: '生产过程人数',
  2007. columnHidden: false,
  2008. columnImage: false,
  2009. columnSortable: false,
  2010. sortLv: 0,
  2011. status: true,
  2012. fixed: '',
  2013. columnWidth: 100
  2014. },
  2015. {
  2016. userId: this.$store.state.user.name,
  2017. functionId: 104003,
  2018. serialNumber: '104003Table2SetupCrewSize',
  2019. tableId: '104003Table2',
  2020. tableName: 'Routing工序表',
  2021. columnProp: 'setupCrewSize',
  2022. headerAlign: 'center',
  2023. align: 'right',
  2024. columnLabel: '调机过程人数',
  2025. columnHidden: false,
  2026. columnImage: false,
  2027. columnSortable: false,
  2028. sortLv: 0,
  2029. status: true,
  2030. fixed: '',
  2031. columnWidth: 100
  2032. },
  2033. {
  2034. userId: this.$store.state.user.name,
  2035. functionId: 104003,
  2036. serialNumber: '104003Table2OutsideOpItem',
  2037. tableId: '104003Table2',
  2038. tableName: 'Routing工序表',
  2039. columnProp: 'outsideOpItem',
  2040. headerAlign: 'center',
  2041. align: 'center',
  2042. columnLabel: '外协采购料号',
  2043. columnHidden: false,
  2044. columnImage: false,
  2045. columnSortable: false,
  2046. sortLv: 0,
  2047. status: true,
  2048. fixed: '',
  2049. columnWidth: 120
  2050. },
  2051. {
  2052. userId: this.$store.state.user.name,
  2053. functionId: 104003,
  2054. serialNumber: '104003Table2WorkCenterNo',
  2055. tableId: '104003Table2',
  2056. tableName: 'Routing工序表',
  2057. columnProp: 'workCenterNo',
  2058. headerAlign: 'center',
  2059. align: 'center',
  2060. columnLabel: '加工中心编码',
  2061. columnHidden: false,
  2062. columnImage: false,
  2063. columnSortable: false,
  2064. sortLv: 0,
  2065. status: true,
  2066. fixed: '',
  2067. columnWidth: 100
  2068. },
  2069. {
  2070. userId: this.$store.state.user.name,
  2071. functionId: 104003,
  2072. serialNumber: '104003Table2WorkCenterDesc',
  2073. tableId: '104003Table2',
  2074. tableName: 'Routing工序表',
  2075. columnProp: 'workCenterDesc',
  2076. headerAlign: 'center',
  2077. align: 'left',
  2078. columnLabel: '加工中心名称',
  2079. columnHidden: false,
  2080. columnImage: false,
  2081. columnSortable: false,
  2082. sortLv: 0,
  2083. status: true,
  2084. fixed: '',
  2085. columnWidth: 200
  2086. },
  2087. {
  2088. userId: this.$store.state.user.name,
  2089. functionId: 104003,
  2090. serialNumber: '104003Table2WorkCenterType',
  2091. tableId: '104003Table2',
  2092. tableName: 'Routing工序表',
  2093. columnProp: 'workCenterType',
  2094. headerAlign: 'center',
  2095. align: 'center',
  2096. columnLabel: '加工中心类型',
  2097. columnHidden: false,
  2098. columnImage: false,
  2099. columnSortable: false,
  2100. sortLv: 0,
  2101. status: true,
  2102. fixed: '',
  2103. columnWidth: 100
  2104. },
  2105. {
  2106. userId: this.$store.state.user.name,
  2107. functionId: 104003,
  2108. serialNumber: '104003Table2LaborClassNo',
  2109. tableId: '104003Table2',
  2110. tableName: 'Routing工序表',
  2111. columnProp: 'laborClassNo',
  2112. headerAlign: 'center',
  2113. align: 'left',
  2114. columnLabel: '人员等级编码',
  2115. columnHidden: false,
  2116. columnImage: false,
  2117. columnSortable: false,
  2118. sortLv: 0,
  2119. status: true,
  2120. fixed: '',
  2121. columnWidth: 100
  2122. },
  2123. {
  2124. userId: this.$store.state.user.name,
  2125. functionId: 104003,
  2126. serialNumber: '104003Table2LaborClassDesc',
  2127. tableId: '104003Table2',
  2128. tableName: 'Routing工序表',
  2129. columnProp: 'laborClassDesc',
  2130. headerAlign: 'center',
  2131. align: 'left',
  2132. columnLabel: '人员等级名称',
  2133. columnHidden: false,
  2134. columnImage: false,
  2135. columnSortable: false,
  2136. sortLv: 0,
  2137. status: true,
  2138. fixed: '',
  2139. columnWidth: 120
  2140. },
  2141. {
  2142. userId: this.$store.state.user.name,
  2143. functionId: 104003,
  2144. serialNumber: '104003Table2SetupLaborClassNo',
  2145. tableId: '104003Table2',
  2146. tableName: 'Routing工序表',
  2147. columnProp: 'setupLaborClassNo',
  2148. headerAlign: 'center',
  2149. align: 'left',
  2150. columnLabel: '调机时人员等级编码',
  2151. columnHidden: false,
  2152. columnImage: false,
  2153. columnSortable: false,
  2154. sortLv: 0,
  2155. status: true,
  2156. fixed: '',
  2157. columnWidth: 120
  2158. },
  2159. {
  2160. userId: this.$store.state.user.name,
  2161. functionId: 104003,
  2162. serialNumber: '104003Table2SetupLaborClassDesc',
  2163. tableId: '104003Table2',
  2164. tableName: 'Routing工序表',
  2165. columnProp: 'setupLaborClassDesc',
  2166. headerAlign: 'center',
  2167. align: 'left',
  2168. columnLabel: '调机时人员等级名称',
  2169. columnHidden: false,
  2170. columnImage: false,
  2171. columnSortable: false,
  2172. sortLv: 0,
  2173. status: true,
  2174. fixed: '',
  2175. columnWidth: 120
  2176. },
  2177. {
  2178. userId: this.$store.state.user.name,
  2179. functionId: 104003,
  2180. serialNumber: '104003Table2NoteText',
  2181. tableId: '104003Table2',
  2182. tableName: 'Routing工序表',
  2183. columnProp: 'noteText',
  2184. headerAlign: 'center',
  2185. align: 'left',
  2186. columnLabel: '备注',
  2187. columnHidden: false,
  2188. columnImage: false,
  2189. columnSortable: false,
  2190. sortLv: 0,
  2191. status: true,
  2192. fixed: '',
  2193. columnWidth: 200
  2194. },
  2195. ],
  2196. columnRoutingToolList: [
  2197. {
  2198. userId: this.$store.state.user.name,
  2199. functionId: 104003,
  2200. serialNumber: '104003Table3AlternativeNo',
  2201. tableId: '104003Table3',
  2202. tableName: 'Routing工具表',
  2203. columnProp: 'alternativeNo',
  2204. headerAlign: 'center',
  2205. align: 'center',
  2206. columnLabel: '替代编码',
  2207. columnHidden: false,
  2208. columnImage: false,
  2209. columnSortable: false,
  2210. sortLv: 0,
  2211. status: true,
  2212. fixed: '',
  2213. columnWidth: 80
  2214. },
  2215. {
  2216. userId: this.$store.state.user.name,
  2217. functionId: 104003,
  2218. serialNumber: '104003Table3AlternativeDescription',
  2219. tableId: '104003Table3',
  2220. tableName: 'Routing工具表',
  2221. columnProp: 'alternativeDescription',
  2222. headerAlign: 'center',
  2223. align: 'center',
  2224. columnLabel: '替代名称',
  2225. columnHidden: false,
  2226. columnImage: false,
  2227. columnSortable: false,
  2228. sortLv: 0,
  2229. status: true,
  2230. fixed: '',
  2231. columnWidth: 100
  2232. },
  2233. {
  2234. userId: this.$store.state.user.name,
  2235. functionId: 104003,
  2236. serialNumber: '104003Table3OperationNo',
  2237. tableId: '104003Table3',
  2238. tableName: 'Routing工具表',
  2239. columnProp: 'operationNo',
  2240. headerAlign: 'center',
  2241. align: 'center',
  2242. columnLabel: '工序编码',
  2243. columnHidden: false,
  2244. columnImage: false,
  2245. columnSortable: false,
  2246. sortLv: 0,
  2247. status: true,
  2248. fixed: '',
  2249. columnWidth: 80
  2250. },
  2251. {
  2252. userId: this.$store.state.user.name,
  2253. functionId: 104003,
  2254. serialNumber: '104003Table3OperationName',
  2255. tableId: '104003Table3',
  2256. tableName: 'Routing工具表',
  2257. columnProp: 'operationName',
  2258. headerAlign: 'center',
  2259. align: 'center',
  2260. columnLabel: '工序名称',
  2261. columnHidden: false,
  2262. columnImage: false,
  2263. columnSortable: false,
  2264. sortLv: 0,
  2265. status: true,
  2266. fixed: '',
  2267. columnWidth: 100
  2268. },
  2269. {
  2270. userId: this.$store.state.user.name,
  2271. functionId: 104003,
  2272. serialNumber: '104003Table3ToolId',
  2273. tableId: '104003Table3',
  2274. tableName: 'Routing工具表',
  2275. columnProp: 'toolId',
  2276. headerAlign: 'center',
  2277. align: 'center',
  2278. columnLabel: '工具编码',
  2279. columnHidden: false,
  2280. columnImage: false,
  2281. columnSortable: false,
  2282. sortLv: 0,
  2283. status: true,
  2284. fixed: '',
  2285. columnWidth: 80
  2286. },
  2287. {
  2288. userId: this.$store.state.user.name,
  2289. functionId: 104003,
  2290. serialNumber: '104003Table3ToolDescription',
  2291. tableId: '104003Table3',
  2292. tableName: 'Routing工具表',
  2293. columnProp: 'toolDescription',
  2294. headerAlign: 'center',
  2295. align: 'center',
  2296. columnLabel: '工具名称',
  2297. columnHidden: false,
  2298. columnImage: false,
  2299. columnSortable: false,
  2300. sortLv: 0,
  2301. status: true,
  2302. fixed: '',
  2303. columnWidth: 100
  2304. },
  2305. {
  2306. userId: this.$store.state.user.name,
  2307. functionId: 104003,
  2308. serialNumber: '104003Table3ToolQty',
  2309. tableId: '104003Table3',
  2310. tableName: 'Routing工具表',
  2311. columnProp: 'toolQty',
  2312. headerAlign: 'center',
  2313. align: 'center',
  2314. columnLabel: '工具数量',
  2315. columnHidden: false,
  2316. columnImage: false,
  2317. columnSortable: false,
  2318. sortLv: 0,
  2319. status: true,
  2320. fixed: '',
  2321. columnWidth: 60
  2322. },
  2323. {
  2324. userId: this.$store.state.user.name,
  2325. functionId: 104003,
  2326. serialNumber: '104003Table3Remark',
  2327. tableId: '104003Table3',
  2328. tableName: 'Routing工具表',
  2329. columnProp: 'remark',
  2330. headerAlign: 'center',
  2331. align: 'center',
  2332. columnLabel: '备注',
  2333. columnHidden: false,
  2334. columnImage: false,
  2335. columnSortable: false,
  2336. sortLv: 0,
  2337. status: true,
  2338. fixed: '',
  2339. columnWidth: 150
  2340. },
  2341. ],
  2342. columnRoutingDetailList: [
  2343. {
  2344. columnProp: 'alternativeNo',
  2345. headerAlign: "center",
  2346. align: "center",
  2347. columnLabel: '替代编码',
  2348. columnHidden: false,
  2349. columnImage: false,
  2350. columnSortable: false,
  2351. sortLv: 0,
  2352. status: true,
  2353. fixed: '',
  2354. },
  2355. {
  2356. columnProp: 'alternativeDescription',
  2357. headerAlign: "center",
  2358. align: "center",
  2359. columnLabel: '替代名称',
  2360. columnHidden: false,
  2361. columnImage: false,
  2362. columnSortable: false,
  2363. sortLv: 0,
  2364. status: true,
  2365. fixed: '',
  2366. },
  2367. {
  2368. columnProp: 'status',
  2369. headerAlign: "center",
  2370. align: "center",
  2371. columnLabel: '状态',
  2372. columnHidden: false,
  2373. columnImage: false,
  2374. columnSortable: false,
  2375. sortLv: 0,
  2376. status: true,
  2377. fixed: '',
  2378. },
  2379. ],
  2380. workGuidelineColumnList: [
  2381. {
  2382. userId: this.$store.state.user.name,
  2383. functionId: 104003,
  2384. serialNumber: '104003Table4GuidelineSeq',
  2385. tableId: '104003Table4',
  2386. tableName: 'workGuideline表',
  2387. columnProp: 'guidelineSeq',
  2388. headerAlign: 'center',
  2389. align: 'right',
  2390. columnLabel: '序号',
  2391. columnHidden: false,
  2392. columnImage: false,
  2393. columnSortable: false,
  2394. sortLv: 0,
  2395. status: true,
  2396. fixed: '',
  2397. columnWidth: 60
  2398. },
  2399. {
  2400. userId: this.$store.state.user.name,
  2401. functionId: 104003,
  2402. serialNumber: '104003Table4GuidelineDesc',
  2403. tableId: '104003Table4',
  2404. tableName: 'workGuideline表',
  2405. columnProp: 'guidelineDesc',
  2406. headerAlign: 'center',
  2407. align: 'left',
  2408. columnLabel: '工艺指导名称',
  2409. columnHidden: false,
  2410. columnImage: false,
  2411. columnSortable: false,
  2412. sortLv: 0,
  2413. status: true,
  2414. fixed: '',
  2415. columnWidth: 120
  2416. },
  2417. {
  2418. userId: this.$store.state.user.name,
  2419. functionId: 104003,
  2420. serialNumber: '104003Table4GuidelineText',
  2421. tableId: '104003Table4',
  2422. tableName: 'workGuideline表',
  2423. columnProp: 'guidelineText',
  2424. headerAlign: 'center',
  2425. align: 'left',
  2426. columnLabel: '工艺指导描述',
  2427. columnHidden: false,
  2428. columnImage: false,
  2429. columnSortable: false,
  2430. sortLv: 0,
  2431. status: true,
  2432. fixed: '',
  2433. columnWidth: 200
  2434. },
  2435. {
  2436. userId: this.$store.state.user.name,
  2437. functionId: 104003,
  2438. serialNumber: '104003Table4GuidelineType',
  2439. tableId: '104003Table4',
  2440. tableName: 'workGuideline表',
  2441. columnProp: 'guidelineType',
  2442. headerAlign: 'center',
  2443. align: 'center',
  2444. columnLabel: '工艺指导类型',
  2445. columnHidden: false,
  2446. columnImage: false,
  2447. columnSortable: false,
  2448. sortLv: 0,
  2449. status: true,
  2450. fixed: '',
  2451. columnWidth: 120
  2452. },
  2453. {
  2454. userId: this.$store.state.user.name,
  2455. functionId: 104003,
  2456. serialNumber: '104003Table4SignOffRequired',
  2457. tableId: '104003Table4',
  2458. tableName: 'workGuideline表',
  2459. columnProp: 'signOffRequired',
  2460. headerAlign: 'center',
  2461. align: 'center',
  2462. columnLabel: '签字',
  2463. columnHidden: false,
  2464. columnImage: false,
  2465. columnSortable: false,
  2466. sortLv: 0,
  2467. status: true,
  2468. fixed: '',
  2469. columnWidth: 150
  2470. },
  2471. {
  2472. userId: this.$store.state.user.name,
  2473. functionId: 104003,
  2474. serialNumber: '104003Table4InspectionSignOffRequired',
  2475. tableId: '104003Table4',
  2476. tableName: 'workGuideline表',
  2477. columnProp: 'inspectionSignOffRequired',
  2478. headerAlign: 'center',
  2479. align: 'center',
  2480. columnLabel: '检验签字',
  2481. columnHidden: false,
  2482. columnImage: false,
  2483. columnSortable: false,
  2484. sortLv: 0,
  2485. status: true,
  2486. fixed: '',
  2487. columnWidth: 150
  2488. },
  2489. {
  2490. userId: this.$store.state.user.name,
  2491. functionId: 104003,
  2492. serialNumber: '104003Table4CreateDate',
  2493. tableId: '104003Table4',
  2494. tableName: 'BOM信息表',
  2495. columnProp: 'createDate',
  2496. headerAlign: 'center',
  2497. align: 'center',
  2498. columnLabel: '创建时间',
  2499. columnHidden: false,
  2500. columnImage: false,
  2501. columnSortable: false,
  2502. sortLv: 0,
  2503. status: true,
  2504. fixed: '',
  2505. columnWidth: 130
  2506. },
  2507. {
  2508. userId: this.$store.state.user.name,
  2509. functionId: 104003,
  2510. serialNumber: '104003Table4CreateBy',
  2511. tableId: '104003Table4',
  2512. tableName: 'BOM信息表',
  2513. columnProp: 'createBy',
  2514. headerAlign: 'center',
  2515. align: 'center',
  2516. columnLabel: '创建人',
  2517. columnHidden: false,
  2518. columnImage: false,
  2519. columnSortable: false,
  2520. sortLv: 0,
  2521. status: true,
  2522. fixed: '',
  2523. columnWidth: 80
  2524. },
  2525. {
  2526. userId: this.$store.state.user.name,
  2527. functionId: 104003,
  2528. serialNumber: '104003Table4UpdateDate',
  2529. tableId: '104003Table4',
  2530. tableName: 'BOM信息表',
  2531. columnProp: 'updateDate',
  2532. headerAlign: 'center',
  2533. align: 'center',
  2534. columnLabel: '更新时间',
  2535. columnHidden: false,
  2536. columnImage: false,
  2537. columnSortable: false,
  2538. sortLv: 0,
  2539. status: true,
  2540. fixed: '',
  2541. columnWidth: 130
  2542. },
  2543. {
  2544. userId: this.$store.state.user.name,
  2545. functionId: 104003,
  2546. serialNumber: '104003Table4UpdateBy',
  2547. tableId: '104003Table4',
  2548. tableName: 'BOM信息表',
  2549. columnProp: 'updateBy',
  2550. headerAlign: 'center',
  2551. align: 'center',
  2552. columnLabel: '更新人',
  2553. columnHidden: false,
  2554. columnImage: false,
  2555. columnSortable: false,
  2556. sortLv: 0,
  2557. status: true,
  2558. fixed: '',
  2559. columnWidth: 80
  2560. }
  2561. ],
  2562. workCenterColumnList: [
  2563. {
  2564. userId: this.$store.state.user.name,
  2565. tableName: '加工中心表',
  2566. columnProp: 'workCenterNo',
  2567. headerAlign: "center",
  2568. align: "left",
  2569. columnLabel: '编码',
  2570. columnHidden: false,
  2571. columnImage: false,
  2572. status: true,
  2573. fixed: '',
  2574. columnWidth: 100
  2575. },
  2576. {
  2577. userId: this.$store.state.user.name,
  2578. tableName: '加工中心表',
  2579. columnProp: 'workCenterDesc',
  2580. headerAlign: "center",
  2581. align: "left",
  2582. columnLabel: '名称',
  2583. columnHidden: false,
  2584. columnImage: false,
  2585. status: true,
  2586. fixed: '',
  2587. columnWidth: 200
  2588. },
  2589. {
  2590. userId: this.$store.state.user.name,
  2591. tableName: '加工中心表',
  2592. columnProp: 'workCenterType',
  2593. headerAlign: "center",
  2594. align: "left",
  2595. columnLabel: '类型',
  2596. columnHidden: false,
  2597. columnImage: false,
  2598. status: true,
  2599. fixed: '',
  2600. columnWidth: 100
  2601. },
  2602. ],
  2603. workerLevelColumnList: [
  2604. {
  2605. userId: this.$store.state.user.name,
  2606. columnProp: 'levelId',
  2607. headerAlign: "center",
  2608. align: "left",
  2609. columnLabel: '编码',
  2610. columnHidden: false,
  2611. columnImage: false,
  2612. status: true,
  2613. fixed: '',
  2614. columnWidth: 100
  2615. },
  2616. {
  2617. userId: this.$store.state.user.name,
  2618. columnProp: 'levelDesc',
  2619. headerAlign: "center",
  2620. align: "left",
  2621. columnLabel: '名称',
  2622. columnHidden: false,
  2623. columnImage: false,
  2624. status: true,
  2625. fixed: '',
  2626. columnWidth: 200
  2627. }
  2628. ],
  2629. componentPartColumnList: [
  2630. {
  2631. columnProp: 'plmPartNo',
  2632. headerAlign: "center",
  2633. align: "center",
  2634. columnLabel: 'PLM物料编码',
  2635. columnHidden: false,
  2636. columnImage: false,
  2637. status: true,
  2638. fixed: '',
  2639. columnWidth: 100
  2640. },
  2641. {
  2642. columnProp: 'ifsPartNo',
  2643. headerAlign: "center",
  2644. align: "center",
  2645. columnLabel: 'IFS物料编码',
  2646. columnHidden: false,
  2647. columnImage: false,
  2648. status: true,
  2649. fixed: '',
  2650. columnWidth: 100
  2651. },
  2652. {
  2653. columnProp: 'partDesc',
  2654. headerAlign: "center",
  2655. align: "left",
  2656. columnLabel: '物料名称',
  2657. columnHidden: false,
  2658. columnImage: false,
  2659. status: true,
  2660. fixed: '',
  2661. columnWidth: 300
  2662. },
  2663. {
  2664. columnProp: 'familyName',
  2665. headerAlign: "center",
  2666. align: "center",
  2667. columnLabel: '物料分类',
  2668. columnHidden: false,
  2669. columnImage: false,
  2670. status: true,
  2671. fixed: '',
  2672. columnWidth: 100
  2673. },
  2674. {
  2675. columnProp: 'printUnit',
  2676. headerAlign: "center",
  2677. align: "left",
  2678. columnLabel: '计量单位',
  2679. columnHidden: false,
  2680. columnImage: false,
  2681. status: true,
  2682. fixed: '',
  2683. columnWidth: 100
  2684. },
  2685. {
  2686. columnProp: 'spec',
  2687. headerAlign: "center",
  2688. align: "left",
  2689. columnLabel: '规格型号',
  2690. columnHidden: false,
  2691. columnImage: false,
  2692. status: true,
  2693. fixed: '',
  2694. columnWidth: 100
  2695. },
  2696. {
  2697. columnProp: 'partType',
  2698. headerAlign: "center",
  2699. align: "center",
  2700. columnLabel: '零件类型',
  2701. columnHidden: false,
  2702. columnImage: false,
  2703. status: true,
  2704. fixed: '',
  2705. columnWidth: 150
  2706. }
  2707. ],
  2708. toolColumnList: [
  2709. {
  2710. columnProp: 'toolId',
  2711. headerAlign: "center",
  2712. align: "left",
  2713. columnLabel: '工具编码',
  2714. columnHidden: false,
  2715. columnImage: false,
  2716. status: true,
  2717. fixed: '',
  2718. columnWidth: 100
  2719. },
  2720. {
  2721. columnProp: 'toolDescription',
  2722. headerAlign: "center",
  2723. align: "left",
  2724. columnLabel: '工具名称',
  2725. columnHidden: false,
  2726. columnImage: false,
  2727. status: true,
  2728. fixed: '',
  2729. columnWidth: 200
  2730. },
  2731. ],
  2732. // ======== 必填规则 ========
  2733. rules: {
  2734. partNo: [
  2735. {
  2736. required: true,
  2737. message: ' ',
  2738. trigger: ['blur', 'change']
  2739. }
  2740. ],
  2741. partDesc: [
  2742. {
  2743. required: true,
  2744. message: ' ',
  2745. trigger: ['blur', 'change']
  2746. }
  2747. ],
  2748. routingType: [
  2749. {
  2750. required: true,
  2751. message: ' ',
  2752. trigger: ['blur', 'change']
  2753. }
  2754. ],
  2755. phaseInDate: [
  2756. {
  2757. required: true,
  2758. message: ' ',
  2759. trigger: ['blur', 'change']
  2760. }
  2761. ],
  2762. routingRevision: [
  2763. {
  2764. required: true,
  2765. message: ' ',
  2766. trigger: ['blur', 'change']
  2767. }
  2768. ]
  2769. },
  2770. detailRules: {
  2771. alternativeNo: [
  2772. {
  2773. required: true,
  2774. message: ' ',
  2775. trigger: ['blur', 'change']
  2776. }
  2777. ],
  2778. alternativeDescription: [
  2779. {
  2780. required: true,
  2781. message: ' ',
  2782. trigger: ['blur', 'change']
  2783. }
  2784. ],
  2785. status: [
  2786. {
  2787. required: true,
  2788. message: ' ',
  2789. trigger: ['blur', 'change']
  2790. }
  2791. ]
  2792. },
  2793. componentRules: {
  2794. operationNo: [
  2795. {
  2796. required: true,
  2797. message: ' ',
  2798. trigger: ['blur', 'change']
  2799. }
  2800. ],
  2801. operationName: [
  2802. {
  2803. required: true,
  2804. message: ' ',
  2805. trigger: ['blur', 'change']
  2806. }
  2807. ],
  2808. workCenterNo: [
  2809. {
  2810. required: true,
  2811. message: ' ',
  2812. trigger: ['blur', 'change']
  2813. }
  2814. ],
  2815. machSetupTime: [
  2816. {
  2817. required: true,
  2818. message: ' ',
  2819. trigger: ['blur', 'change']
  2820. }
  2821. ],
  2822. laborSetupTime: [
  2823. {
  2824. required: true,
  2825. message: ' ',
  2826. trigger: ['blur', 'change']
  2827. }
  2828. ],
  2829. setupLaborClassNo: [
  2830. {
  2831. required: true,
  2832. message: ' ',
  2833. trigger: ['blur', 'change']
  2834. }
  2835. ],
  2836. setupCrewSize: [
  2837. {
  2838. required: true,
  2839. message: ' ',
  2840. trigger: ['blur', 'change']
  2841. }
  2842. ],
  2843. machRunFactor: [
  2844. {
  2845. required: true,
  2846. message: ' ',
  2847. trigger: ['blur', 'change']
  2848. }
  2849. ],
  2850. laborRunFactor: [
  2851. {
  2852. required: true,
  2853. message: ' ',
  2854. trigger: ['blur', 'change']
  2855. }
  2856. ],
  2857. runTimeCode: [
  2858. {
  2859. required: true,
  2860. message: ' ',
  2861. trigger: ['blur', 'change']
  2862. }
  2863. ],
  2864. laborClassNo: [
  2865. {
  2866. required: true,
  2867. message: ' ',
  2868. trigger: ['blur', 'change']
  2869. }
  2870. ],
  2871. efficiencyFactor: [
  2872. {
  2873. required: true,
  2874. message: ' ',
  2875. trigger: ['blur', 'change']
  2876. }
  2877. ],
  2878. crewSize: [
  2879. {
  2880. required: true,
  2881. message: ' ',
  2882. trigger: ['blur', 'change']
  2883. }
  2884. ]
  2885. },
  2886. guidelineRules: {
  2887. guidelineSeq: [
  2888. {
  2889. required: true,
  2890. message: ' ',
  2891. trigger: ['blur', 'change']
  2892. }
  2893. ],
  2894. guidelineDesc: [
  2895. {
  2896. required: true,
  2897. message: ' ',
  2898. trigger: ['blur', 'change']
  2899. }
  2900. ],
  2901. guidelineType: [
  2902. {
  2903. required: true,
  2904. message: ' ',
  2905. trigger: ['blur', 'change']
  2906. }
  2907. ],
  2908. signOffRequired: [
  2909. {
  2910. required: true,
  2911. message: ' ',
  2912. trigger: ['blur', 'change']
  2913. }
  2914. ],
  2915. inspectionSignOffRequired: [
  2916. {
  2917. required: true,
  2918. message: ' ',
  2919. trigger: ['blur', 'change']
  2920. }
  2921. ],
  2922. guidelineText: [
  2923. {
  2924. required: true,
  2925. message: ' ',
  2926. trigger: ['blur', 'change']
  2927. }
  2928. ]
  2929. },
  2930. RoutingToolRules: {
  2931. alternativeNo: [
  2932. {
  2933. required: true,
  2934. message: ' ',
  2935. trigger: ['blur', 'change']
  2936. }
  2937. ],
  2938. toolQty: [
  2939. {
  2940. required: true,
  2941. message: ' ',
  2942. trigger: ['blur', 'change']
  2943. }
  2944. ],
  2945. operationNo: [
  2946. {
  2947. required: true,
  2948. message: ' ',
  2949. trigger: ['blur', 'change']
  2950. }
  2951. ],
  2952. toolId: [
  2953. {
  2954. required: true,
  2955. message: ' ',
  2956. trigger: ['blur', 'change']
  2957. }
  2958. ],
  2959. },
  2960. // ======== 复选数据集 ========
  2961. routingSelections: [],
  2962. workGuidelineSelections: [],
  2963. // ======== 模态框开关控制 ========
  2964. modalFlag: false,
  2965. modalDisableFlag: false,
  2966. partModelFlag: false,
  2967. componentPartModelFlag: false,
  2968. saveDetailModalFlag: false,
  2969. saveDetailModalDisable: false,
  2970. componentSaveModal: false,
  2971. componentDisableFlag: false,
  2972. saveRoutingToolModal: false,
  2973. saveRoutingToolDisableModal: false,
  2974. copyRoutingModelFlag: false,
  2975. copyAlternativeModelFlag: false,
  2976. queryWorkGuidelineModal: false,
  2977. saveWorkGuidelineModal: false,
  2978. workGuidelineDisableModal: false,
  2979. headerSaveFlag: false,
  2980. copyPartModelFlag: false,
  2981. toolModelFlag: false,
  2982. guidelineLoading: false
  2983. }
  2984. },
  2985. mounted() {
  2986. this.$nextTick(() => {
  2987. this.height = window.innerHeight - 170
  2988. })
  2989. },
  2990. created() {
  2991. },
  2992. activated() {
  2993. if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote') {
  2994. this.handleQueryRoutingByQuote()
  2995. } else if (this.$route.params.partNo) {
  2996. this.searchData.plmPartNo = this.$route.params.partNo
  2997. this.getDataList()
  2998. } else if (this.initPage === false) {
  2999. this.getDataList()
  3000. }
  3001. this.initPage = true
  3002. },
  3003. // js
  3004. methods: {
  3005. // === 报价查询 ===
  3006. handleQueryRoutingByQuote() {
  3007. let params = {
  3008. site: this.$store.state.user.site,
  3009. plmPartNo: this.$route.params.partNo,
  3010. routingType: this.$route.params.routingType,
  3011. engChgLevel: this.$route.params.engChgLevel,
  3012. page: this.pageIndex,
  3013. limit: this.pageSize
  3014. }
  3015. this.queryLoading = true
  3016. routingManagementSearch(params).then(({data}) => {
  3017. if (data && data.code === 0) {
  3018. this.dataList = data.page.list
  3019. this.pageIndex = data.page.currPage
  3020. this.pageSize = data.page.pageSize
  3021. this.totalPage = data.page.totalCount
  3022. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  3023. }
  3024. this.queryLoading = false
  3025. })
  3026. },
  3027. // ======== 分页相关方法 ========
  3028. // 每页数
  3029. sizeChangeHandle(val) {
  3030. this.pageSize = val
  3031. this.pageIndex = 1
  3032. this.getDataList()
  3033. },
  3034. // 当前页
  3035. currentChangeHandle(val) {
  3036. this.pageIndex = val
  3037. this.getDataList()
  3038. },
  3039. // 每页数
  3040. sizeChangeHandle2(val) {
  3041. this.pageSize2 = val
  3042. this.pageIndex2 = 1
  3043. this.queryPartList()
  3044. },
  3045. // 当前页
  3046. currentChangeHandle2(val) {
  3047. this.pageIndex2 = val
  3048. this.queryPartList()
  3049. },
  3050. // 每页数
  3051. sizeChangeHandle3(val) {
  3052. this.pageSize3 = val
  3053. this.pageIndex3 = 1
  3054. this.queryToolList()
  3055. },
  3056. // 当前页
  3057. currentChangeHandle3(val) {
  3058. this.pageIndex3 = val
  3059. this.queryToolList()
  3060. },
  3061. // 每页数
  3062. sizeChangeHandle4(val) {
  3063. this.pageSize4 = val
  3064. this.pageIndex4 = 1
  3065. this.queryCopyPartModal()
  3066. },
  3067. // 当前页
  3068. currentChangeHandle4(val) {
  3069. this.pageIndex4 = val
  3070. this.queryCopyPartModal()
  3071. },
  3072. // 每页数
  3073. sizeChangeHandle5(val) {
  3074. this.pageSize5 = val
  3075. this.pageIndex5 = 1
  3076. this.queryWorkCenter()
  3077. },
  3078. // 当前页
  3079. currentChangeHandle5(val) {
  3080. this.pageIndex5 = val
  3081. this.queryWorkCenter()
  3082. },
  3083. // 每页数
  3084. sizeChangeHandle6(val) {
  3085. this.pageSize6 = val
  3086. this.pageIndex6 = 1
  3087. this.queryWorkerLevel1()
  3088. },
  3089. // 当前页
  3090. currentChangeHandle6(val) {
  3091. this.pageIndex6 = val
  3092. this.queryWorkerLevel1()
  3093. },
  3094. // 每页数
  3095. sizeChangeHandle7(val) {
  3096. this.pageSize7 = val
  3097. this.pageIndex7 = 1
  3098. this.queryWorkerLevel2()
  3099. },
  3100. // 当前页
  3101. currentChangeHandle7(val) {
  3102. this.pageIndex7 = val
  3103. this.queryWorkerLevel2()
  3104. },
  3105. // copy物料列表
  3106. queryCopyPartModal() {
  3107. this.copyPartData.limit = this.pageSize4
  3108. this.copyPartData.page = this.pageIndex4
  3109. // 查询所有物料
  3110. queryPartList(this.copyPartData).then(({data}) => {
  3111. if (data && data.code === 0) {
  3112. this.copyPartList = data.page.list
  3113. this.pageIndex4 = data.page.currPage
  3114. this.pageSize4 = data.page.pageSize
  3115. this.totalPage4 = data.page.totalCount
  3116. this.copyPartModelFlag = true
  3117. } else {
  3118. this.$alert(data.msg, '错误', {
  3119. confirmButtonText: '确定'
  3120. })
  3121. }
  3122. })
  3123. },
  3124. // copy物料查询列表
  3125. queryCopyPartList() {
  3126. this.copyPartData.limit = this.pageSize4
  3127. this.copyPartData.page = this.pageIndex4
  3128. // 查询所有物料
  3129. queryPartList(this.copyPartData).then(({data}) => {
  3130. if (data && data.code === 0) {
  3131. this.copyPartList = data.page.list
  3132. this.pageIndex4 = data.page.currPage
  3133. this.pageSize4 = data.page.pageSize
  3134. this.totalPage4 = data.page.totalCount
  3135. } else {
  3136. this.copyPartList = []
  3137. }
  3138. })
  3139. },
  3140. // copy物料编码失焦事件
  3141. copyPartBlur() {
  3142. if (this.copyPartData.type === '1') {
  3143. if (this.copyRoutingData.partNo != null && this.copyRoutingData.partNo !== '') {
  3144. this.copyPartData.limit = this.pageSize4
  3145. this.copyPartData.page = this.pageIndex4
  3146. this.copyPartData.partNo = this.copyRoutingData.partNo
  3147. queryPartList(this.copyPartData).then(({data}) => {
  3148. if (data && data.code === 0) {
  3149. if (data.page.list.length === 1) {
  3150. this.copyRoutingData.partDesc = data.page.list[0].partDesc
  3151. return
  3152. }
  3153. }
  3154. })
  3155. }
  3156. this.copyRoutingData.partDesc = ''
  3157. } else {
  3158. if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
  3159. this.copyPartData.limit = this.pageSize4
  3160. this.copyPartData.page = this.pageIndex4
  3161. this.copyPartData.partNo = this.copyAlternativeData.partNo
  3162. queryPartList(this.copyPartData).then(({data}) => {
  3163. if (data && data.code === 0) {
  3164. if (data.page.list.length === 1) {
  3165. this.copyAlternativeData.partDesc = data.page.list[0].partDesc
  3166. return
  3167. }
  3168. }
  3169. })
  3170. }
  3171. this.copyAlternativeData.partDesc = ''
  3172. }
  3173. },
  3174. // 双击选择copy物料
  3175. getCopyRowData(row) {
  3176. if (this.copyPartData.type === '1') {
  3177. this.copyRoutingData.partNo = row.partNo
  3178. this.copyRoutingData.partDesc = row.partDesc
  3179. this.copyRoutingTypeChange()
  3180. } else {
  3181. this.copyAlternativeData.partNo = row.partNo
  3182. this.copyAlternativeData.partDesc = row.partDesc
  3183. }
  3184. this.copyPartModelFlag = false
  3185. },
  3186. // copy BOM类型改变
  3187. copyRoutingTypeChange() {
  3188. // 获取物料的routing版本号
  3189. getRottingRevision(this.copyRoutingData).then(({data}) => {
  3190. if (data && data.code === 0) {
  3191. this.copyRoutingData.routingRevision = data.routingRevision
  3192. } else {
  3193. this.copyRoutingData.routingRevision = ''
  3194. }
  3195. })
  3196. },
  3197. // ======== 页签切换相关方法 ========
  3198. // 明细页签选择替换
  3199. tabDetailClick(tab, event) {
  3200. // 刷新列表数据
  3201. this.refreshDetailTable()
  3202. },
  3203. // 子明细页签选择替换
  3204. tabSubDetailClick(tab, event) {
  3205. // 刷新列表数据
  3206. this.refreshSubDetailTable()
  3207. },
  3208. // 刷新明细页签的table数据
  3209. refreshDetailTable() {
  3210. if (this.detailTable === 'routing_detail') {
  3211. } else if (this.detailTable === 'routing_tool') {
  3212. this.searchRoutingTools()
  3213. }
  3214. },
  3215. // 刷新子明细页签的table数据
  3216. refreshSubDetailTable() {
  3217. if (this.subDetailTable === 'routing_sub_detail') {
  3218. }
  3219. },
  3220. // ======== 列表数据操作方法 ========
  3221. // 获取数据列表
  3222. getDataList() {
  3223. //如果是跳转过来的 要判断
  3224. if (localStorage.getItem('routeData')) {
  3225. let data = JSON.parse(localStorage.getItem('routeData'))
  3226. this.searchData.ifsPartNo = data.partNo
  3227. this.searchData.routingType = data.routingType
  3228. this.searchData.routingRevision = data.routingRevision
  3229. }
  3230. this.searchData.limit = this.pageSize
  3231. this.searchData.page = this.pageIndex
  3232. this.queryLoading = true
  3233. routingManagementSearch(this.searchData).then(({data}) => {
  3234. if (data.code === 0) {
  3235. this.dataList = data.page.list
  3236. this.pageIndex = data.page.currPage
  3237. this.pageSize = data.page.pageSize
  3238. this.totalPage = data.page.totalCount
  3239. this.$refs.selectDiv.setLengthAll(this.dataList.length)
  3240. if (localStorage.getItem('routeData')) {
  3241. let data = JSON.parse(localStorage.getItem('routeData'))
  3242. if (data.routingRevision && data.routingRevision !== '' && data.routingRevision !== null) {
  3243. this.updateModal(this.dataList[0])
  3244. }
  3245. }
  3246. }
  3247. this.queryLoading = false
  3248. if (localStorage.getItem('routeData')) {
  3249. this.$nextTick(() => {
  3250. localStorage.removeItem('routeData')
  3251. })
  3252. }
  3253. })
  3254. },
  3255. // 复选列表信息
  3256. selectionRouting(val) {
  3257. this.routingSelections = val
  3258. this.$refs.selectDiv.setLengthselected(this.routingSelections.length)
  3259. },
  3260. // 查询 routingTools
  3261. searchRoutingTools() {
  3262. searchRoutingTools(this.modalData).then(({data}) => {
  3263. if (data && data.code === 0) {
  3264. this.routingToolList = data.rows
  3265. } else {
  3266. this.routingToolList = []
  3267. }
  3268. })
  3269. },
  3270. // ======== 新增/编辑模态框 ========
  3271. // routing新增模态框
  3272. addModal() {
  3273. this.modalData = {
  3274. flag: '1',
  3275. title: 'Routing新增',
  3276. site: this.$store.state.user.site,
  3277. partNo: '',
  3278. partDesc: '',
  3279. routingRevision: '',
  3280. routingType: 'Manufacturing',
  3281. noteText: '',
  3282. phaseInDate: new Date(+new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  3283. phaseOutDate: '',
  3284. createBy: this.$store.state.user.name,
  3285. printUnit: '',
  3286. printUnitName: '',
  3287. officialFlag: 'N'
  3288. }
  3289. this.detailData = {
  3290. site: this.$store.state.user.site,
  3291. partNo: '',
  3292. routingRevision: '',
  3293. routingType: '',
  3294. alternativeNo: '',
  3295. alternativeDescription: '',
  3296. routTemplateId: '',
  3297. planDate: '',
  3298. fixedLeadTimeDay: '',
  3299. fixedLeadTimeHour: '',
  3300. variableLeadTimeDay: '',
  3301. variableLeadTimeHour: '',
  3302. forStdLotByDay: '',
  3303. forLotByDay: '',
  3304. minLotQty: '',
  3305. detailNoteText: '',
  3306. status: '',
  3307. createBy: this.$store.state.user.name,
  3308. officialFlag: 'N'
  3309. }
  3310. this.detailTable = 'routing_detail'
  3311. this.detailDataList = []
  3312. this.subDetailList = []
  3313. this.headerSaveFlag = true
  3314. this.modalDisableFlag = false
  3315. this.modalFlag = true
  3316. },
  3317. // routing编辑模态框
  3318. async updateModal(row) {
  3319. this.modalData = {
  3320. flag: '2',
  3321. site: row.site,
  3322. partNo: row.partNo,
  3323. partDesc: row.partDesc,
  3324. routingRevision: row.routingRevision,
  3325. routingType: row.routingType,
  3326. noteText: row.noteText,
  3327. phaseInDate: row.phaseInDate,
  3328. phaseOutDate: row.phaseOutDate,
  3329. engRevision: row.engRevision,
  3330. typeFlag: row.typeFlag,
  3331. netWeight: row.netWeight,
  3332. updateBy: this.$store.state.user.name,
  3333. printUnit: row.printUnit,
  3334. printUnitName: row.printUnitName,
  3335. officialFlag: row.officialFlag,
  3336. alternativeNo: row.alternativeNo,
  3337. ifsPartNo: row.ifsPartNo
  3338. }
  3339. // 查routing明细
  3340. queryRoutingDetail(this.modalData).then(({data}) => {
  3341. if (data && data.code === 0) {
  3342. this.detailDataList = data.rows.detailList
  3343. this.subDetailList = data.rows.componentList
  3344. this.detailData = data.rows.detailData
  3345. this.detailTable = 'routing_detail'
  3346. this.modalDisableFlag = true
  3347. this.modalFlag = true
  3348. } else {
  3349. this.$alert(data.msg, '错误', {
  3350. confirmButtonText: '确定'
  3351. })
  3352. }
  3353. })
  3354. },
  3355. // 详情
  3356. async detailsModal (row) {
  3357. this.modalData = {
  3358. ...row,
  3359. flag: '3',
  3360. updateBy: this.$store.state.user.name
  3361. }
  3362. // 查routing明细
  3363. queryRoutingDetail(this.modalData).then(({data}) => {
  3364. if (data && data.code === 0) {
  3365. this.detailDataList = data.rows.detailList
  3366. this.subDetailList = data.rows.componentList
  3367. this.detailData = data.rows.detailData
  3368. this.detailTable = 'routing_detail'
  3369. this.modalDisableFlag = true
  3370. this.modalFlag = true
  3371. } else {
  3372. this.$alert(data.msg, '错误', {
  3373. confirmButtonText: '确定'
  3374. })
  3375. }
  3376. })
  3377. },
  3378. // 新增替代模态框
  3379. saveRoutingDetail() {
  3380. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3381. this.$message.warning('请先选择Routing物料!')
  3382. return
  3383. }
  3384. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  3385. this.$message.warning('请先填写Routing版本号!')
  3386. return
  3387. }
  3388. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  3389. this.$message.warning('请先选择工艺类型!')
  3390. return
  3391. }
  3392. this.saveDetailData = {
  3393. flag: '1',
  3394. site: this.$store.state.user.site,
  3395. partNo: this.modalData.partNo,
  3396. routingRevision: this.modalData.routingRevision,
  3397. routingType: this.modalData.routingType,
  3398. alternativeNo: '',
  3399. alternativeDescription: '',
  3400. routTemplateId: '',
  3401. planDate: '',
  3402. fixedLeadTimeDay: '',
  3403. fixedLeadTimeHour: '',
  3404. variableLeadTimeDay: '',
  3405. variableLeadTimeHour: '',
  3406. forStdLotByDay: '',
  3407. forLotByDay: '',
  3408. minLotQty: '',
  3409. detailNoteText: '',
  3410. status: 'Tentative',
  3411. createDate: '',
  3412. createBy: this.$store.state.user.name,
  3413. officialFlag: 'N'
  3414. }
  3415. // 查询routing主信息
  3416. queryRoutingHeader(this.modalData).then(({data}) => {
  3417. if (data && data.code === 0) {
  3418. if (data.rows.length > 0) {
  3419. this.saveDetailModalFlag = true
  3420. this.saveDetailModalDisable = false
  3421. } else {
  3422. this.$message.warning('请先保存Routing主记录!')
  3423. }
  3424. } else {
  3425. this.$alert(data.msg, '提示', {
  3426. confirmButtonText: '确定'
  3427. })
  3428. }
  3429. })
  3430. },
  3431. // 替代编辑模态框
  3432. updateRoutingDetail() {
  3433. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3434. this.$message.warning('请先选择Routing物料!')
  3435. return
  3436. }
  3437. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  3438. this.$message.warning('请先填写Routing版本号!')
  3439. return
  3440. }
  3441. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  3442. this.$message.warning('请先选择工艺类型!')
  3443. return
  3444. }
  3445. this.saveDetailData = {
  3446. flag: '2',
  3447. site: this.detailData.site,
  3448. partNo: this.detailData.partNo,
  3449. routingRevision: this.detailData.routingRevision,
  3450. routingType: this.detailData.routingType,
  3451. alternativeNo: this.detailData.alternativeNo,
  3452. alternativeDescription: this.detailData.alternativeDescription,
  3453. routTemplateId: this.detailData.routTemplateId,
  3454. planDate: this.detailData.planDate,
  3455. fixedLeadTimeDay: this.detailData.fixedLeadTimeDay,
  3456. fixedLeadTimeHour: this.detailData.fixedLeadTimeHour,
  3457. variableLeadTimeDay: this.detailData.variableLeadTimeDay,
  3458. variableLeadTimeHour: this.detailData.variableLeadTimeHour,
  3459. forStdLotByDay: this.detailData.forStdLotByDay,
  3460. forLotByDay: this.detailData.forLotByDay,
  3461. minLotQty: this.detailData.minLotQty,
  3462. detailNoteText: this.detailData.detailNoteText,
  3463. status: this.detailData.status,
  3464. updateBy: this.$store.state.user.name,
  3465. officialFlag: this.detailData.officialFlag
  3466. }
  3467. // 查询routing主信息
  3468. queryRoutingHeader(this.modalData).then(({data}) => {
  3469. if (data && data.code === 0) {
  3470. if (data.rows.length > 0) {
  3471. this.saveDetailModalFlag = true
  3472. this.saveDetailModalDisable = true
  3473. } else {
  3474. this.$message.warning('请先保存Routing主记录!')
  3475. }
  3476. } else {
  3477. this.$alert(data.msg, '提示', {
  3478. confirmButtonText: '确定'
  3479. })
  3480. }
  3481. })
  3482. },
  3483. // 新增子明细模态框
  3484. saveComponentModal() {
  3485. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3486. this.$message.warning('请先选择替代!')
  3487. return
  3488. }
  3489. // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  3490. // this.$message.warning('不可编辑的替代状态!')
  3491. // return
  3492. // }
  3493. this.componentData = {
  3494. flag: '1',
  3495. site: this.$store.state.user.site,
  3496. partNo: this.modalData.partNo,
  3497. routingRevision: this.modalData.routingRevision,
  3498. routingType: this.modalData.routingType,
  3499. alternativeNo: this.detailData.alternativeNo,
  3500. operationId: '',
  3501. operationNo: '',
  3502. operationName: '',
  3503. efficiencyFactor: 100,
  3504. machRunFactor: '',
  3505. machSetupTime: '',
  3506. runTimeCode: 'Units/Hour',
  3507. laborRunFactor: '',
  3508. laborSetupTime: '',
  3509. crewSize: 1,
  3510. setupCrewSize: 1,
  3511. outsideOpItem: '',
  3512. machineNo: '',
  3513. workCenterNo: '',
  3514. workCenterDesc: '',
  3515. workCenterType: '',
  3516. laborClassNo: '',
  3517. laborClassDesc: '',
  3518. setupLaborClassNo: '',
  3519. setupLaborClassDesc: '',
  3520. overlap: '',
  3521. noteText: '',
  3522. createBy: this.$store.state.user.name,
  3523. ifsRowId: '',
  3524. ifsRowVersion: ''
  3525. }
  3526. this.queryMaxOperationNo()
  3527. this.componentDisableFlag = false
  3528. this.componentSaveModal = true
  3529. },
  3530. // 查询最大工序号
  3531. queryMaxOperationNo() {
  3532. queryMaxOperationNo(this.detailData).then(({data}) => {
  3533. if (data && data.code === 0) {
  3534. this.componentData.operationNo = data.operationNo
  3535. }
  3536. })
  3537. },
  3538. // 编辑模态框
  3539. updateComponentModal(row) {
  3540. // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  3541. // this.$message.warning('不可编辑的替代状态!')
  3542. // return
  3543. // }
  3544. this.componentData = {
  3545. flag: '2',
  3546. site: row.site,
  3547. partNo: row.partNo,
  3548. routingRevision: row.routingRevision,
  3549. routingType: row.routingType,
  3550. alternativeNo: row.alternativeNo,
  3551. operationId: row.operationId,
  3552. operationNo: row.operationNo,
  3553. operationName: row.operationName,
  3554. efficiencyFactor: row.efficiencyFactor,
  3555. machRunFactor: row.machRunFactor,
  3556. machSetupTime: row.machSetupTime,
  3557. runTimeCode: row.runTimeCode,
  3558. laborRunFactor: row.laborRunFactor,
  3559. laborSetupTime: row.laborSetupTime,
  3560. crewSize: row.crewSize,
  3561. setupCrewSize: row.setupCrewSize,
  3562. outsideOpItem: row.outsideOpItem,
  3563. machineNo: row.machineNo,
  3564. workCenterNo: row.workCenterNo,
  3565. workCenterDesc: row.workCenterDesc,
  3566. workCenterType: row.workCenterType,
  3567. laborClassNo: row.laborClassNo,
  3568. laborClassDesc: row.laborClassDesc,
  3569. setupLaborClassNo: row.setupLaborClassNo,
  3570. setupLaborClassDesc: row.setupLaborClassDesc,
  3571. overlap: row.overlap,
  3572. noteText: row.noteText,
  3573. updateBy: this.$store.state.user.name,
  3574. ifsRowId: row.ifsRowId,
  3575. ifsRowVersion: row.ifsRowVersion
  3576. }
  3577. this.componentDisableFlag = true
  3578. this.componentSaveModal = true
  3579. },
  3580. // routingTool 新增模态框
  3581. saveRoutingTool() {
  3582. this.routingToolData = {
  3583. flag: '1',
  3584. id: '',
  3585. site: this.$store.state.user.site,
  3586. partNo: this.modalData.partNo,
  3587. partDesc: this.modalData.partDesc,
  3588. routingRevision: this.modalData.routingRevision,
  3589. routingType: this.modalData.routingType,
  3590. alternativeNo: '*',
  3591. alternativeDescription: '',
  3592. operationId: '',
  3593. operationNo: '',
  3594. operationName: '',
  3595. toolId: '',
  3596. toolDescription: '',
  3597. toolQty: 1,
  3598. remark: '',
  3599. createBy: this.$store.state.user.name,
  3600. ifsRowId: '',
  3601. ifsRowVersion: ''
  3602. }
  3603. this.queryAlternativeList()
  3604. this.saveRoutingToolModal = true
  3605. this.saveRoutingToolDisableModal = false
  3606. },
  3607. // routingTool 编辑模态框
  3608. updateToolModal(row) {
  3609. this.routingToolData = {
  3610. flag: '2',
  3611. id: row.id,
  3612. site: row.site,
  3613. partNo: row.partNo,
  3614. partDesc: row.partDesc,
  3615. routingRevision: row.routingRevision,
  3616. routingType: row.routingType,
  3617. alternativeNo: row.alternativeNo,
  3618. alternativeDescription: row.alternativeDescription,
  3619. operationId: row.operationId,
  3620. operationNo: row.operationNo,
  3621. operationName: row.operationName,
  3622. toolId: row.toolId,
  3623. toolDescription: row.toolDescription,
  3624. toolQty: row.toolQty,
  3625. remark: row.remark,
  3626. updateBy: this.$store.state.user.name,
  3627. ifsRowId: row.ifsRowId,
  3628. ifsRowVersion: row.ifsRowVersion
  3629. }
  3630. this.queryAlternativeList()
  3631. this.saveRoutingToolModal = true
  3632. this.saveRoutingToolDisableModal = true
  3633. },
  3634. // ======== 新增/编辑/删除方法 ========
  3635. // routing新增/编辑
  3636. saveData() {
  3637. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3638. this.$message.warning('请选择物料编码!')
  3639. return
  3640. }
  3641. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3642. this.$message.warning('请选择物料名称!')
  3643. return
  3644. }
  3645. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  3646. this.$message.warning('请选择制造类型!')
  3647. return
  3648. }
  3649. if (this.modalData.phaseInDate === '' || this.modalData.phaseInDate == null) {
  3650. this.$message.warning('请选择生效时间!')
  3651. return
  3652. }
  3653. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  3654. this.$message.warning('请填写Routing版本号!')
  3655. return
  3656. }
  3657. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3658. this.$message.warning('请选择替代!')
  3659. return
  3660. }
  3661. if (this.detailData.status === '' || this.detailData.status == null) {
  3662. this.$message.warning('请选择替代状态!')
  3663. return
  3664. }
  3665. let tempData = {
  3666. site: this.$store.state.user.site,
  3667. partNo: this.modalData.partNo,
  3668. partDesc: this.modalData.partDesc,
  3669. routingRevision: this.modalData.routingRevision,
  3670. routingType: this.modalData.routingType,
  3671. noteText: this.modalData.noteText,
  3672. phaseInDate: this.modalData.phaseInDate,
  3673. phaseOutDate: this.modalData.phaseOutDate,
  3674. alternativeNo: this.detailData.alternativeNo,
  3675. alternativeDescription: this.detailData.alternativeDescription,
  3676. detailNoteText: this.detailData.detailNoteText,
  3677. status: this.detailData.status,
  3678. createBy: this.$store.state.user.name,
  3679. updateBy: this.$store.state.user.name,
  3680. informationList: this.subDetailList
  3681. }
  3682. if (this.modalData.flag === '1') {
  3683. this.saveAllLoading = true
  3684. routingManagementSave(tempData).then(({data}) => {
  3685. if (data && data.code === 0) {
  3686. this.getDataList()
  3687. this.modalFlag = false
  3688. this.$message({
  3689. message: '操作成功',
  3690. type: 'success',
  3691. duration: 1500,
  3692. onClose: () => {
  3693. }
  3694. })
  3695. } else {
  3696. this.$alert(data.msg, '错误', {
  3697. confirmButtonText: '确定'
  3698. })
  3699. }
  3700. this.saveAllLoading = false
  3701. })
  3702. } else {
  3703. this.saveAllLoading = true
  3704. routingManagementEdit(tempData).then(({data}) => {
  3705. if (data && data.code === 0) {
  3706. this.getDataList()
  3707. this.modalFlag = false
  3708. this.$message({
  3709. message: '操作成功',
  3710. type: 'success',
  3711. duration: 1500,
  3712. onClose: () => {
  3713. }
  3714. })
  3715. } else {
  3716. this.$alert(data.msg, '错误', {
  3717. confirmButtonText: '确定'
  3718. })
  3719. }
  3720. this.saveAllLoading = false
  3721. })
  3722. }
  3723. },
  3724. // 新增编辑模态框关闭
  3725. closeModal() {
  3726. this.modalFlag = false
  3727. },
  3728. // 新增编辑模态框关闭
  3729. closeModalX(done) {
  3730. done()
  3731. },
  3732. // routing删除
  3733. delModal() {
  3734. if (this.routingSelections.length === 0) {
  3735. this.$message.warning('请勾选要删除的Routing!')
  3736. return
  3737. }
  3738. this.$confirm(`是否删除这 ` + this.routingSelections.length + ` 条Routing?`, '提示', {
  3739. confirmButtonText: '确定',
  3740. cancelButtonText: '取消',
  3741. type: 'warning'
  3742. }).then(() => {
  3743. let tempData = {
  3744. informationList: this.routingSelections
  3745. }
  3746. routingManagementDelete(tempData).then(({data}) => {
  3747. if (data && data.code === 0) {
  3748. this.getDataList()
  3749. this.routingSelections = []
  3750. this.$message({
  3751. message: '操作成功',
  3752. type: 'success',
  3753. duration: 1500,
  3754. onClose: () => {
  3755. }
  3756. })
  3757. } else {
  3758. this.$alert(data.msg, '错误', {
  3759. confirmButtonText: '确定'
  3760. })
  3761. }
  3762. })
  3763. })
  3764. },
  3765. // 查询物料
  3766. queryPartList() {
  3767. this.partData.limit = this.pageSize2
  3768. this.partData.page = this.pageIndex2
  3769. queryPartListRouting(this.partData).then(({data}) => {
  3770. if (data && data.code === 0) {
  3771. this.partList = data.page.list
  3772. this.pageIndex2 = data.page.currPage
  3773. this.pageSize2 = data.page.pageSize
  3774. this.totalPage2 = data.page.totalCount
  3775. this.partModelFlag = true
  3776. } else {
  3777. this.$alert(data.msg, '错误', {
  3778. confirmButtonText: '确定'
  3779. })
  3780. }
  3781. })
  3782. },
  3783. // 物料编码失焦事件
  3784. partNoBlur() {
  3785. this.partData.limit = this.pageSize2
  3786. this.partData.page = this.pageIndex2
  3787. this.partData.ifsPartNo = this.modalData.partNo
  3788. queryPartList(this.partData).then(({data}) => {
  3789. if (data && data.code === 0) {
  3790. if (data.page.list.length === 1) {
  3791. this.modalData.partDesc = data.page.list[0].partDesc
  3792. this.modalData.printUnit = data.page.list[0].printUnit
  3793. this.modalData.printUnitName = data.page.list[0].printUnitName
  3794. // 获取物料的routing版本号
  3795. getRottingRevision(this.modalData).then(({data}) => {
  3796. if (data && data.code === 0) {
  3797. this.modalData.routingRevision = data.routingRevision
  3798. } else {
  3799. this.modalData.routingRevision = ''
  3800. }
  3801. })
  3802. } else {
  3803. this.modalData.partDesc = ''
  3804. this.modalData.printUnit = ''
  3805. this.modalData.printUnitName = ''
  3806. this.modalData.routingRevision = ''
  3807. }
  3808. }
  3809. })
  3810. },
  3811. // 双击选中物料
  3812. getRowData(row) {
  3813. this.modalData.partNo = row.partNo
  3814. this.modalData.partDesc = row.partDesc
  3815. this.modalData.printUnit = row.printUnit
  3816. this.modalData.printUnitName = row.printUnitName
  3817. // 获取物料的routing版本号
  3818. getRottingRevision(this.modalData).then(({data}) => {
  3819. if (data && data.code === 0) {
  3820. this.modalData.routingRevision = data.routingRevision
  3821. } else {
  3822. this.$alert(data.msg, '错误', {
  3823. confirmButtonText: '确定'
  3824. })
  3825. }
  3826. this.partModelFlag = false
  3827. })
  3828. },
  3829. // 工艺类型改变
  3830. routingTypeChange() {
  3831. // 获取物料的routing版本号
  3832. getRottingRevision(this.modalData).then(({data}) => {
  3833. if (data && data.code === 0) {
  3834. this.modalData.routingRevision = data.routingRevision
  3835. } else {
  3836. this.$alert(data.msg, '错误', {
  3837. confirmButtonText: '确定'
  3838. })
  3839. }
  3840. })
  3841. },
  3842. // 选中工序
  3843. getComponentRowData(row) {
  3844. this.routingToolData.operationId = row.operationId
  3845. this.routingToolData.operationNo = row.operationNo
  3846. this.routingToolData.operationName = row.operationName
  3847. this.componentPartModelFlag = false
  3848. },
  3849. // 工序列表
  3850. queryOperationList() {
  3851. if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
  3852. this.$message.warning('请先选择替代!')
  3853. return
  3854. }
  3855. this.operationData.site = this.routingToolData.site
  3856. this.operationData.partNo = this.routingToolData.partNo
  3857. this.operationData.routingRevision = this.routingToolData.routingRevision
  3858. this.operationData.routingType = this.routingToolData.routingType
  3859. this.operationData.alternativeNo = this.routingToolData.alternativeNo
  3860. // 查询所有工序
  3861. queryOperationListByAlternative(this.operationData).then(({data}) => {
  3862. if (data && data.code === 0) {
  3863. this.operationList = data.rows
  3864. this.componentPartModelFlag = true
  3865. } else {
  3866. this.$alert(data.msg, '错误', {
  3867. confirmButtonText: '确定'
  3868. })
  3869. }
  3870. })
  3871. },
  3872. // 查工具列表
  3873. queryToolList() {
  3874. this.toolData.limit = this.pageSize3
  3875. this.toolData.page = this.pageIndex3
  3876. queryToolList(this.toolData).then(({data}) => {
  3877. if (data && data.code === 0) {
  3878. this.toolList = data.page.list
  3879. this.pageIndex3 = data.page.currPage
  3880. this.pageSize3 = data.page.pageSize
  3881. this.totalPage3 = data.page.totalCount
  3882. this.toolModelFlag = true
  3883. }
  3884. })
  3885. },
  3886. // 工序输入校验
  3887. routingToolOperationBlur() {
  3888. let tempData = {
  3889. site: this.routingToolData.site,
  3890. partNo: this.routingToolData.partNo,
  3891. routingRevision: this.routingToolData.routingRevision,
  3892. routingType: this.routingToolData.routingType,
  3893. alternativeNo: this.routingToolData.alternativeNo,
  3894. operationNo: this.routingToolData.operationNo
  3895. }
  3896. queryOperationListByAlternative(tempData).then(({data}) => {
  3897. if (data && data.code === 0) {
  3898. if (data.rows.length > 0) {
  3899. this.routingToolData.operationId = data.rows[0].operationId
  3900. this.routingToolData.operationNo = data.rows[0].operationNo
  3901. this.routingToolData.operationName = data.rows[0].operationName
  3902. } else {
  3903. this.routingToolData.operationName = ''
  3904. }
  3905. }
  3906. })
  3907. },
  3908. // 工具输入校验
  3909. routingToolBlur(tagNo) {
  3910. let tempData = {
  3911. tagno: tagNo,
  3912. conditionSql: " and tool_id = '" + this.routingToolData.toolId + "'" + " and site = '" + this.routingToolData.site + "'"
  3913. }
  3914. verifyData(tempData).then(({data}) => {
  3915. if (data && data.code === 0) {
  3916. if (data.baseListData.length > 0) {
  3917. this.routingToolData.toolId = data.baseListData[0].tool_id
  3918. this.routingToolData.toolDescription = data.baseListData[0].tool_description
  3919. } else {
  3920. this.routingToolData.toolDescription = ''
  3921. }
  3922. }
  3923. })
  3924. },
  3925. // 双击选中工具
  3926. doubleClickTool(row) {
  3927. this.routingToolData.toolId = row.toolId
  3928. this.routingToolData.toolDescription = row.toolDescription
  3929. this.toolModelFlag = false
  3930. },
  3931. // 替代列表
  3932. queryAlternativeList() {
  3933. // 查询所有替代
  3934. queryAlternativeListByPartNo(this.modalData).then(({data}) => {
  3935. if (data && data.code === 0) {
  3936. this.alternativeList = data.rows
  3937. } else {
  3938. this.$alert(data.msg, '错误', {
  3939. confirmButtonText: '确定'
  3940. })
  3941. }
  3942. })
  3943. },
  3944. // 表格的新增
  3945. rowClassName({row, rowIndex}) {
  3946. row.xh = rowIndex + 1
  3947. },
  3948. // 单选框选中数据
  3949. componentSelectionChange(selection) {
  3950. this.checkedDetail = selection
  3951. },
  3952. toolSelectionChange(selection) {
  3953. this.checkedTool = selection
  3954. },
  3955. // 删除子物料
  3956. deleteComponentPart() {
  3957. // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  3958. // this.$message.warning('不可编辑的替代状态!')
  3959. // return
  3960. // }
  3961. if (this.checkedDetail.length === 0) {
  3962. this.$message.warning('请选择要删除工序!')
  3963. return
  3964. } else {
  3965. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  3966. confirmButtonText: "确定",
  3967. cancelButtonText: "取消",
  3968. type: "warning"
  3969. }).then(() => {
  3970. let tempData = {
  3971. updateBy: this.$store.state.user.name,
  3972. informationList: this.checkedDetail
  3973. }
  3974. deleteRoutingComponent(tempData).then(({data}) => {
  3975. if (data && data.code === 0) {
  3976. this.subDetailList = data.rows
  3977. this.$message({
  3978. message: '操作成功',
  3979. type: 'success',
  3980. duration: 1500,
  3981. onClose: () => {
  3982. }
  3983. })
  3984. } else {
  3985. this.$alert(data.msg, '错误', {
  3986. confirmButtonText: '确定'
  3987. })
  3988. }
  3989. })
  3990. })
  3991. }
  3992. },
  3993. // 子物料
  3994. componentClickRow(row) {
  3995. this.$refs.componentTable.toggleRowSelection(row)
  3996. },
  3997. toolClickRow(row) {
  3998. this.$refs.toolTable.toggleRowSelection(row)
  3999. },
  4000. // 新增子明细方法
  4001. componentDataSave(isClose) {
  4002. if (this.componentData.partNo === '' || this.componentData.partNo == null) {
  4003. this.$message.warning('请选择主记录物料编码!')
  4004. return
  4005. }
  4006. if (this.componentData.routingType === '' || this.componentData.routingType == null) {
  4007. this.$message.warning('请选择主记录工艺类型!')
  4008. return
  4009. }
  4010. if (this.componentData.routingRevision === '' || this.componentData.routingRevision == null) {
  4011. this.$message.warning('请填写主记录Routing版本号!')
  4012. return
  4013. }
  4014. if (this.componentData.operationNo === '' || this.componentData.operationNo == null) {
  4015. this.$message.warning('请填写工序编码!')
  4016. return
  4017. }
  4018. if (this.componentData.operationName === '' || this.componentData.operationName == null) {
  4019. this.$message.warning('请填写工序名称!')
  4020. return
  4021. }
  4022. if (this.componentData.workCenterNo === '' || this.componentData.workCenterNo == null) {
  4023. this.$message.warning('请选择加工中心!')
  4024. return
  4025. }
  4026. if (this.componentData.machSetupTime === '' || this.componentData.machSetupTime == null) {
  4027. this.$message.warning('请填写机器调机时间!')
  4028. return
  4029. }
  4030. if (this.componentData.laborSetupTime === '' || this.componentData.laborSetupTime == null) {
  4031. this.$message.warning('请填写人工调机时间!')
  4032. return
  4033. }
  4034. if (this.componentData.setupLaborClassNo === '' || this.componentData.setupLaborClassNo == null) {
  4035. this.$message.warning('请选择调机过程中人员等级!')
  4036. return
  4037. }
  4038. if (this.componentData.setupCrewSize === '' || this.componentData.setupCrewSize == null) {
  4039. this.$message.warning('请填写调机过程中人数!')
  4040. return
  4041. }
  4042. if (this.componentData.machRunFactor === '' || this.componentData.machRunFactor == null) {
  4043. this.$message.warning('请填写机器单位产出!')
  4044. return
  4045. }
  4046. if (this.componentData.laborRunFactor === '' || this.componentData.laborRunFactor == null) {
  4047. this.$message.warning('请填写人工单位产出!')
  4048. return
  4049. }
  4050. if (this.componentData.runTimeCode === '' || this.componentData.runTimeCode == null) {
  4051. this.$message.warning('请选择产出单位!')
  4052. return
  4053. }
  4054. if (this.componentData.laborClassNo === '' || this.componentData.laborClassNo == null) {
  4055. this.$message.warning('请选择人员等级!')
  4056. return
  4057. }
  4058. if (this.componentData.efficiencyFactor === '' || this.componentData.efficiencyFactor == null) {
  4059. this.$message.warning('请填写效率!')
  4060. return
  4061. }
  4062. if (this.componentData.crewSize === '' || this.componentData.crewSize == null) {
  4063. this.$message.warning('请填写生产过程中人数!')
  4064. return
  4065. }
  4066. if (this.componentData.flag === '1') {
  4067. saveRoutingComponent(this.componentData).then(({data}) => {
  4068. if (data && data.code === 0) {
  4069. this.subDetailList = data.rows
  4070. if (isClose) {
  4071. this.saveComponentModal()
  4072. } else {
  4073. this.componentSaveModal = false
  4074. }
  4075. this.$message({
  4076. message: '操作成功',
  4077. type: 'success',
  4078. duration: 1500,
  4079. onClose: () => {
  4080. }
  4081. })
  4082. } else {
  4083. this.$alert(data.msg, '错误', {
  4084. confirmButtonText: '确定'
  4085. })
  4086. }
  4087. })
  4088. } else if (this.componentData.flag === '2') {
  4089. updateRoutingComponent(this.componentData).then(({data}) => {
  4090. if (data && data.code === 0) {
  4091. this.subDetailList = data.rows
  4092. this.componentSaveModal = false
  4093. this.$message({
  4094. message: '操作成功',
  4095. type: 'success',
  4096. duration: 1500,
  4097. onClose: () => {
  4098. }
  4099. })
  4100. } else {
  4101. this.$alert(data.msg, '错误', {
  4102. confirmButtonText: '确定'
  4103. })
  4104. }
  4105. })
  4106. }
  4107. },
  4108. // 回车事件
  4109. focusNextInput(index, type) {
  4110. let aaa = ''
  4111. if (this.subDetailList.length - 1 === index) {
  4112. aaa = `${type}0`
  4113. } else {
  4114. aaa = `${type}${index + 1}`
  4115. }
  4116. this.$nextTick(() => {
  4117. this.$refs[aaa].focus()
  4118. })
  4119. },
  4120. // 保存主表信息
  4121. saveRoutingHeader() {
  4122. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  4123. this.$message.warning('请先选择Routing物料!')
  4124. return
  4125. }
  4126. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  4127. this.$message.warning('请先填写Routing版本号!')
  4128. return
  4129. }
  4130. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  4131. this.$message.warning('请先选择制造类型!')
  4132. return
  4133. }
  4134. if (this.modalData.phaseOutDate != null && this.modalData.phaseOutDate !== '' && (this.modalData.phaseInDate > this.modalData.phaseOutDate)) {
  4135. this.$message.warning('失效日期不能小于生效日期!')
  4136. return
  4137. }
  4138. this.saveHeaderLoading = true
  4139. // 新增主表信息
  4140. saveRoutingHeader(this.modalData).then(({data}) => {
  4141. if (data && data.code === 0) {
  4142. this.modalData = {
  4143. flag: '1',
  4144. title: 'routing新增',
  4145. site: data.rows.modalData.site,
  4146. partNo: data.rows.modalData.partNo,
  4147. partDesc: data.rows.modalData.partDesc,
  4148. routingRevision: data.rows.modalData.routingRevision,
  4149. routingType: data.rows.modalData.routingType,
  4150. noteText: data.rows.modalData.noteText,
  4151. phaseInDate: data.rows.modalData.phaseInDate,
  4152. phaseOutDate: data.rows.modalData.phaseOutDate,
  4153. engRevision: data.rows.modalData.engRevision,
  4154. typeFlag: data.rows.modalData.typeFlag,
  4155. netWeight: data.rows.modalData.netWeight,
  4156. officialFlag: data.rows.modalData.officialFlag
  4157. }
  4158. this.detailDataList = data.rows.detailDataList
  4159. this.detailData = data.rows.detailData
  4160. this.subDetailList = []
  4161. this.headerSaveFlag = false
  4162. this.modalDisableFlag = true
  4163. this.$message({
  4164. message: '操作成功',
  4165. type: 'success',
  4166. duration: 1500,
  4167. onClose: () => {
  4168. }
  4169. })
  4170. } else {
  4171. this.$alert(data.msg, '错误', {
  4172. confirmButtonText: '确定'
  4173. })
  4174. }
  4175. this.saveHeaderLoading = false
  4176. })
  4177. },
  4178. // 复制Routing的模态框
  4179. copyRoutingRevision() {
  4180. this.copyRoutingData = {
  4181. site: this.modalData.site,
  4182. partNo: this.modalData.partNo,
  4183. partDesc: this.modalData.partDesc,
  4184. routingRevision: '',
  4185. routingType: this.modalData.routingType,
  4186. phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
  4187. phaseOutDate: '',
  4188. previousVersion: {},
  4189. createBy: this.$store.state.user.name,
  4190. officialFlag: 'N'
  4191. }
  4192. // 获取物料的routing版本号
  4193. getRottingRevision(this.copyRoutingData).then(({data}) => {
  4194. if (data && data.code === 0) {
  4195. this.copyRoutingData.routingRevision = data.routingRevision
  4196. }
  4197. })
  4198. this.copyPartData = {
  4199. type: '1',
  4200. site: this.$store.state.user.site,
  4201. partNo: '',
  4202. plmPartNo: '',
  4203. ifsPartNo: '',
  4204. partDesc: '',
  4205. page: 1,
  4206. limit: 10
  4207. }
  4208. this.copyRoutingModelFlag = true
  4209. },
  4210. // 复制Routing的方法
  4211. copyRouting() {
  4212. if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) {
  4213. this.$message.warning('请选择Routing物料!')
  4214. return
  4215. }
  4216. if (this.copyRoutingData.routingRevision === '' || this.copyRoutingData.routingRevision == null) {
  4217. this.$message.warning('请填写Routing版本号!')
  4218. return
  4219. }
  4220. if (this.copyRoutingData.routingType === '' || this.copyRoutingData.routingType == null) {
  4221. this.$message.warning('请选择工艺类型!')
  4222. return
  4223. }
  4224. if (this.copyRoutingData.phaseOutDate != null && this.copyRoutingData.phaseOutDate !== '' && this.copyRoutingData.phaseOutDate < this.copyRoutingData.phaseInDate) {
  4225. this.$message.warning('失效日期必须大于生效日期!')
  4226. return
  4227. }
  4228. this.copyRoutingData.previousVersion = this.modalData
  4229. this.copyLoading = true
  4230. // 新增主表信息
  4231. copyRouting(this.copyRoutingData).then(({data}) => {
  4232. if (data && data.code === 0) {
  4233. this.copyRoutingModelFlag = false
  4234. this.updateModal(data.rows)
  4235. this.$message({
  4236. message: '操作成功',
  4237. type: 'success',
  4238. duration: 1500,
  4239. onClose: () => {
  4240. }
  4241. })
  4242. } else {
  4243. this.$alert(data.msg, '错误', {
  4244. confirmButtonText: '确定'
  4245. })
  4246. }
  4247. this.copyLoading = false
  4248. }).catch(() => {
  4249. this.copyLoading = false
  4250. })
  4251. },
  4252. // 复制alternative的模态框
  4253. copyRoutingAlternative() {
  4254. this.copyAlternativeData = {
  4255. site: this.detailData.site,
  4256. partNo: this.detailData.partNo,
  4257. partDesc: this.modalData.partDesc,
  4258. routingRevision: this.detailData.routingRevision,
  4259. routingType: this.detailData.routingType,
  4260. alternativeNo: this.detailData.alternativeNo,
  4261. alternativeDescription: this.detailData.alternativeDescription,
  4262. routTemplateId: '',
  4263. planDate: '',
  4264. fixedLeadTimeDay: '',
  4265. fixedLeadTimeHour: '',
  4266. variableLeadTimeDay: '',
  4267. variableLeadTimeHour: '',
  4268. forStdLotByDay: '',
  4269. forLotByDay: '',
  4270. minLotQty: '',
  4271. detailNoteText: this.detailData.detailNoteText,
  4272. status: 'Tentative',
  4273. officialFlag: 'N',
  4274. previousVersion: {},
  4275. createBy: this.$store.state.user.name
  4276. }
  4277. this.copyPartData = {
  4278. type: '2',
  4279. site: this.$store.state.user.site,
  4280. partNo: '',
  4281. plmPartNo: '',
  4282. ifsPartNo: '',
  4283. partDesc: '',
  4284. page: 1,
  4285. limit: 10
  4286. }
  4287. this.copyAlternativeModelFlag = true
  4288. },
  4289. // 工艺指导模态框
  4290. workGuidelineModal(row) {
  4291. this.workGuidelineData = {
  4292. site: this.modalData.site,
  4293. partNo: this.modalData.partNo,
  4294. partDesc: this.modalData.partDesc,
  4295. routingRevision: this.modalData.routingRevision,
  4296. routingType: this.modalData.routingType,
  4297. alternativeNo: this.detailData.alternativeNo,
  4298. alternativeDescription: this.detailData.alternativeDescription,
  4299. operationId: row.operationId,
  4300. operationNo: row.operationNo,
  4301. operationName: row.operationName
  4302. }
  4303. this.getRoutingWorkGuideline()
  4304. this.queryWorkGuidelineModal = true
  4305. },
  4306. // 获取 workGuideline
  4307. getRoutingWorkGuideline() {
  4308. getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => {
  4309. if (data && data.code === 0) {
  4310. this.workGuidelineList = data.rows
  4311. } else {
  4312. this.workGuidelineList = []
  4313. }
  4314. })
  4315. },
  4316. // 复选列表信息
  4317. selectionWorkGuideline(val) {
  4318. this.workGuidelineSelections = val
  4319. },
  4320. // workGuideline 新增模态框
  4321. saveWorkGuideline() {
  4322. this.saveWorkGuidelineData = {
  4323. flag: '1',
  4324. id: '',
  4325. site: this.workGuidelineData.site,
  4326. partNo: this.workGuidelineData.partNo,
  4327. partDesc: this.workGuidelineData.partDesc,
  4328. routingRevision: this.workGuidelineData.routingRevision,
  4329. routingType: this.workGuidelineData.routingType,
  4330. alternativeNo: this.workGuidelineData.alternativeNo,
  4331. alternativeDescription: this.workGuidelineData.alternativeDescription,
  4332. operationId: this.workGuidelineData.operationId,
  4333. operationNo: this.workGuidelineData.operationNo,
  4334. operationName: this.workGuidelineData.operationName,
  4335. guidelineSeq: '',
  4336. guidelineDesc: '',
  4337. guidelineText: '',
  4338. guidelineType: 'Instruction',
  4339. signOffRequired: 'Not Required',
  4340. inspectionSignOffRequired: 'Not Required',
  4341. createBy: this.$store.state.user.name,
  4342. updateBy: '',
  4343. ifsRowId: '',
  4344. ifsRowVersion: ''
  4345. }
  4346. // 查询seq
  4347. getGuidelineSeq(this.workGuidelineData).then(({data}) => {
  4348. if (data && data.code === 0) {
  4349. this.saveWorkGuidelineData.guidelineSeq = data.guidelineSeq
  4350. }
  4351. })
  4352. // 开启模态框
  4353. this.saveWorkGuidelineModal = true
  4354. this.workGuidelineDisableModal = false
  4355. },
  4356. // workGuideline 编辑模态框
  4357. updateWorkGuidelineModal(row) {
  4358. this.saveWorkGuidelineData = {
  4359. flag: '2',
  4360. id: row.id,
  4361. site: row.site,
  4362. partNo: row.partNo,
  4363. partDesc: row.partDesc,
  4364. routingRevision: row.routingRevision,
  4365. routingType: row.routingType,
  4366. alternativeNo: row.alternativeNo,
  4367. alternativeDescription: row.alternativeDescription,
  4368. operationId: row.operationId,
  4369. operationNo: row.operationNo,
  4370. operationName: row.operationName,
  4371. guidelineSeq: row.guidelineSeq,
  4372. guidelineDesc: row.guidelineDesc,
  4373. guidelineText: row.guidelineText,
  4374. guidelineType: row.guidelineType,
  4375. signOffRequired: row.signOffRequired,
  4376. inspectionSignOffRequired: row.inspectionSignOffRequired,
  4377. createBy: '',
  4378. updateBy: this.$store.state.user.name,
  4379. ifsRowId: row.ifsRowId,
  4380. ifsRowVersion: row.ifsRowVersion
  4381. }
  4382. // 开启模态框
  4383. this.saveWorkGuidelineModal = true
  4384. this.workGuidelineDisableModal = true
  4385. },
  4386. // workGuideline 新增方法
  4387. workGuidelineCommit() {
  4388. if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) {
  4389. this.$message.warning('请输入序号!')
  4390. return
  4391. }
  4392. if (this.saveWorkGuidelineData.guidelineDesc === '' || this.saveWorkGuidelineData.guidelineDesc == null) {
  4393. this.$message.warning('请输入工艺指导名称!')
  4394. return
  4395. }
  4396. if (this.saveWorkGuidelineData.guidelineText === '' || this.saveWorkGuidelineData.guidelineText == null) {
  4397. this.$message.warning('请输入工艺指导描述!')
  4398. return
  4399. }
  4400. if (this.saveWorkGuidelineData.guidelineType === '' || this.saveWorkGuidelineData.guidelineType == null) {
  4401. this.$message.warning('请选择工艺指导类型!')
  4402. return
  4403. }
  4404. if (this.saveWorkGuidelineData.signOffRequired === '' || this.saveWorkGuidelineData.signOffRequired == null) {
  4405. this.$message.warning('请选择签字!')
  4406. return
  4407. }
  4408. if (this.saveWorkGuidelineData.inspectionSignOffRequired === '' || this.saveWorkGuidelineData.inspectionSignOffRequired == null) {
  4409. this.$message.warning('请选择检验签字!')
  4410. return
  4411. }
  4412. this.guidelineLoading = true
  4413. if (this.saveWorkGuidelineData.flag === '1') {
  4414. workGuidelineSave(this.saveWorkGuidelineData).then(({data}) => {
  4415. if (data && data.code === 0) {
  4416. this.getRoutingWorkGuideline()
  4417. this.saveWorkGuidelineModal = false
  4418. this.$message({
  4419. message: '操作成功',
  4420. type: 'success',
  4421. duration: 1500,
  4422. onClose: () => {
  4423. }
  4424. })
  4425. this.guidelineLoading = false
  4426. } else {
  4427. this.guidelineLoading = false
  4428. this.$alert(data.msg, '错误', {
  4429. confirmButtonText: '确定'
  4430. })
  4431. }
  4432. }).catch(() => {
  4433. this.guidelineLoading = false
  4434. })
  4435. } else {
  4436. workGuidelineEdit(this.saveWorkGuidelineData).then(({data}) => {
  4437. if (data && data.code === 0) {
  4438. this.getRoutingWorkGuideline()
  4439. this.saveWorkGuidelineModal = false
  4440. this.$message({
  4441. message: '操作成功',
  4442. type: 'success',
  4443. duration: 1500,
  4444. onClose: () => {
  4445. }
  4446. })
  4447. this.guidelineLoading = false
  4448. } else {
  4449. this.guidelineLoading = false
  4450. this.$alert(data.msg, '错误', {
  4451. confirmButtonText: '确定'
  4452. })
  4453. }
  4454. }).catch(() => {
  4455. this.guidelineLoading = false
  4456. })
  4457. }
  4458. },
  4459. // 删除 workGuideline
  4460. deleteModal() {
  4461. if (this.workGuidelineSelections.length === 0) {
  4462. this.$message.warning('请勾选要删除的工艺指导!')
  4463. return
  4464. }
  4465. this.$confirm(`是否删除这 ` + this.workGuidelineSelections.length + ` 条工艺指导?`, '提示', {
  4466. confirmButtonText: '确定',
  4467. cancelButtonText: '取消',
  4468. type: 'warning'
  4469. }).then(() => {
  4470. let tempData = {
  4471. updateBy: this.$store.state.user.name,
  4472. informationList: this.workGuidelineSelections
  4473. }
  4474. deleteWorkGuideline(tempData).then(({data}) => {
  4475. if (data && data.code === 0) {
  4476. this.getRoutingWorkGuideline()
  4477. this.workGuidelineSelections = []
  4478. this.$message({
  4479. message: '操作成功',
  4480. type: 'success',
  4481. duration: 1500,
  4482. onClose: () => {
  4483. }
  4484. })
  4485. } else {
  4486. this.$alert(data.msg, '错误', {
  4487. confirmButtonText: '确定'
  4488. })
  4489. }
  4490. })
  4491. })
  4492. },
  4493. // 复制alternative的方法
  4494. copyAlternative() {
  4495. if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
  4496. this.$message.warning('请选择Routing物料!')
  4497. return
  4498. }
  4499. if (this.copyAlternativeData.routingRevision === '' || this.copyAlternativeData.routingRevision == null) {
  4500. this.$message.warning('请填写Routing版本号!')
  4501. return
  4502. }
  4503. if (this.copyAlternativeData.routingType === '' || this.copyAlternativeData.routingType == null) {
  4504. this.$message.warning('请选择工艺类型!')
  4505. return
  4506. }
  4507. if (this.copyAlternativeData.alternativeNo === '' || this.copyAlternativeData.alternativeNo == null) {
  4508. this.$message.warning('请填写替代编码!')
  4509. return
  4510. }
  4511. this.copyAlternativeData.previousVersion = this.detailData
  4512. this.copyLoading = true
  4513. copyAlternative(this.copyAlternativeData).then(({data}) => {
  4514. if (data && data.code === 0) {
  4515. this.copyAlternativeModelFlag = false
  4516. this.updateModal(data.rows)
  4517. this.$message({
  4518. message: '操作成功',
  4519. type: 'success',
  4520. duration: 1500,
  4521. onClose: () => {
  4522. }
  4523. })
  4524. } else {
  4525. this.$alert(data.msg, '错误', {
  4526. confirmButtonText: '确定'
  4527. })
  4528. }
  4529. this.copyLoading = false
  4530. }).catch(() => {
  4531. this.copyLoading = false
  4532. })
  4533. },
  4534. // 新增替代方法
  4535. detailDataSave() {
  4536. if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) {
  4537. this.$message.warning('请先选择Routing物料!')
  4538. return
  4539. }
  4540. if (this.saveDetailData.routingRevision === '' || this.saveDetailData.routingRevision == null) {
  4541. this.$message.warning('请先填写Routing版本号!')
  4542. return
  4543. }
  4544. if (this.saveDetailData.routingType === '' || this.saveDetailData.routingType == null) {
  4545. this.$message.warning('请先选择工艺类型!')
  4546. return
  4547. }
  4548. if (this.saveDetailData.alternativeNo === '' || this.saveDetailData.alternativeNo == null) {
  4549. this.$message.warning('请填写替代编码!')
  4550. return
  4551. }
  4552. if (this.saveDetailData.alternativeDescription === '' || this.saveDetailData.alternativeDescription == null) {
  4553. this.$message.warning('请填写替代名称!')
  4554. return
  4555. }
  4556. if (this.saveDetailData.status === '' || this.saveDetailData.status == null) {
  4557. this.$message.warning('请选择替代状态!')
  4558. return
  4559. }
  4560. this.saveDetailLoading = true
  4561. if (this.saveDetailData.flag === '1') {
  4562. routingDetailSave(this.saveDetailData).then(({data}) => {
  4563. if (data && data.code === 0) {
  4564. this.detailDataList = data.rows
  4565. this.detailData = this.saveDetailData
  4566. this.subDetailList = []
  4567. this.saveDetailModalFlag = false
  4568. this.$message({
  4569. message: '操作成功',
  4570. type: 'success',
  4571. duration: 1500,
  4572. onClose: () => {
  4573. }
  4574. })
  4575. } else {
  4576. this.$alert(data.msg, '错误', {
  4577. confirmButtonText: '确定'
  4578. })
  4579. }
  4580. this.saveDetailLoading = false
  4581. })
  4582. } else {
  4583. routingDetailUpdate(this.saveDetailData).then(({data}) => {
  4584. if (data && data.code === 0) {
  4585. this.detailDataList = data.rows.detailDataList
  4586. this.detailData = data.rows.detailData
  4587. this.subDetailList = data.rows.subDetailList
  4588. this.saveDetailModalFlag = false
  4589. this.$message({
  4590. message: '操作成功',
  4591. type: 'success',
  4592. duration: 1500,
  4593. onClose: () => {
  4594. }
  4595. })
  4596. } else {
  4597. this.$alert(data.msg, '错误', {
  4598. confirmButtonText: '确定'
  4599. })
  4600. }
  4601. this.saveDetailLoading = false
  4602. })
  4603. }
  4604. },
  4605. // 删除替代
  4606. deleteRoutingDetail() {
  4607. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  4608. this.$message.warning('请选择要删除的替代编码!')
  4609. return
  4610. }
  4611. if (this.detailData.alternativeNo === '*') {
  4612. this.$message.warning('当前为默认替代,不可以删除!')
  4613. return
  4614. }
  4615. this.$confirm(`是否删除这项替代?`, '提示', {
  4616. confirmButtonText: '确定',
  4617. cancelButtonText: '取消',
  4618. type: 'warning'
  4619. }).then(() => {
  4620. this.detailData.updateBy = this.$store.state.user.name
  4621. routingDetailDelete(this.detailData).then(({data}) => {
  4622. if (data && data.code === 0) {
  4623. this.detailData = data.rows.detailData
  4624. this.detailDataList = data.rows.detailDataList
  4625. this.subDetailList = data.rows.subDetailList
  4626. this.$message({
  4627. message: '操作成功',
  4628. type: 'success',
  4629. duration: 1500,
  4630. onClose: () => {
  4631. }
  4632. })
  4633. } else {
  4634. this.$alert(data.msg, '错误', {
  4635. confirmButtonText: '确定'
  4636. })
  4637. }
  4638. })
  4639. })
  4640. },
  4641. // 修改替代状态为 Buildable
  4642. updateStatusToBuildable() {
  4643. this.$confirm(`是否修改状态为Buildable?`, '提示', {
  4644. confirmButtonText: '确定',
  4645. cancelButtonText: '取消',
  4646. type: 'warning'
  4647. }).then(() => {
  4648. this.detailData.updateBy = this.$store.state.user.name
  4649. updateAlternativeStatus(this.detailData).then(({data}) => {
  4650. if (data && data.code === 0) {
  4651. this.detailDataList = data.rows.detailDataList
  4652. this.detailData = data.rows.detailData
  4653. this.subDetailList = data.rows.subDetailList
  4654. this.$message({
  4655. message: '操作成功',
  4656. type: 'success',
  4657. duration: 1500,
  4658. onClose: () => {
  4659. }
  4660. })
  4661. } else {
  4662. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  4663. // 刷新替代和子明细
  4664. this.alternativeChange()
  4665. }
  4666. })
  4667. })
  4668. },
  4669. // 修改替代状态为 Obsolete
  4670. updateStatusToObsolete() {
  4671. this.$confirm(`是否修改状态为Obsolete?`, '提示', {
  4672. confirmButtonText: '确定',
  4673. cancelButtonText: '取消',
  4674. type: 'warning'
  4675. }).then(() => {
  4676. updateAlternativeStatus(this.detailData).then(({data}) => {
  4677. if (data && data.code === 0) {
  4678. this.detailDataList = data.rows.detailDataList
  4679. this.detailData = data.rows.detailData
  4680. this.subDetailList = data.rows.subDetailList
  4681. this.$message({
  4682. message: '操作成功',
  4683. type: 'success',
  4684. duration: 1500,
  4685. onClose: () => {
  4686. }
  4687. })
  4688. } else {
  4689. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  4690. // 刷新替代和子明细
  4691. this.alternativeChange()
  4692. }
  4693. })
  4694. })
  4695. },
  4696. // 替代改变事件
  4697. alternativeChange() {
  4698. queryRoutingComponent(this.detailData).then(({data}) => {
  4699. if (data && data.code === 0) {
  4700. this.detailDataList = data.rows.detailDataList
  4701. this.detailData = data.rows.detailData
  4702. this.subDetailList = data.rows.subDetailList
  4703. } else {
  4704. this.$alert(data.msg, '错误', {
  4705. confirmButtonText: '确定'
  4706. })
  4707. }
  4708. })
  4709. },
  4710. // 临时Routing转为正式Routing
  4711. toBecomeOfficialRouting() {
  4712. this.detailData.updateBy = this.$store.state.user.name
  4713. this.toBecomeOfficialLoading = true
  4714. toBecomeOfficialRouting(this.detailData).then(({data}) => {
  4715. if (data && data.code === 0) {
  4716. this.getDataList()
  4717. this.modalFlag = false
  4718. this.$message({
  4719. message: '操作成功',
  4720. type: 'success',
  4721. duration: 1500,
  4722. onClose: () => {
  4723. }
  4724. })
  4725. } else {
  4726. this.$alert(data.msg, '错误', {
  4727. confirmButtonText: '确定'
  4728. })
  4729. }
  4730. this.toBecomeOfficialLoading = false
  4731. }).catch(() => {
  4732. this.toBecomeOfficialLoading = false
  4733. })
  4734. },
  4735. // 新增 routingTool
  4736. routingToolSave() {
  4737. if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
  4738. this.$message.warning('请选择替代!')
  4739. return
  4740. }
  4741. if (this.routingToolData.operationNo === '' || this.routingToolData.operationNo == null) {
  4742. this.$message.warning('请选择工序!')
  4743. return
  4744. }
  4745. if (this.routingToolData.toolId === '' || this.routingToolData.toolId == null) {
  4746. this.$message.warning('请选择工具!')
  4747. return
  4748. }
  4749. if (this.routingToolData.toolQty === '' || this.routingToolData.toolQty == null) {
  4750. this.$message.warning('请输入工具数量!')
  4751. return
  4752. }
  4753. if (this.routingToolData.flag === '1') {
  4754. this.loading = true
  4755. routingToolSave(this.routingToolData).then(({data}) => {
  4756. if (data && data.code === 0) {
  4757. this.searchRoutingTools()
  4758. this.loading = false
  4759. this.saveRoutingToolModal = false
  4760. this.$message({
  4761. message: '操作成功',
  4762. type: 'success',
  4763. duration: 1500,
  4764. onClose: () => {
  4765. }
  4766. })
  4767. } else {
  4768. this.$alert(data.msg, '错误', {
  4769. confirmButtonText: '确定'
  4770. })
  4771. }
  4772. })
  4773. } else {
  4774. this.loading = true
  4775. routingToolEdit(this.routingToolData).then(({data}) => {
  4776. if (data && data.code === 0) {
  4777. this.searchRoutingTools()
  4778. this.loading = false
  4779. this.saveRoutingToolModal = false
  4780. this.$message({
  4781. message: '操作成功',
  4782. type: 'success',
  4783. duration: 1500,
  4784. onClose: () => {
  4785. }
  4786. })
  4787. } else {
  4788. this.$alert(data.msg, '错误', {
  4789. confirmButtonText: '确定'
  4790. })
  4791. }
  4792. })
  4793. }
  4794. },
  4795. // 删除 routingTool
  4796. deleteRoutingTool() {
  4797. if (this.checkedTool.length === 0) {
  4798. this.$message.warning('请选择要删除的工具!')
  4799. return
  4800. } else {
  4801. this.$confirm("请是否确认删除该工具?", "提示", {
  4802. confirmButtonText: "确定",
  4803. cancelButtonText: "取消",
  4804. type: "warning"
  4805. }).then(() => {
  4806. let tempData = {
  4807. updateBy: this.$store.state.user.name,
  4808. informationList: this.checkedTool
  4809. }
  4810. deleteRoutingTool(tempData).then(({data}) => {
  4811. if (data && data.code === 0) {
  4812. this.searchRoutingTools()
  4813. this.$message({
  4814. message: '操作成功',
  4815. type: 'success',
  4816. duration: 1500,
  4817. onClose: () => {
  4818. }
  4819. })
  4820. } else {
  4821. this.$alert(data.msg, '错误', {
  4822. confirmButtonText: '确定'
  4823. })
  4824. }
  4825. })
  4826. })
  4827. }
  4828. },
  4829. // ======= 正则校验 =======
  4830. handleInput(value, type) {
  4831. // 大于等于0,且只能输入4位小数
  4832. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/, '$1')
  4833. if (val == null || val == undefined || val == '') {
  4834. val = 0
  4835. }
  4836. if (type === 1) {
  4837. this.modalData.machRunFactor = val
  4838. } else if (type === 2) {
  4839. this.detailData.machSetupTime = val
  4840. } else if (type === 3) {
  4841. this.saveDetailData.setupCrewSize = val
  4842. } else if (type === 4) {
  4843. this.componentData.crewSize = val
  4844. } else if (type === 5) {
  4845. this.componentData.laborRunFactor = val
  4846. } else if (type === 6) {
  4847. this.componentData.laborSetupTime = val
  4848. }
  4849. },
  4850. // ======== chooseList相关方法 ========
  4851. // 获取基础数据列表S
  4852. getBaseList(val, type) {
  4853. this.tagNo = val
  4854. this.tagNo1 = type
  4855. this.$nextTick(() => {
  4856. let strVal = ''
  4857. if (val === 118) {
  4858. if (type === 1) {
  4859. strVal = this.componentData.laborClassNo
  4860. } else if (type === 2) {
  4861. strVal = this.componentData.setupLaborClassNo
  4862. }
  4863. }
  4864. if (val === 119) {
  4865. strVal = this.componentData.workCenterNo
  4866. }
  4867. if (val === 122) {
  4868. strVal = this.routingToolData.toolId
  4869. }
  4870. this.$refs.baseList.init(val, strVal)
  4871. })
  4872. },
  4873. // 列表方法的回调
  4874. getBaseData(val) {
  4875. if (this.tagNo === 118) {
  4876. if (this.tagNo1 === 1) {
  4877. this.componentData.laborClassNo = val.level_id
  4878. this.componentData.laborClassDesc = val.level_desc
  4879. } else if (this.tagNo1 === 2) {
  4880. this.componentData.setupLaborClassNo = val.level_id
  4881. this.componentData.setupLaborClassDesc = val.level_desc
  4882. }
  4883. }
  4884. if (this.tagNo === 119) {
  4885. this.componentData.workCenterNo = val.work_center_no
  4886. this.componentData.workCenterDesc = val.work_center_desc
  4887. this.componentData.workCenterType = val.work_center_type
  4888. this.getLaborClassByWorkCenter()
  4889. }
  4890. if (this.tagNo === 122) {
  4891. this.routingToolData.toolId = val.tool_id
  4892. this.routingToolData.toolDescription = val.tool_description
  4893. }
  4894. },
  4895. // 通过加工中心查人员等级
  4896. getLaborClassByWorkCenter() {
  4897. let tempData = {
  4898. site: this.$store.state.user.site,
  4899. levelId: this.componentData.workCenterNo
  4900. }
  4901. queryLaborClassByWorkCenterNo(tempData).then(({data}) => {
  4902. if (data && data.code === 0) {
  4903. if (data.rows.length > 0) {
  4904. this.componentData.laborClassNo = data.rows[0].levelId
  4905. this.componentData.laborClassDesc = data.rows[0].levelDesc
  4906. this.componentData.setupLaborClassNo = data.rows[0].levelId
  4907. this.componentData.setupLaborClassDesc = data.rows[0].levelDesc
  4908. }
  4909. }
  4910. })
  4911. },
  4912. // 机器调机时间改变
  4913. changeMachSetupTime() {
  4914. this.componentData.laborSetupTime = this.componentData.machSetupTime
  4915. },
  4916. // 机器单位产出改变
  4917. changeMachRunFactor() {
  4918. this.componentData.laborRunFactor = this.componentData.machRunFactor
  4919. },
  4920. // 加工中心输入校验
  4921. workCenterBlur(tagNo) {
  4922. console.log('@change触发')
  4923. if (this.componentData.workCenterNo != null && this.componentData.workCenterNo !== '') {
  4924. let tempData = {
  4925. tagno: tagNo,
  4926. conditionSql: " and work_center_no = '" + this.componentData.workCenterNo + "'" + " and site = '" + this.componentData.site + "'"
  4927. }
  4928. verifyData(tempData).then(({data}) => {
  4929. if (data && data.code === 0) {
  4930. if (data.baseListData.length > 0) {
  4931. this.componentData.workCenterNo = data.baseListData[0].work_center_no
  4932. this.componentData.workCenterDesc = data.baseListData[0].work_center_desc
  4933. this.componentData.workCenterType = data.baseListData[0].work_center_type
  4934. this.getLaborClassByWorkCenter()
  4935. return
  4936. }
  4937. }
  4938. })
  4939. }
  4940. this.componentData.workCenterDesc = ''
  4941. this.componentData.workCenterType = ''
  4942. },
  4943. // 人员等级输入校验
  4944. laborClassBlur(tagNo) {
  4945. if (this.componentData.laborClassNo != null && this.componentData.laborClassNo !== '') {
  4946. let tempData = {
  4947. tagno: tagNo,
  4948. conditionSql: " and level_id = '" + this.componentData.laborClassNo + "'" + " and site = '" + this.componentData.site + "'"
  4949. }
  4950. verifyData(tempData).then(({data}) => {
  4951. if (data && data.code === 0) {
  4952. if (data.baseListData.length > 0) {
  4953. this.componentData.laborClassNo = data.baseListData[0].level_id
  4954. this.componentData.laborClassDesc = data.baseListData[0].level_desc
  4955. return
  4956. }
  4957. }
  4958. })
  4959. }
  4960. this.componentData.laborClassDesc = ''
  4961. },
  4962. // 调机时人员等级输入校验
  4963. setupLaborClassBlur(tagNo) {
  4964. if (this.componentData.setupLaborClassNo != null && this.componentData.setupLaborClassNo !== '') {
  4965. let tempData = {
  4966. tagno: tagNo,
  4967. conditionSql: " and level_id = '" + this.componentData.setupLaborClassNo + "'" + " and site = '" + this.componentData.site + "'"
  4968. }
  4969. verifyData(tempData).then(({data}) => {
  4970. if (data && data.code === 0) {
  4971. if (data.baseListData.length > 0) {
  4972. this.componentData.setupLaborClassNo = data.baseListData[0].level_id
  4973. this.componentData.setupLaborClassDesc = data.baseListData[0].level_desc
  4974. return
  4975. }
  4976. }
  4977. })
  4978. }
  4979. this.componentData.setupLaborClassDesc = ''
  4980. },
  4981. // ======== 导出相关方法 ========
  4982. // 导出excel
  4983. async createExportData() {
  4984. this.searchData.limit = -1
  4985. this.searchData.page = 1
  4986. await routingManagementSearch(this.searchData).then(({data}) => {
  4987. this.resultList = data.page.list
  4988. })
  4989. return this.resultList
  4990. },
  4991. startDownload() {
  4992. },
  4993. finishDownload() {
  4994. },
  4995. fields() {
  4996. let json = '{'
  4997. this.columnList.forEach((item, index) => {
  4998. if (index == this.columnList.length - 1) {
  4999. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  5000. } else {
  5001. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  5002. }
  5003. })
  5004. json += '}'
  5005. let s = eval('(' + json + ')')
  5006. return s
  5007. },
  5008. // 切换到Bom
  5009. checkOutToBom(partNo) {
  5010. if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
  5011. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  5012. } else {
  5013. this.$router.push({name: "part-bomManagement", params: {partNo: partNo}})
  5014. }
  5015. },
  5016. // 切换到inventoryPart
  5017. toPartMenu(ifsPartNo) {
  5018. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  5019. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  5020. } else {
  5021. this.$router.push({name: `part-partInformation`, params: {ifsPartNo: ifsPartNo},})
  5022. }
  5023. },
  5024. // 查询加工中心列表
  5025. queryWorkCenter() {
  5026. this.searchData.limit = this.pageSize5
  5027. this.searchData.page = this.pageIndex5
  5028. queryWorkCenterList(this.searchData).then(({data}) => {
  5029. if (data && data.code === 0) {
  5030. this.workCenterList = data.page.list
  5031. this.pageIndex5 = data.page.currPage
  5032. this.pageSize5 = data.page.pageSize
  5033. this.totalPage5 = data.page.totalCount
  5034. this.workCenterModelFlag = true
  5035. } else {
  5036. this.workCenterList = []
  5037. }
  5038. })
  5039. },
  5040. // 查询人员等级列表
  5041. queryWorkerLevel1() {
  5042. //调机过程中人员等级
  5043. this.searchData.limit = this.pageSize6
  5044. this.searchData.page = this.pageIndex6
  5045. queryWorkerLevelList(this.searchData).then(({data}) => {
  5046. if (data && data.code === 0) {
  5047. this.workerLevelList = data.page.list
  5048. this.pageIndex6 = data.page.currPage
  5049. this.pageSize6 = data.page.pageSize
  5050. this.totalPage6 = data.page.totalCount
  5051. this.workerLevelModelFlag1 = true
  5052. } else {
  5053. this.workerLevelList = []
  5054. }
  5055. })
  5056. },
  5057. queryWorkerLevel2() {
  5058. //调机过程中人员等级
  5059. this.searchData.limit = this.pageSize6
  5060. this.searchData.page = this.pageIndex6
  5061. queryWorkerLevelList(this.searchData).then(({data}) => {
  5062. if (data && data.code === 0) {
  5063. this.workerLevelList = data.page.list
  5064. this.pageIndex6 = data.page.currPage
  5065. this.pageSize6 = data.page.pageSize
  5066. this.totalPage6 = data.page.totalCount
  5067. this.workerLevelModelFlag2 = true
  5068. } else {
  5069. this.workerLevelList = []
  5070. }
  5071. })
  5072. },
  5073. // 双击选中加工中心
  5074. getWorkCenterRowData(row) {
  5075. this.componentData.workCenterNo = row.workCenterNo
  5076. this.componentData.workCenterDesc = row.workCenterDesc
  5077. this.componentData.workCenterType = row.workCenterType
  5078. this.searchData.levelId = row.workCenterNo
  5079. this.searchData.lavelDesc = row.workCenterDesc
  5080. queryWorkerLevelList(this.searchData).then(({data}) => {
  5081. if (data && data.code === 0) {
  5082. this.componentData.setupLaborClassNo = data.page.list[0].levelId
  5083. this.componentData.setupLaborClassDesc = data.page.list[0].levelDesc
  5084. this.componentData.laborClassNo = data.page.list[0].levelId
  5085. this.componentData.laborClassDesc = data.page.list[0].levelDesc
  5086. } else {
  5087. this.workCenterList = []
  5088. }
  5089. })
  5090. this.workCenterModelFlag = false
  5091. },
  5092. // 双击选中人员等级
  5093. getWorkerLevelRowData1(row) {
  5094. this.componentData.setupLaborClassNo = row.levelId
  5095. this.componentData.setupLaborClassDesc = row.levelDesc
  5096. this.workerLevelModelFlag1 = false
  5097. },
  5098. getWorkerLevelRowData2(row) {
  5099. this.componentData.laborClassNo = row.levelId
  5100. this.componentData.laborClassDesc = row.levelDesc
  5101. this.workerLevelModelFlag2 = false
  5102. },
  5103. }
  5104. }
  5105. </script>
  5106. <style scoped lang="scss">
  5107. /deep/ .customer-tab .el-tabs__content {
  5108. padding: 0px !important;
  5109. }
  5110. /deep/ .detail-tab .el-tabs__content {
  5111. height: 165px;
  5112. padding: 15px 0px 0px 0px;
  5113. }
  5114. /deep/ .sub_detail-tab .el-tabs__content {
  5115. height: 280px;
  5116. padding: 0px;
  5117. }
  5118. .numInput /deep/ .el-input__inner {
  5119. text-align: right;
  5120. }
  5121. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  5122. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  5123. -webkit-appearance: none;
  5124. }
  5125. /deep/ .inlineNumber input[type="number"] {
  5126. -moz-appearance: textfield;
  5127. padding-right: 5px !important;
  5128. }
  5129. </style>