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.

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