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.

5285 lines
184 KiB

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