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.

5748 lines
199 KiB

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