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.

3813 lines
132 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'物料编码'">
  6. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'物料名称'">
  9. <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="' '">
  12. <el-button :loading="queryLoading" @click="getDataList()">查询</el-button>
  13. <el-button type="primary" @click="addModal()">新增</el-button>
  14. <el-button type="primary" @click="delModal()">删除</el-button>
  15. <download-excel
  16. :fields="fields()"
  17. :data="exportData"
  18. type="xls"
  19. :name="exportName"
  20. :header="exportHeader"
  21. :footer="exportFooter"
  22. :fetch="createExportData"
  23. :before-generate="startDownload"
  24. :before-finish="finishDownload"
  25. worksheet="导出信息"
  26. class="el-button el-button--primary el-button--medium">
  27. {{ "导出" }}
  28. </download-excel>
  29. </el-form-item>
  30. </el-form>
  31. <!-- routing列表 -->
  32. <el-table
  33. :height="height"
  34. :data="dataList"
  35. border
  36. @selection-change="selectionRouting"
  37. style="width: 100%;">
  38. <el-table-column
  39. type="selection"
  40. header-align="center"
  41. align="center"
  42. :selectable="selectFlag"
  43. width="50">
  44. </el-table-column>
  45. <el-table-column
  46. v-for="(item,index) in columnList" :key="index"
  47. :sortable="item.columnSortable"
  48. :prop="item.columnProp"
  49. :header-align="item.headerAlign"
  50. :show-overflow-tooltip="item.showOverflowTooltip"
  51. :align="item.align"
  52. :fixed="item.fixed === ''?false:item.fixed"
  53. :min-width="item.columnWidth"
  54. :label="item.columnLabel">
  55. <template slot-scope="scope">
  56. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  57. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column
  61. fixed="right"
  62. header-align="center"
  63. align="center"
  64. width="120"
  65. label="操作">
  66. <template slot-scope="scope">
  67. <a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
  68. <a type="text" size="small" @click="checkOutToBom(scope.row.partNo)">切换Bom</a>
  69. </template>
  70. </el-table-column>
  71. </el-table>
  72. <!-- 复选统计 -->
  73. <selectDiv ref="selectDiv"></selectDiv>
  74. <!-- 分页插件 -->
  75. <el-pagination style="margin-top: 0px"
  76. @size-change="sizeChangeHandle"
  77. @current-change="currentChangeHandle"
  78. :current-page="pageIndex"
  79. :page-sizes="[20, 50, 100, 200, 500]"
  80. :page-size="pageSize"
  81. :total="totalPage"
  82. layout="total, sizes, prev, pager, next, jumper">
  83. </el-pagination>
  84. <!-- routing新增/编辑模态框 -->
  85. <el-dialog :close-on-click-modal="false" v-drag :before-close="closeModalX" :visible.sync="modalFlag" width="1110px">
  86. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 5px">
  87. <el-form-item prop="partNo" :rules="rules.partNo">
  88. <span v-if="!modalDisableFlag" slot="label" @click="queryPartList"><a herf="#">物料编码</a></span>
  89. <span v-else="modalDisableFlag" slot="label">物料编码</span>
  90. <el-input v-model="modalData.partNo" :disabled="modalDisableFlag" style="width: 221px"></el-input>
  91. </el-form-item>
  92. <el-form-item :label="'物料名称'" prop="partDesc" :rules="rules.partDesc">
  93. <el-input v-model="modalData.partDesc" disabled style="width: 221px"></el-input>
  94. </el-form-item>
  95. <el-form-item :label="'物料单位'">
  96. <el-input v-model="modalData.printUnitName" disabled style="width: 221px"></el-input>
  97. </el-form-item>
  98. <el-form-item :label="'工艺类型'" prop="routingType" :rules="rules.routingType">
  99. <el-select v-model="modalData.routingType" @change="routingTypeChange" :disabled="modalDisableFlag" style="width: 120px">
  100. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  101. <el-option label="Repair" value="Repair"></el-option>
  102. <el-option label="Prototype" value="Prototype"></el-option>
  103. </el-select>
  104. </el-form-item>
  105. </el-form>
  106. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
  107. <el-form-item label="生效日期" prop="phaseInDate" :rules="rules.phaseInDate">
  108. <el-date-picker
  109. style="width: 221px"
  110. v-model="modalData.phaseInDate"
  111. type="date"
  112. value-format="yyyy-MM-dd"
  113. placeholder="请选择日期"
  114. :editable=false>
  115. </el-date-picker>
  116. </el-form-item>
  117. <el-form-item label="失效日期">
  118. <el-date-picker
  119. style="width: 221px"
  120. v-model="modalData.phaseOutDate"
  121. type="date"
  122. value-format="yyyy-MM-dd"
  123. placeholder="请选择日期"
  124. :editable=false>
  125. </el-date-picker>
  126. </el-form-item>
  127. <el-form-item :label="'Routing版本号'" prop="routingRevision" :rules="rules.routingRevision">
  128. <el-input v-model="modalData.routingRevision" type="number" disabled style="width: 221px"></el-input>
  129. </el-form-item>
  130. <el-form-item>
  131. <el-button v-if="modalData.flag === '1'" :loading="saveHeaderLoading" type="primary" @click="saveRoutingHeader" style="margin-top: 23px;width: 142px">保存</el-button>
  132. <el-button v-else type="primary" @click="copyRoutingRevision" style="margin-top: 23px;width: 120px">Copy</el-button>
  133. </el-form-item>
  134. </el-form>
  135. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  136. <el-form-item label="备注">
  137. <el-input type="textarea" v-model="modalData.noteText" :rows="3" resize='none' show-word-limit style="width: 1082px;height: 20px"></el-input>
  138. </el-form-item>
  139. </el-form>
  140. <el-tabs v-model="detailTable" style="margin-top: 50px; width: 100%" type="border-card" @tab-click="tabDetailClick" class="detail-tab">
  141. <!-- Routing明细信息页签 -->
  142. <el-tab-pane label="Routings" name="routing_detail">
  143. <el-form label-position="top" style="margin-top: -10px">
  144. <el-form-item>
  145. <el-button type="primary" @click="saveRoutingDetail" style="margin-left: 7px">新增</el-button>
  146. <el-button type="primary" @click="deleteRoutingDetail">删除</el-button>
  147. <el-button type="primary" @click="updateRoutingDetail">编辑</el-button>
  148. <el-button v-if="modalData.flag === '2'" type="primary" @click="copyRoutingAlternative">Copy</el-button>
  149. <el-button v-if="detailData.status === 'Tentative' || detailData.status === 'Obsolete'" type="primary" @click="updateStatusToBuildable">Build</el-button>
  150. <el-button v-if="detailData.status === 'Buildable' && (modalData.effPhaseOutDate == null || modalData.effPhaseOutDate === '')" type="primary" @click="updateStatusToObsolete">Retire</el-button>
  151. <el-button v-if="modalData.flag === '2' && detailData.officialFlag !== 'Y'" type="primary" @click="toBecomeOfficialRouting">转正式Routing</el-button>
  152. </el-form-item>
  153. </el-form>
  154. <el-form :inline="true" label-position="top" :model="detailData" :rules="rules" style="margin-left: 7px">
  155. <el-form-item :label="'替代编码'">
  156. <el-select v-model="detailData.alternativeNo" @change="alternativeChange" style="width: 221px">
  157. <el-option
  158. v-for = "(i, index) in detailDataList"
  159. :key = "index"
  160. :label = "i.alternativeNo"
  161. :value = "i.alternativeNo">
  162. </el-option>
  163. </el-select>
  164. </el-form-item>
  165. <el-form-item :label="'替代名称'">
  166. <el-input v-model="detailData.alternativeDescription" readonly style="width: 221px"></el-input>
  167. </el-form-item>
  168. <el-form-item :label="'状态'">
  169. <el-input v-model="detailData.status" readonly style="width: 221px"></el-input>
  170. </el-form-item>
  171. </el-form>
  172. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px">
  173. <el-form-item label="备注">
  174. <el-input type="textarea" v-model="detailData.detailNoteText" :rows="3" resize='none' show-word-limit readonly style="width: 1073px;height: 20px"></el-input>
  175. </el-form-item>
  176. </el-form>
  177. </el-tab-pane>
  178. <!-- Routing工具页签 -->
  179. <el-tab-pane label="Routing Tools" name="routing_tool">
  180. <el-form label-position="top" style="margin-top: -10px">
  181. <el-form-item>
  182. <el-button type="primary" @click="saveRoutingTool" style="margin-left: 7px">新增</el-button>
  183. <el-button type="primary" @click="deleteRoutingTool">删除</el-button>
  184. </el-form-item>
  185. </el-form>
  186. <el-table
  187. :data="routingToolList"
  188. height="500px"
  189. border
  190. ref="toolTable"
  191. @row-click="toolClickRow"
  192. @selection-change="toolSelectionChange"
  193. style="width:100%">
  194. <el-table-column type="selection" align="center" width="50"></el-table-column>
  195. <el-table-column
  196. v-for="(item,index) in columnRoutingToolList" :key="index"
  197. :sortable="item.columnSortable"
  198. :prop="item.columnProp"
  199. :header-align="item.headerAlign"
  200. :show-overflow-tooltip="item.showOverflowTooltip"
  201. :align="item.align"
  202. :fixed="item.fixed == ''?false:item.fixed"
  203. :min-width="item.columnWidth"
  204. :label="item.columnLabel">
  205. <template slot-scope="scope">
  206. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  207. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  208. </template>
  209. </el-table-column>
  210. <el-table-column
  211. fixed="right"
  212. header-align="center"
  213. align="center"
  214. width="100"
  215. label="操作">
  216. <template slot-scope="scope">
  217. <a type="text" size="small" @click="updateToolModal(scope.row)">编辑</a>
  218. </template>
  219. </el-table-column>
  220. </el-table>
  221. </el-tab-pane>
  222. </el-tabs>
  223. <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">
  224. <!-- Routing子明细信息页签 -->
  225. <el-tab-pane label="Operations" name="routing_sub_detail">
  226. <el-form label-position="top" style="margin-top: 5px">
  227. <el-form-item>
  228. <el-button type="primary" @click="saveComponentModal" style="margin-left: 7px">新增</el-button>
  229. <el-button type="primary" @click="deleteComponentPart">删除</el-button>
  230. </el-form-item>
  231. </el-form>
  232. <el-table
  233. :data="subDetailList"
  234. height="256px"
  235. border
  236. ref="componentTable"
  237. @row-click="componentClickRow"
  238. :row-class-name="rowClassName"
  239. @selection-change="componentSelectionChange"
  240. style="width:100%">
  241. <el-table-column type="selection" align="center" width="50"></el-table-column>
  242. <el-table-column
  243. v-for="(item,index) in columnSubDetailList" :key="index"
  244. :sortable="item.columnSortable"
  245. :prop="item.columnProp"
  246. :header-align="item.headerAlign"
  247. :show-overflow-tooltip="item.showOverflowTooltip"
  248. :align="item.align"
  249. :fixed="item.fixed == ''?false:item.fixed"
  250. :min-width="item.columnWidth"
  251. :label="item.columnLabel">
  252. <template slot-scope="scope">
  253. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  254. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  255. </template>
  256. </el-table-column>
  257. <el-table-column
  258. fixed="right"
  259. header-align="center"
  260. align="center"
  261. width="100"
  262. label="操作">
  263. <template slot-scope="scope">
  264. <a type="text" size="small" @click="workGuidelineModal(scope.row)">工艺指导</a>
  265. <a type="text" size="small" @click="updateComponentModal(scope.row)">编辑</a>
  266. </template>
  267. </el-table-column>
  268. </el-table>
  269. </el-tab-pane>
  270. </el-tabs>
  271. <el-footer style="height:30px;margin-top:20px;text-align:center">
  272. <el-button :loading="saveAllLoading" type="primary" @click="saveData()">保存</el-button>
  273. <el-button type="primary" @click="closeModal">关闭</el-button>
  274. </el-footer>
  275. </el-dialog>
  276. <!-- 明细新增模态框 -->
  277. <el-dialog title="替代" :close-on-click-modal="false" v-drag :visible.sync="saveDetailModalFlag" width="730px">
  278. <el-form :inline="true" label-position="top" :model="saveDetailData" :rules="detailRules" style="margin-left: 5px">
  279. <el-form-item :label="'替代编码'" prop="alternativeNo" :disabled="saveDetailModalDisable" :rules="detailRules.alternativeNo">
  280. <el-input v-model="saveDetailData.alternativeNo" style="width: 221px"></el-input>
  281. </el-form-item>
  282. <el-form-item :label="'替代名称'" prop="alternativeDescription" :rules="detailRules.alternativeDescription">
  283. <el-input v-model="saveDetailData.alternativeDescription" style="width: 221px"></el-input>
  284. </el-form-item>
  285. <el-form-item :label="'状态'" prop="status" :rules="detailRules.status">
  286. <el-input v-model="saveDetailData.status" disabled style="width: 221px"></el-input>
  287. </el-form-item>
  288. </el-form>
  289. <el-form :inline="true" label-position="top" :model="saveDetailData" style="margin-left: 5px">
  290. <el-form-item label="备注">
  291. <el-input type="textarea" v-model="saveDetailData.detailNoteText" :rows="3" resize='none' show-word-limit style="width: 690px;height: 20px"></el-input>
  292. </el-form-item>
  293. </el-form>
  294. <el-footer style="height:35px;margin-top:65px;text-align:center">
  295. <el-button :loading="saveDetailLoading" type="primary" @click="detailDataSave()">保存</el-button>
  296. <el-button type="primary" @click="saveDetailModalFlag = false">关闭</el-button>
  297. </el-footer>
  298. </el-dialog>
  299. <!-- 物料模态框 -->
  300. <el-dialog title="物料清单" :close-on-click-modal="false" v-drag :visible.sync="partModelFlag" width="520px">
  301. <div class="rq">
  302. <el-form :inline="true" label-position="top" :model="partData">
  303. <el-form-item :label="'物料编码'">
  304. <el-input v-model="partData.partNo" clearable style="width: 120px"></el-input>
  305. </el-form-item>
  306. <el-form-item :label="'物料名称'">
  307. <el-input v-model="partData.partDesc" clearable style="width: 120px"></el-input>
  308. </el-form-item>
  309. <el-form-item :label="' '">
  310. <el-button type="primary" @click="queryPartList()">查询</el-button>
  311. </el-form-item>
  312. </el-form>
  313. <el-table
  314. :height="300"
  315. :data="partList"
  316. @row-dblclick="getRowData"
  317. border
  318. style="width: 100%;">
  319. <el-table-column
  320. v-for="(item,index) in partColumnList" :key="index"
  321. :sortable="item.columnSortable"
  322. :prop="item.columnProp"
  323. :header-align="item.headerAlign"
  324. :show-overflow-tooltip="item.showOverflowTooltip"
  325. :align="item.align"
  326. :fixed="item.fixed==''?false:item.fixed"
  327. :min-width="item.columnWidth"
  328. :label="item.columnLabel">
  329. <template slot-scope="scope">
  330. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  331. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  332. </template>
  333. </el-table-column>
  334. </el-table>
  335. </div>
  336. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  337. <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
  338. </el-footer>
  339. </el-dialog>
  340. <!-- 子明细工序模态框 -->
  341. <el-dialog title="工序清单" :close-on-click-modal="false" v-drag :visible.sync="componentPartModelFlag" width="520px">
  342. <el-form :inline="true" label-position="top" :model="operationData">
  343. <el-form-item :label="'工序编码'">
  344. <el-input v-model="operationData.operationNo" clearable style="width: 120px"></el-input>
  345. </el-form-item>
  346. <el-form-item :label="'工序名称'">
  347. <el-input v-model="operationData.operationName" clearable style="width: 120px"></el-input>
  348. </el-form-item>
  349. <el-form-item :label="' '">
  350. <el-button type="primary" @click="queryOperationList()">查询</el-button>
  351. </el-form-item>
  352. </el-form>
  353. <el-table
  354. :height="300"
  355. :data="operationList"
  356. @row-dblclick="getComponentRowData"
  357. border
  358. style="width: 100%;">
  359. <el-table-column
  360. v-for="(item,index) in componentOperationColumnList" :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. </el-dialog>
  376. <!-- 子明细新增模态框 -->
  377. <el-dialog title="工序" :close-on-click-modal="false" v-drag :visible.sync="componentSaveModal" width="500px">
  378. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
  379. <!-- <el-form-item prop="operationId" :rules="componentRules.operationId">-->
  380. <!-- <span v-if="!componentDisableFlag" slot="label" @click="queryOperationList()"><a herf="#">工序号</a></span>-->
  381. <!-- <span v-if="componentDisableFlag" slot="label">工序号</span>-->
  382. <!-- <el-input v-model="componentData.operationId" :disabled="componentDisableFlag" style="width: 221px"></el-input>-->
  383. <!-- </el-form-item>-->
  384. <el-form-item :label="'工序编码'" prop="operationNo" :rules="componentRules.operationNo">
  385. <el-input v-model="componentData.operationNo" style="width: 221px"></el-input>
  386. </el-form-item>
  387. <el-form-item :label="'工序名称'" prop="operationName" :rules="componentRules.operationName">
  388. <el-input v-model="componentData.operationName" style="width: 221px"></el-input>
  389. </el-form-item>
  390. </el-form>
  391. <el-form :inline="true" label-position="top" :model="componentData" :rules="componentRules" style="margin-left: 5px">
  392. <el-form-item>
  393. <span slot="label" @click="getBaseList(119)"><a herf="#">加工中心编码</a></span>
  394. <el-input v-model="componentData.workCenterNo" style="width: 221px"></el-input>
  395. </el-form-item>
  396. <el-form-item :label="'加工中心名称'">
  397. <el-input v-model="componentData.workCenterDesc" disabled style="width: 221px"></el-input>
  398. </el-form-item>
  399. </el-form>
  400. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  401. <el-form-item :label="'机器运行速度'">
  402. <el-input class="inlineNumber numInput" v-model="componentData.machRunFactor" @input="handleInput(componentData.machRunFactor,1)" type="number" style="width: 221px"></el-input>
  403. </el-form-item>
  404. <el-form-item :label="'人工生产速度'">
  405. <el-input class="inlineNumber numInput" v-model="componentData.laborSetupTime" @input="handleInput(componentData.laborSetupTime,5)" type="number" style="width: 221px"></el-input>
  406. </el-form-item>
  407. </el-form>
  408. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  409. <el-form-item :label="'调机时长'">
  410. <el-input class="inlineNumber numInput" v-model="componentData.machSetupTime" @input="handleInput(componentData.machSetupTime,2)" type="number" style="width: 221px"></el-input>
  411. </el-form-item>
  412. <el-form-item :label="'时长单位'">
  413. <el-select v-model="componentData.runTimeCode" clearable style="width: 221px">
  414. <el-option label="单位/小时" value="A"></el-option>
  415. <el-option label="小时/单位" value="B"></el-option>
  416. <el-option label="小时" value="C"></el-option>
  417. </el-select>
  418. </el-form-item>
  419. </el-form>
  420. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  421. <el-form-item :label="'调机过程中人数'">
  422. <el-input class="inlineNumber numInput" v-model="componentData.setupCrewSize" @input="handleInput(componentData.setupCrewSize,3)" type="number" style="width: 221px"></el-input>
  423. </el-form-item>
  424. <el-form-item :label="'生产过程中人数'">
  425. <el-input class="inlineNumber numInput" v-model="componentData.crewSize" @input="handleInput(componentData.crewSize,4)" type="number" style="width: 221px"></el-input>
  426. </el-form-item>
  427. </el-form>
  428. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  429. <el-form-item :label="'机器效率%'">
  430. <el-input class="inlineNumber numInput" v-model="componentData.efficiencyFactor" @input="handleInputB(componentData.efficiencyFactor,1)" type="number" style="width: 221px"></el-input>
  431. </el-form-item>
  432. <el-form-item :label="'人工效率%'">
  433. <el-input class="inlineNumber numInput" v-model="componentData.laborRunFactor" @input="handleInputB(componentData.laborRunFactor,2)" type="number" style="width: 221px"></el-input>
  434. </el-form-item>
  435. </el-form>
  436. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  437. <el-form-item>
  438. <span slot="label" @click="getBaseList(118, 1)"><a herf="#">人员等级</a></span>
  439. <el-input v-model="componentData.laborClassDesc" style="width: 221px"></el-input>
  440. </el-form-item>
  441. <el-form-item>
  442. <span slot="label" @click="getBaseList(118, 2)"><a herf="#">调机时的人员等级</a></span>
  443. <el-input v-model="componentData.setupLaborClassDesc" style="width: 221px"></el-input>
  444. </el-form-item>
  445. </el-form>
  446. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  447. <el-form-item :label="'外协采购料号'">
  448. <el-input v-model="componentData.outsideOpItem" style="width: 456px"></el-input>
  449. </el-form-item>
  450. <!-- <el-form-item :label="'机台'">-->
  451. <!-- <el-input v-model="componentData.machineNo" style="width: 221px"></el-input>-->
  452. <!-- </el-form-item>-->
  453. </el-form>
  454. <el-form :inline="true" label-position="top" :model="componentData" style="margin-left: 5px">
  455. <el-form-item label="备注">
  456. <el-input type="textarea" v-model="componentData.noteText" :rows="3" resize='none' show-word-limit style="width: 456px;height: 20px"></el-input>
  457. </el-form-item>
  458. </el-form>
  459. <el-footer style="height:35px;margin-top:65px;text-align:center">
  460. <el-button :loading="saveComponentLoading" type="primary" @click="componentDataSave()">保存</el-button>
  461. <el-button type="primary" @click="componentSaveModal = false">关闭</el-button>
  462. </el-footer>
  463. </el-dialog>
  464. <!-- routingTool 新增模态框 -->
  465. <el-dialog title="工艺工具" :close-on-click-modal="false" v-drag :visible.sync="saveRoutingToolModal" width="500px">
  466. <el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
  467. <el-form-item :label="'替代'">
  468. <el-select v-model="routingToolData.alternativeNo" placeholder="请选择" :disabled="saveRoutingToolDisableModal" style="width: 330px">
  469. <el-option
  470. v-for = "i in alternativeList"
  471. :key = "i.alternativeNo"
  472. :label = "i.alternativeDescription"
  473. :value = "i.alternativeNo">
  474. <span style="float: left;width: 100px">{{ i.alternativeNo }}</span>
  475. <span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px">{{ i.alternativeDescription }}</span>
  476. </el-option>
  477. </el-select>
  478. </el-form-item>
  479. <el-form-item :label="'工具数量'">
  480. <el-input class="inlineNumber numInput" v-model="routingToolData.toolQty" type="number" style="width: 120px"></el-input>
  481. </el-form-item>
  482. </el-form>
  483. <el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
  484. <el-form-item>
  485. <span v-if="saveRoutingToolDisableModal === false" slot="label" @click="queryOperationList()"><a>工序</a></span>
  486. <span v-if="saveRoutingToolDisableModal === true" slot="label">工序</span>
  487. <el-input v-model="routingToolData.operationNo" :disabled="saveRoutingToolDisableModal" style="width: 120px"></el-input>
  488. <el-input v-model="routingToolData.operationName" disabled style="width: 340px"></el-input>
  489. </el-form-item>
  490. </el-form>
  491. <el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
  492. <el-form-item>
  493. <span v-if="saveRoutingToolDisableModal === false" slot="label" @click="getBaseList(122)"><a>工具</a></span>
  494. <span v-if="saveRoutingToolDisableModal === true" slot="label">工具</span>
  495. <el-input v-model="routingToolData.toolId" :disabled="saveRoutingToolDisableModal" style="width: 120px"></el-input>
  496. <el-input v-model="routingToolData.toolDescription" disabled style="width: 340px"></el-input>
  497. </el-form-item>
  498. </el-form>
  499. <el-form :inline="true" label-position="top" :model="routingToolData" style="margin-left: 5px">
  500. <el-form-item :label="'备注'">
  501. <el-input v-model="routingToolData.remark" style="width: 462px"></el-input>
  502. </el-form-item>
  503. </el-form>
  504. <el-footer style="height:35px;margin-top:25px;text-align:center">
  505. <el-button type="primary" @click="routingToolSave()">保存</el-button>
  506. <el-button type="primary" @click="saveRoutingToolModal = false">关闭</el-button>
  507. </el-footer>
  508. </el-dialog>
  509. <!-- copyRouting -->
  510. <el-dialog title="Copy Structure Revision" :close-on-click-modal="false" v-drag :visible.sync="copyRoutingModelFlag" width="450px">
  511. <fieldset style="width: 426px">
  512. <legend>Source Revision</legend>
  513. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  514. <el-form-item label="物料编码">
  515. <el-input v-model="modalData.partNo" readonly style="width: 185px"></el-input>
  516. </el-form-item>
  517. <el-form-item label="site">
  518. <el-input v-model="modalData.site" disabled style="width: 185px"></el-input>
  519. </el-form-item>
  520. </el-form>
  521. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  522. <el-form-item label="Routing版本号">
  523. <el-input v-model="modalData.routingRevision" readonly style="width: 185px"></el-input>
  524. </el-form-item>
  525. <el-form-item label="工艺类型">
  526. <el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input>
  527. </el-form-item>
  528. </el-form>
  529. <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
  530. <el-form-item label="生效日期">
  531. <el-date-picker style="width: 185px" v-model="modalData.phaseInDate" readonly type="date" value-format="yyyy-MM-dd"></el-date-picker>
  532. </el-form-item>
  533. <el-form-item label="失效日期">
  534. <el-date-picker style="width: 185px" v-model="modalData.phaseOutDate" readonly type="date" value-format="yyyy-MM-dd"></el-date-picker>
  535. </el-form-item>
  536. </el-form>
  537. <el-table
  538. :data="detailDataList"
  539. height="100px"
  540. border
  541. style="width:100%">
  542. <el-table-column
  543. v-for="(item,index) in columnRoutingDetailList" :key="index"
  544. :sortable="item.columnSortable"
  545. :prop="item.columnProp"
  546. :header-align="item.headerAlign"
  547. :show-overflow-tooltip="item.showOverflowTooltip"
  548. :align="item.align"
  549. :fixed="item.fixed == ''?false:item.fixed"
  550. :min-width="item.columnWidth"
  551. :label="item.columnLabel">
  552. <template slot-scope="scope">
  553. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  554. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  555. </template>
  556. </el-table-column>
  557. </el-table>
  558. </fieldset>
  559. <fieldset style="width: 426px">
  560. <legend>Destination Revision</legend>
  561. <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
  562. <el-form-item label="物料编码">
  563. <el-input v-model="copyRoutingData.partNo" style="width: 185px"></el-input>
  564. </el-form-item>
  565. <el-form-item label="site">
  566. <el-input v-model="copyRoutingData.site" disabled style="width: 185px"></el-input>
  567. </el-form-item>
  568. </el-form>
  569. <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
  570. <el-form-item label="Routing版本号">
  571. <el-input v-model="copyRoutingData.routingRevision" style="width: 185px"></el-input>
  572. </el-form-item>
  573. <el-form-item label="工艺类型">
  574. <el-select v-model="copyRoutingData.routingType" style="width: 185px">
  575. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  576. <el-option label="Repair" value="Repair"></el-option>
  577. <el-option label="Prototype" value="Prototype"></el-option>
  578. </el-select>
  579. </el-form-item>
  580. </el-form>
  581. <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
  582. <el-form-item label="生效日期">
  583. <el-date-picker style="width: 185px" v-model="copyRoutingData.phaseInDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  584. </el-form-item>
  585. <el-form-item label="失效日期">
  586. <el-date-picker style="width: 185px" v-model="copyRoutingData.phaseOutDate" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  587. </el-form-item>
  588. </el-form>
  589. </fieldset>
  590. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  591. <el-button type="primary" @click="copyRouting">保存</el-button>
  592. <el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button>
  593. </el-footer>
  594. </el-dialog>
  595. <!-- copyAlternative -->
  596. <el-dialog title="Copy Structure Alternative" :close-on-click-modal="false" v-drag :visible.sync="copyAlternativeModelFlag" width="450px">
  597. <fieldset style="width: 426px">
  598. <legend>Source Revision</legend>
  599. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  600. <el-form-item label="物料编码">
  601. <el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
  602. </el-form-item>
  603. <el-form-item label="site">
  604. <el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
  605. </el-form-item>
  606. </el-form>
  607. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  608. <el-form-item label="Routing版本号">
  609. <el-input v-model="detailData.routingRevision" readonly style="width: 185px"></el-input>
  610. </el-form-item>
  611. <el-form-item label="工艺类型">
  612. <el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input>
  613. </el-form-item>
  614. </el-form>
  615. <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
  616. <el-form-item label="替代编码">
  617. <el-input v-model="detailData.alternativeNo" readonly style="width: 185px"></el-input>
  618. </el-form-item>
  619. <el-form-item label="替代名称">
  620. <el-input v-model="detailData.alternativeDescription" readonly style="width: 185px"></el-input>
  621. </el-form-item>
  622. </el-form>
  623. </fieldset>
  624. <fieldset style="width: 426px">
  625. <legend>Destination Revision</legend>
  626. <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
  627. <el-form-item label="物料编码">
  628. <el-input v-model="copyAlternativeData.partNo" style="width: 185px"></el-input>
  629. </el-form-item>
  630. <el-form-item label="site">
  631. <el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
  632. </el-form-item>
  633. </el-form>
  634. <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
  635. <el-form-item label="Routing版本号">
  636. <el-input v-model="copyAlternativeData.routingRevision" style="width: 185px"></el-input>
  637. </el-form-item>
  638. <el-form-item label="工艺类型">
  639. <el-select v-model="copyAlternativeData.routingType" style="width: 185px">
  640. <el-option label="Manufacturing" value="Manufacturing"></el-option>
  641. <el-option label="Repair" value="Repair"></el-option>
  642. <el-option label="Prototype" value="Prototype"></el-option>
  643. </el-select>
  644. </el-form-item>
  645. </el-form>
  646. <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
  647. <el-form-item label="替代编码">
  648. <el-input v-model="copyAlternativeData.alternativeNo" style="width: 185px"></el-input>
  649. </el-form-item>
  650. <el-form-item label="替代名称">
  651. <el-input v-model="copyAlternativeData.alternativeDescription" style="width: 185px"></el-input>
  652. </el-form-item>
  653. </el-form>
  654. </fieldset>
  655. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  656. <el-button type="primary" @click="copyAlternative">保存</el-button>
  657. <el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
  658. </el-footer>
  659. </el-dialog>
  660. <!-- workGuideline -->
  661. <el-dialog title="工艺指导" :close-on-click-modal="false" v-drag :visible.sync="queryWorkGuidelineModal" width="1000px">
  662. <el-form :inline="true" label-position="top" :model="workGuidelineData" style="margin-left: 5px">
  663. <el-form-item :label="'物料编码'">
  664. <el-input v-model="workGuidelineData.partNo" readonly style="width: 120px"></el-input>
  665. </el-form-item>
  666. <el-form-item :label="'物料名称'">
  667. <el-input v-model="workGuidelineData.partDesc" readonly style="width: 240px"></el-input>
  668. </el-form-item>
  669. <el-form-item :label="'Routing版本号'">
  670. <el-input v-model="workGuidelineData.routingRevision" readonly style="width: 80px"></el-input>
  671. </el-form-item>
  672. <el-form-item :label="'工艺类型'">
  673. <el-input v-model="workGuidelineData.routingType" readonly style="width: 120px"></el-input>
  674. </el-form-item>
  675. </el-form>
  676. <el-form :inline="true" label-position="top" :model="workGuidelineData" style="margin-left: 5px">
  677. <el-form-item :label="'替代编码'">
  678. <el-input v-model="workGuidelineData.alternativeNo" readonly style="width: 120px"></el-input>
  679. </el-form-item>
  680. <el-form-item :label="'替代名称'">
  681. <el-input v-model="workGuidelineData.alternativeDescription" readonly style="width: 240px"></el-input>
  682. </el-form-item>
  683. <el-form-item :label="'工序编码'">
  684. <el-input v-model="workGuidelineData.operationNo" readonly style="width: 120px"></el-input>
  685. </el-form-item>
  686. <el-form-item :label="'工序名称'">
  687. <el-input v-model="workGuidelineData.operationName" readonly style="width: 240px"></el-input>
  688. </el-form-item>
  689. </el-form>
  690. <!-- 页签 -->
  691. <el-tabs style="width: 100%" type="border-card" class="customer-tab">
  692. <!-- Graphical Structure页签 -->
  693. <el-tab-pane label="Work Guidelines">
  694. <el-form label-position="top" style="margin-top: 0px">
  695. <el-button type="primary" @click="saveWorkGuideline()" style="margin-left: 2px">新增</el-button>
  696. <el-button type="primary" @click="deleteModal()">删除</el-button>
  697. </el-form>
  698. <el-table
  699. height="400px"
  700. :data="workGuidelineList"
  701. border
  702. @selection-change="selectionWorkGuideline"
  703. style="width: 100%">
  704. <el-table-column
  705. type="selection"
  706. header-align="center"
  707. align="center"
  708. :selectable="selectFlag"
  709. width="50">
  710. </el-table-column>
  711. <el-table-column
  712. v-for="(item,index) in workGuidelineColumnList" :key="index"
  713. :sortable="item.columnSortable"
  714. :prop="item.columnProp"
  715. :header-align="item.headerAlign"
  716. :show-overflow-tooltip="item.showOverflowTooltip"
  717. :align="item.align"
  718. :fixed="item.fixed==''?false:item.fixed"
  719. :min-width="item.columnWidth"
  720. :label="item.columnLabel">
  721. <template slot-scope="scope">
  722. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
  723. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  724. </template>
  725. </el-table-column>
  726. <el-table-column
  727. fixed="right"
  728. header-align="center"
  729. align="center"
  730. width="100"
  731. label="操作">
  732. <template slot-scope="scope">
  733. <a type="text" size="small" @click="updateWorkGuidelineModal(scope.row)">编辑</a>
  734. </template>
  735. </el-table-column>
  736. </el-table>
  737. </el-tab-pane>
  738. </el-tabs>
  739. <el-footer style="height:40px;margin-top: 10px;text-align:center">
  740. <el-button type="primary" @click="queryWorkGuidelineModal = false">关闭</el-button>
  741. </el-footer>
  742. </el-dialog>
  743. <!-- workGuideline 新增模态框 -->
  744. <el-dialog title="替代" :close-on-click-modal="false" v-drag :visible.sync="saveWorkGuidelineModal" width="664px">
  745. <el-form :inline="true" label-position="top" :model="saveWorkGuidelineData" :rules="guidelineRules" style="margin-left: 5px">
  746. <el-form-item :label="'序号'" prop="guidelineSeq" :rules="guidelineRules.guidelineSeq">
  747. <el-input class="inlineNumber numInput" v-model="saveWorkGuidelineData.guidelineSeq" type="number" style="width: 60px"></el-input>
  748. </el-form-item>
  749. <el-form-item :label="'工艺指导名称'" prop="guidelineDesc" :rules="guidelineRules.guidelineDesc">
  750. <el-input v-model="saveWorkGuidelineData.guidelineDesc" style="width: 126px"></el-input>
  751. </el-form-item>
  752. <el-form-item :label="'工艺指导描述'">
  753. <el-input v-model="saveWorkGuidelineData.guidelineText" style="width: 413px"></el-input>
  754. </el-form-item>
  755. </el-form>
  756. <el-form :inline="true" label-position="top" :model="saveWorkGuidelineData" :rules="guidelineRules" style="margin-left: 5px">
  757. <el-form-item :label="'工艺指导类型'" prop="guidelineType" :rules="guidelineRules.guidelineType">
  758. <el-select v-model="saveWorkGuidelineData.guidelineType" style="width: 200px">
  759. <el-option label="Subtask" value="Subtask"></el-option>
  760. <el-option label="Instruction" value="Instruction"></el-option>
  761. </el-select>
  762. </el-form-item>
  763. <el-form-item :label="'签字'" prop="signOffRequired" :rules="guidelineRules.signOffRequired">
  764. <el-select v-model="saveWorkGuidelineData.signOffRequired" style="width: 200px">
  765. <el-option label="Required to Close Operation" value="Required to Close Operation"></el-option>
  766. <el-option label="Not Required" value="Not Required"></el-option>
  767. </el-select>
  768. </el-form-item>
  769. <el-form-item :label="'检验签字'" prop="inspectionSignOffRequired" :rules="guidelineRules.inspectionSignOffRequired">
  770. <el-select v-model="saveWorkGuidelineData.inspectionSignOffRequired" style="width: 200px">
  771. <el-option label="Required to Shop Order" value="Required to Shop Order"></el-option>
  772. <el-option label="Required to Close Operation" value="Required to Close Operation"></el-option>
  773. <el-option label="Not Required" value="Not Required"></el-option>
  774. </el-select>
  775. </el-form-item>
  776. </el-form>
  777. <el-footer style="height:35px;margin-top:25px;text-align:center">
  778. <el-button type="primary" @click="workGuidelineCommit()">保存</el-button>
  779. <el-button type="primary" @click="saveWorkGuidelineModal = false">关闭</el-button>
  780. </el-footer>
  781. </el-dialog>
  782. <!-- chooseList模态框 -->
  783. <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
  784. </div>
  785. </template>
  786. <script>
  787. import {
  788. routingManagementSearch, // routing 列表查询
  789. routingManagementSave, // routing 新增
  790. routingManagementEdit, // routing 编辑
  791. routingManagementDelete, // routing 删除
  792. queryRoutingHeader, // 查询 routing 主信息
  793. saveRoutingHeader, // 新增 routing 主信息
  794. queryRoutingDetail, // 查 routing 明细
  795. routingDetailSave, // routing 明细新增
  796. routingDetailUpdate, // routing 明细编辑
  797. updateAlternativeStatus, // 修改明细状态
  798. routingDetailDelete, // routing 明细删除
  799. queryPartList, // 查询物料清单
  800. queryRoutingComponent, // 查询 routing 子明细
  801. saveRoutingComponent, // 新增 routing 子明细
  802. updateRoutingComponent, // 修改 routing 子明细
  803. deleteRoutingComponent, // 删除 routing 子明细
  804. queryOperationList, // 查询工序列表
  805. getRottingRevision, // 获取物料的 routing 版本号
  806. searchRoutingTools, // 获取 routingTools
  807. routingToolSave, // 新增 routingTool
  808. queryOperationListByAlternative, // 根据替代查询工序列表
  809. queryAlternativeListByPartNo, // 根据物料查询替代
  810. routingToolEdit, // 编辑 routingTool
  811. deleteRoutingTool, // 删除 routingTool
  812. copyRouting, // 复制routing
  813. copyAlternative, // 复制alternative
  814. toBecomeOfficialRouting, // 转正式Routing
  815. } from '@/api/part/routingManagement.js'
  816. import {
  817. routingSearchAlternative, // routing 替代列表查询
  818. getRoutingWorkGuideline, // 获取 workGuideline
  819. getGuidelineSeq, // 获取 guidelineSeq
  820. workGuidelineSave, // 新增 workGuideline
  821. workGuidelineEdit, // 编辑 workGuideline
  822. deleteWorkGuideline, // 删除 workGuideline
  823. } from '@/api/part/routingOperationWorkGuidelines.js'
  824. import ChooseList from '@/views/modules/common/Chooselist'
  825. export default {
  826. // 组件
  827. components: {
  828. ChooseList
  829. },
  830. // 监听
  831. watch: {
  832. searchData: {
  833. deep: true,
  834. handler: function (newV, oldV) {
  835. this.searchData.partNo = this.searchData.partNo.toUpperCase()
  836. }
  837. },
  838. saveDetailData: {
  839. deep: true,
  840. handler: function (newV, oldV) {
  841. this.saveDetailData.alternativeNo = this.saveDetailData.alternativeNo.toUpperCase()
  842. }
  843. }
  844. },
  845. // 对象
  846. data () {
  847. return {
  848. // 导出
  849. exportData: [],
  850. exportName: 'routing物料列表' + this.dayjs().format('YYYYMMDDHHmmss'),
  851. exportHeader: ['routing物料列表'],
  852. exportFooter: [],
  853. resultList: [],
  854. // ======== 行高 ========
  855. height: 200,
  856. // ======== 分页 ========
  857. pageIndex: 1,
  858. pageSize: 50,
  859. totalPage: 0,
  860. selectedDataNum: 0,
  861. // 条件查询
  862. searchData: {
  863. site: this.$store.state.user.site,
  864. partNo: '',
  865. partDesc: '',
  866. page: 1,
  867. limit: 10
  868. },
  869. // loading
  870. queryLoading: false,
  871. saveHeaderLoading: false,
  872. saveDetailLoading: false,
  873. saveComponentLoading: false,
  874. saveAllLoading: false,
  875. // 初始页签
  876. detailTable: 'routing_detail',
  877. subDetailTable: 'routing_sub_detail',
  878. // ======== 数据对象 ========
  879. modalData: {
  880. flag: '',
  881. title: '',
  882. site: this.$store.state.user.site,
  883. partNo: '',
  884. partDesc: '',
  885. routingRevision: '',
  886. routingType: '',
  887. noteText: '',
  888. phaseInDate: '',
  889. phaseOutDate: '',
  890. createDate: '',
  891. createBy: '',
  892. updateDate: '',
  893. updateBy: '',
  894. printUnit: '',
  895. printUnitName: '',
  896. officialFlag: ''
  897. },
  898. detailData: {
  899. site: this.$store.state.user.site,
  900. partNo: '',
  901. routingRevision: '',
  902. routingType: '',
  903. alternativeNo: '',
  904. alternativeDescription: '',
  905. routTemplateId: '',
  906. planDate: '',
  907. fixedLeadTimeDay: '',
  908. fixedLeadTimeHour: '',
  909. variableLeadTimeDay: '',
  910. variableLeadTimeHour: '',
  911. forStdLotByDay: '',
  912. forLotByDay: '',
  913. minLotQty: '',
  914. detailNoteText: '',
  915. status: '',
  916. createDate: '',
  917. createBy: '',
  918. updateDate: '',
  919. updateBy: '',
  920. officialFlag: ''
  921. },
  922. componentData: {
  923. flag: '',
  924. site: this.$store.state.user.site,
  925. partNo: '',
  926. routingRevision: '',
  927. routingType: '',
  928. alternativeNo: '',
  929. operationId: '',
  930. operationNo: '',
  931. operationName: '',
  932. efficiencyFactor: '',
  933. machRunFactor: '',
  934. machSetupTime: '',
  935. runTimeCode: '',
  936. laborRunFactor: '',
  937. laborSetupTime: '',
  938. crewSize: '',
  939. setupCrewSize: '',
  940. outsideOpItem: '',
  941. machineNo: '',
  942. workCenterNo: '',
  943. workCenterDesc: '',
  944. laborClassNo: '',
  945. laborClassDesc: '',
  946. setupLaborClassNo: '',
  947. setupLaborClassDesc: '',
  948. overlap: '',
  949. noteText: '',
  950. createDate: '',
  951. createBy: '',
  952. updateDate: '',
  953. updateBy: ''
  954. },
  955. partData: {
  956. site: this.$store.state.user.site,
  957. partNo: '',
  958. partDesc: '',
  959. },
  960. operationData: {
  961. site: this.$store.state.user.site,
  962. partNo: '',
  963. routingRevision: '',
  964. routingType: '',
  965. alternativeNo: '',
  966. operationNo: '',
  967. operationName: '',
  968. },
  969. saveDetailData: {
  970. flag: '',
  971. site: this.$store.state.user.site,
  972. partNo: '',
  973. routingRevision: '',
  974. routingType: '',
  975. alternativeNo: '',
  976. alternativeDescription: '',
  977. routTemplateId: '',
  978. planDate: '',
  979. fixedLeadTimeDay: '',
  980. fixedLeadTimeHour: '',
  981. variableLeadTimeDay: '',
  982. variableLeadTimeHour: '',
  983. forStdLotByDay: '',
  984. forLotByDay: '',
  985. minLotQty: '',
  986. detailNoteText: '',
  987. status: '',
  988. createDate: '',
  989. createBy: '',
  990. updateDate: '',
  991. updateBy: ''
  992. },
  993. routingToolData: {
  994. flag: '',
  995. site: this.$store.state.user.site,
  996. partNo: '',
  997. partDesc: '',
  998. routingRevision: '',
  999. routingType: '',
  1000. alternativeNo: '',
  1001. alternativeDescription: '',
  1002. operationId: '',
  1003. operationNo: '',
  1004. operationName: '',
  1005. toolId: '',
  1006. toolDescription: '',
  1007. toolQty: '',
  1008. remark: '',
  1009. createBy: '',
  1010. updateBy: ''
  1011. },
  1012. copyRoutingData: {
  1013. site: '',
  1014. partNo: '',
  1015. routingRevision: '',
  1016. routingType: '',
  1017. phaseInDate: '',
  1018. phaseOutDate: '',
  1019. previousVersion: {},
  1020. createBy: ''
  1021. },
  1022. copyAlternativeData: {
  1023. site: '',
  1024. partNo: '',
  1025. routingRevision: '',
  1026. routingType: '',
  1027. alternativeNo: '',
  1028. alternativeDescription: '',
  1029. routTemplateId: '',
  1030. planDate: '',
  1031. fixedLeadTimeDay: '',
  1032. fixedLeadTimeHour: '',
  1033. variableLeadTimeDay: '',
  1034. variableLeadTimeHour: '',
  1035. forStdLotByDay: '',
  1036. forLotByDay: '',
  1037. minLotQty: '',
  1038. detailNoteText: '',
  1039. status: '',
  1040. previousVersion: {},
  1041. createBy: ''
  1042. },
  1043. workGuidelineData: {
  1044. site: this.$store.state.user.site,
  1045. partNo: '',
  1046. partDesc: '',
  1047. routingRevision: '',
  1048. routingType: '',
  1049. alternativeNo: '',
  1050. alternativeDescription: '',
  1051. operationId: '',
  1052. operationNo: '',
  1053. operationName: ''
  1054. },
  1055. saveWorkGuidelineData: {
  1056. flag: '',
  1057. id: '',
  1058. site: this.$store.state.user.site,
  1059. partNo: '',
  1060. partDesc: '',
  1061. routingRevision: '',
  1062. routingType: '',
  1063. alternativeNo: '',
  1064. alternativeDescription: '',
  1065. operationId: '',
  1066. operationNo: '',
  1067. operationName: '',
  1068. guidelineSeq: '',
  1069. guidelineDesc: '',
  1070. guidelineText: '',
  1071. guidelineType: '',
  1072. signOffRequired: '',
  1073. inspectionSignOffRequired: '',
  1074. createBy: '',
  1075. updateBy: ''
  1076. },
  1077. // ======== 数据列表 ========
  1078. dataList: [],
  1079. partList: [],
  1080. operationList: [],
  1081. componentPartSelections: [],
  1082. subDetailList: [],
  1083. detailDataList: [],
  1084. checkedDetail: [],
  1085. checkedTool: [],
  1086. routingToolList: [],
  1087. alternativeList: [],
  1088. workGuidelineList: [],
  1089. // ======== 列表表头 ========
  1090. columnList: [
  1091. {
  1092. userId: this.$store.state.user.name,
  1093. functionId: 104003,
  1094. serialNumber: '104003Table1PartNo',
  1095. tableId: '104003Table1',
  1096. tableName: 'Routing信息表',
  1097. columnProp: 'partNo',
  1098. headerAlign: 'center',
  1099. align: 'center',
  1100. columnLabel: '物料编码',
  1101. columnHidden: false,
  1102. columnImage: false,
  1103. columnSortable: false,
  1104. sortLv: 0,
  1105. status: true,
  1106. fixed: '',
  1107. columnWidth: 120
  1108. },
  1109. {
  1110. userId: this.$store.state.user.name,
  1111. functionId: 104003,
  1112. serialNumber: '104003Table1PartDesc',
  1113. tableId: '104003Table1',
  1114. tableName: 'Routing信息表',
  1115. columnProp: 'partDesc',
  1116. headerAlign: 'center',
  1117. align: 'left',
  1118. columnLabel: '物料名称',
  1119. columnHidden: false,
  1120. columnImage: false,
  1121. columnSortable: false,
  1122. sortLv: 0,
  1123. status: true,
  1124. fixed: '',
  1125. columnWidth: 120
  1126. },
  1127. {
  1128. userId: this.$store.state.user.name,
  1129. functionId: 104003,
  1130. serialNumber: '104003Table1RoutingType',
  1131. tableId: '104003Table1',
  1132. tableName: 'Routing信息表',
  1133. columnProp: 'routingType',
  1134. headerAlign: 'center',
  1135. align: 'center',
  1136. columnLabel: '工艺类型',
  1137. columnHidden: false,
  1138. columnImage: false,
  1139. columnSortable: false,
  1140. sortLv: 0,
  1141. status: true,
  1142. fixed: '',
  1143. columnWidth: 120
  1144. },
  1145. {
  1146. userId: this.$store.state.user.name,
  1147. functionId: 104003,
  1148. serialNumber: '104003Table1RoutingRevision',
  1149. tableId: '104003Table1',
  1150. tableName: 'Routing信息表',
  1151. columnProp: 'routingRevision',
  1152. headerAlign: 'center',
  1153. align: 'center',
  1154. columnLabel: 'Routing版本号',
  1155. columnHidden: false,
  1156. columnImage: false,
  1157. columnSortable: false,
  1158. sortLv: 0,
  1159. status: true,
  1160. fixed: '',
  1161. columnWidth: 120
  1162. },
  1163. {
  1164. userId: this.$store.state.user.name,
  1165. functionId: 104003,
  1166. serialNumber: '104003Table1CreateDate',
  1167. tableId: '104003Table1',
  1168. tableName: 'Routing信息表',
  1169. columnProp: 'createDate',
  1170. headerAlign: 'center',
  1171. align: 'center',
  1172. columnLabel: '创建时间',
  1173. columnHidden: false,
  1174. columnImage: false,
  1175. columnSortable: false,
  1176. sortLv: 0,
  1177. status: true,
  1178. fixed: '',
  1179. columnWidth: 160
  1180. },
  1181. {
  1182. userId: this.$store.state.user.name,
  1183. functionId: 104003,
  1184. serialNumber: '104003Table1CreateBy',
  1185. tableId: '104003Table1',
  1186. tableName: 'Routing信息表',
  1187. columnProp: 'createBy',
  1188. headerAlign: 'center',
  1189. align: 'center',
  1190. columnLabel: '创建人',
  1191. columnHidden: false,
  1192. columnImage: false,
  1193. columnSortable: false,
  1194. sortLv: 0,
  1195. status: true,
  1196. fixed: '',
  1197. columnWidth: 80
  1198. },
  1199. {
  1200. userId: this.$store.state.user.name,
  1201. functionId: 104003,
  1202. serialNumber: '104003Table1UpdateDate',
  1203. tableId: '104003Table1',
  1204. tableName: 'Routing信息表',
  1205. columnProp: 'updateDate',
  1206. headerAlign: 'center',
  1207. align: 'center',
  1208. columnLabel: '更新时间',
  1209. columnHidden: false,
  1210. columnImage: false,
  1211. columnSortable: false,
  1212. sortLv: 0,
  1213. status: true,
  1214. fixed: '',
  1215. columnWidth: 160
  1216. },
  1217. {
  1218. userId: this.$store.state.user.name,
  1219. functionId: 104003,
  1220. serialNumber: '104003Table1UpdateBy',
  1221. tableId: '104003Table1',
  1222. tableName: 'Routing信息表',
  1223. columnProp: 'updateBy',
  1224. headerAlign: 'center',
  1225. align: 'center',
  1226. columnLabel: '更新人',
  1227. columnHidden: false,
  1228. columnImage: false,
  1229. columnSortable: false,
  1230. sortLv: 0,
  1231. status: true,
  1232. fixed: '',
  1233. columnWidth: 80
  1234. }
  1235. ],
  1236. partColumnList: [
  1237. {
  1238. columnProp: 'partNo',
  1239. headerAlign: "center",
  1240. align: "center",
  1241. columnLabel: '物料编码',
  1242. columnHidden: false,
  1243. columnImage: false,
  1244. columnSortable: false,
  1245. sortLv: 0,
  1246. status: true,
  1247. fixed: '',
  1248. },
  1249. {
  1250. columnProp: 'partDesc',
  1251. headerAlign: "center",
  1252. align: "center",
  1253. columnLabel: '物料名称',
  1254. columnHidden: false,
  1255. columnImage: false,
  1256. columnSortable: false,
  1257. sortLv: 0,
  1258. status: true,
  1259. fixed: '',
  1260. },
  1261. {
  1262. columnProp: 'spec',
  1263. headerAlign: "center",
  1264. align: "center",
  1265. columnLabel: '规格型号',
  1266. columnHidden: false,
  1267. columnImage: false,
  1268. columnSortable: false,
  1269. sortLv: 0,
  1270. status: true,
  1271. fixed: '',
  1272. },
  1273. {
  1274. columnProp: 'printUnitName',
  1275. headerAlign: "center",
  1276. align: "center",
  1277. columnLabel: '计量单位',
  1278. columnHidden: false,
  1279. columnImage: false,
  1280. columnSortable: false,
  1281. sortLv: 0,
  1282. status: true,
  1283. fixed: '',
  1284. },
  1285. ],
  1286. componentOperationColumnList: [
  1287. {
  1288. columnProp: 'operationNo',
  1289. headerAlign: "center",
  1290. align: "center",
  1291. columnLabel: '工序编码',
  1292. columnHidden: false,
  1293. columnImage: false,
  1294. columnSortable: false,
  1295. sortLv: 0,
  1296. status: true,
  1297. fixed: '',
  1298. },
  1299. {
  1300. columnProp: 'operationName',
  1301. headerAlign: "center",
  1302. align: "center",
  1303. columnLabel: '工序名称',
  1304. columnHidden: false,
  1305. columnImage: false,
  1306. columnSortable: false,
  1307. sortLv: 0,
  1308. status: true,
  1309. fixed: '',
  1310. }
  1311. ],
  1312. columnSubDetailList: [
  1313. {
  1314. userId: this.$store.state.user.name,
  1315. functionId: 104003,
  1316. serialNumber: '104003Table2OperationNo',
  1317. tableId: '104003Table2',
  1318. tableName: 'Routing工序表',
  1319. columnProp: 'operationNo',
  1320. headerAlign: 'center',
  1321. align: 'center',
  1322. columnLabel: '工序编码',
  1323. columnHidden: false,
  1324. columnImage: false,
  1325. columnSortable: false,
  1326. sortLv: 0,
  1327. status: true,
  1328. fixed: '',
  1329. columnWidth: 80
  1330. },
  1331. {
  1332. userId: this.$store.state.user.name,
  1333. functionId: 104003,
  1334. serialNumber: '104003Table2OperationName',
  1335. tableId: '104003Table2',
  1336. tableName: 'Routing工序表',
  1337. columnProp: 'operationName',
  1338. headerAlign: 'center',
  1339. align: 'left',
  1340. columnLabel: '工序名称',
  1341. columnHidden: false,
  1342. columnImage: false,
  1343. columnSortable: false,
  1344. sortLv: 0,
  1345. status: true,
  1346. fixed: '',
  1347. columnWidth: 120
  1348. },
  1349. {
  1350. userId: this.$store.state.user.name,
  1351. functionId: 104003,
  1352. serialNumber: '104003Table2EfficiencyFactor',
  1353. tableId: '104003Table2',
  1354. tableName: 'Routing工序表',
  1355. columnProp: 'efficiencyFactor',
  1356. headerAlign: 'center',
  1357. align: 'right',
  1358. columnLabel: '机器效率',
  1359. columnHidden: false,
  1360. columnImage: false,
  1361. columnSortable: false,
  1362. sortLv: 0,
  1363. status: true,
  1364. fixed: '',
  1365. columnWidth: 80
  1366. },
  1367. {
  1368. userId: this.$store.state.user.name,
  1369. functionId: 104003,
  1370. serialNumber: '104003Table2MachRunFactor',
  1371. tableId: '104003Table2',
  1372. tableName: 'Routing工序表',
  1373. columnProp: 'machRunFactor',
  1374. headerAlign: 'center',
  1375. align: 'right',
  1376. columnLabel: '机器运行速度',
  1377. columnHidden: false,
  1378. columnImage: false,
  1379. columnSortable: false,
  1380. sortLv: 0,
  1381. status: true,
  1382. fixed: '',
  1383. columnWidth: 80
  1384. },
  1385. {
  1386. userId: this.$store.state.user.name,
  1387. functionId: 104003,
  1388. serialNumber: '104003Table2MachSetupTime',
  1389. tableId: '104003Table2',
  1390. tableName: 'Routing工序表',
  1391. columnProp: 'machSetupTime',
  1392. headerAlign: 'center',
  1393. align: 'right',
  1394. columnLabel: '调机时长',
  1395. columnHidden: false,
  1396. columnImage: false,
  1397. columnSortable: false,
  1398. sortLv: 0,
  1399. status: true,
  1400. fixed: '',
  1401. columnWidth: 80
  1402. },
  1403. {
  1404. userId: this.$store.state.user.name,
  1405. functionId: 104003,
  1406. serialNumber: '104003Table2RunTimeCode',
  1407. tableId: '104003Table2',
  1408. tableName: 'Routing工序表',
  1409. columnProp: 'runTimeCode',
  1410. headerAlign: 'center',
  1411. align: 'center',
  1412. columnLabel: '时长单位',
  1413. columnHidden: false,
  1414. columnImage: false,
  1415. columnSortable: false,
  1416. sortLv: 0,
  1417. status: true,
  1418. fixed: '',
  1419. columnWidth: 60
  1420. },
  1421. {
  1422. userId: this.$store.state.user.name,
  1423. functionId: 104003,
  1424. serialNumber: '104003Table2LaborRunFactor',
  1425. tableId: '104003Table2',
  1426. tableName: 'Routing工序表',
  1427. columnProp: 'laborRunFactor',
  1428. headerAlign: 'center',
  1429. align: 'right',
  1430. columnLabel: '人工效率',
  1431. columnHidden: false,
  1432. columnImage: false,
  1433. columnSortable: false,
  1434. sortLv: 0,
  1435. status: true,
  1436. fixed: '',
  1437. columnWidth: 80
  1438. },
  1439. {
  1440. userId: this.$store.state.user.name,
  1441. functionId: 104003,
  1442. serialNumber: '104003Table2LaborSetupTime',
  1443. tableId: '104003Table2',
  1444. tableName: 'Routing工序表',
  1445. columnProp: 'laborSetupTime',
  1446. headerAlign: 'center',
  1447. align: 'right',
  1448. columnLabel: '人工生产速度',
  1449. columnHidden: false,
  1450. columnImage: false,
  1451. columnSortable: false,
  1452. sortLv: 0,
  1453. status: true,
  1454. fixed: '',
  1455. columnWidth: 80
  1456. },
  1457. {
  1458. userId: this.$store.state.user.name,
  1459. functionId: 104003,
  1460. serialNumber: '104003Table2CrewSize',
  1461. tableId: '104003Table2',
  1462. tableName: 'Routing工序表',
  1463. columnProp: 'crewSize',
  1464. headerAlign: 'center',
  1465. align: 'right',
  1466. columnLabel: '生产过程人数',
  1467. columnHidden: false,
  1468. columnImage: false,
  1469. columnSortable: false,
  1470. sortLv: 0,
  1471. status: true,
  1472. fixed: '',
  1473. columnWidth: 80
  1474. },
  1475. {
  1476. userId: this.$store.state.user.name,
  1477. functionId: 104003,
  1478. serialNumber: '104003Table2SetupCrewSize',
  1479. tableId: '104003Table2',
  1480. tableName: 'Routing工序表',
  1481. columnProp: 'setupCrewSize',
  1482. headerAlign: 'center',
  1483. align: 'right',
  1484. columnLabel: '调机过程人数',
  1485. columnHidden: false,
  1486. columnImage: false,
  1487. columnSortable: false,
  1488. sortLv: 0,
  1489. status: true,
  1490. fixed: '',
  1491. columnWidth: 80
  1492. },
  1493. {
  1494. userId: this.$store.state.user.name,
  1495. functionId: 104003,
  1496. serialNumber: '104003Table2OutsideOpItem',
  1497. tableId: '104003Table2',
  1498. tableName: 'Routing工序表',
  1499. columnProp: 'outsideOpItem',
  1500. headerAlign: 'center',
  1501. align: 'center',
  1502. columnLabel: '外协采购料号',
  1503. columnHidden: false,
  1504. columnImage: false,
  1505. columnSortable: false,
  1506. sortLv: 0,
  1507. status: true,
  1508. fixed: '',
  1509. columnWidth: 120
  1510. },
  1511. // {
  1512. // userId: this.$store.state.user.name,
  1513. // functionId: 104003,
  1514. // serialNumber: '104003Table2MachineNo',
  1515. // tableId: '104003Table2',
  1516. // tableName: 'Routing工序表',
  1517. // columnProp: 'machineNo',
  1518. // headerAlign: 'center',
  1519. // align: 'center',
  1520. // columnLabel: '机台',
  1521. // columnHidden: false,
  1522. // columnImage: false,
  1523. // columnSortable: false,
  1524. // sortLv: 0,
  1525. // status: true,
  1526. // fixed: '',
  1527. // columnWidth: 80
  1528. // },
  1529. {
  1530. userId: this.$store.state.user.name,
  1531. functionId: 104003,
  1532. serialNumber: '104003Table2WorkCenterDesc',
  1533. tableId: '104003Table2',
  1534. tableName: 'Routing工序表',
  1535. columnProp: 'workCenterDesc',
  1536. headerAlign: 'center',
  1537. align: 'center',
  1538. columnLabel: '加工中心',
  1539. columnHidden: false,
  1540. columnImage: false,
  1541. columnSortable: false,
  1542. sortLv: 0,
  1543. status: true,
  1544. fixed: '',
  1545. columnWidth: 120
  1546. },
  1547. {
  1548. userId: this.$store.state.user.name,
  1549. functionId: 104003,
  1550. serialNumber: '104003Table2LaborClassNo',
  1551. tableId: '104003Table2',
  1552. tableName: 'Routing工序表',
  1553. columnProp: 'laborClassDesc',
  1554. headerAlign: 'center',
  1555. align: 'center',
  1556. columnLabel: '人员等级',
  1557. columnHidden: false,
  1558. columnImage: false,
  1559. columnSortable: false,
  1560. sortLv: 0,
  1561. status: true,
  1562. fixed: '',
  1563. columnWidth: 80
  1564. },
  1565. {
  1566. userId: this.$store.state.user.name,
  1567. functionId: 104003,
  1568. serialNumber: '104003Table2SetupLaborClassDesc',
  1569. tableId: '104003Table2',
  1570. tableName: 'Routing工序表',
  1571. columnProp: 'setupLaborClassDesc',
  1572. headerAlign: 'center',
  1573. align: 'center',
  1574. columnLabel: '调机时人员等级',
  1575. columnHidden: false,
  1576. columnImage: false,
  1577. columnSortable: false,
  1578. sortLv: 0,
  1579. status: true,
  1580. fixed: '',
  1581. columnWidth: 80
  1582. },
  1583. {
  1584. userId: this.$store.state.user.name,
  1585. functionId: 104003,
  1586. serialNumber: '104003Table2NoteText',
  1587. tableId: '104003Table2',
  1588. tableName: 'Routing工序表',
  1589. columnProp: 'noteText',
  1590. headerAlign: 'center',
  1591. align: 'left',
  1592. columnLabel: '备注',
  1593. columnHidden: false,
  1594. columnImage: false,
  1595. columnSortable: false,
  1596. sortLv: 0,
  1597. status: true,
  1598. fixed: '',
  1599. columnWidth: 150
  1600. },
  1601. ],
  1602. columnRoutingToolList: [
  1603. {
  1604. userId: this.$store.state.user.name,
  1605. functionId: 104003,
  1606. serialNumber: '104003Table3AlternativeNo',
  1607. tableId: '104003Table3',
  1608. tableName: 'Routing工具表',
  1609. columnProp: 'alternativeNo',
  1610. headerAlign: 'center',
  1611. align: 'center',
  1612. columnLabel: '替代编码',
  1613. columnHidden: false,
  1614. columnImage: false,
  1615. columnSortable: false,
  1616. sortLv: 0,
  1617. status: true,
  1618. fixed: '',
  1619. columnWidth: 80
  1620. },
  1621. {
  1622. userId: this.$store.state.user.name,
  1623. functionId: 104003,
  1624. serialNumber: '104003Table3AlternativeDescription',
  1625. tableId: '104003Table3',
  1626. tableName: 'Routing工具表',
  1627. columnProp: 'alternativeDescription',
  1628. headerAlign: 'center',
  1629. align: 'center',
  1630. columnLabel: '替代名称',
  1631. columnHidden: false,
  1632. columnImage: false,
  1633. columnSortable: false,
  1634. sortLv: 0,
  1635. status: true,
  1636. fixed: '',
  1637. columnWidth: 100
  1638. },
  1639. {
  1640. userId: this.$store.state.user.name,
  1641. functionId: 104003,
  1642. serialNumber: '104003Table3OperationNo',
  1643. tableId: '104003Table3',
  1644. tableName: 'Routing工具表',
  1645. columnProp: 'operationNo',
  1646. headerAlign: 'center',
  1647. align: 'center',
  1648. columnLabel: '工序编码',
  1649. columnHidden: false,
  1650. columnImage: false,
  1651. columnSortable: false,
  1652. sortLv: 0,
  1653. status: true,
  1654. fixed: '',
  1655. columnWidth: 80
  1656. },
  1657. {
  1658. userId: this.$store.state.user.name,
  1659. functionId: 104003,
  1660. serialNumber: '104003Table3OperationName',
  1661. tableId: '104003Table3',
  1662. tableName: 'Routing工具表',
  1663. columnProp: 'operationName',
  1664. headerAlign: 'center',
  1665. align: 'center',
  1666. columnLabel: '工序名称',
  1667. columnHidden: false,
  1668. columnImage: false,
  1669. columnSortable: false,
  1670. sortLv: 0,
  1671. status: true,
  1672. fixed: '',
  1673. columnWidth: 100
  1674. },
  1675. {
  1676. userId: this.$store.state.user.name,
  1677. functionId: 104003,
  1678. serialNumber: '104003Table3ToolId',
  1679. tableId: '104003Table3',
  1680. tableName: 'Routing工具表',
  1681. columnProp: 'toolId',
  1682. headerAlign: 'center',
  1683. align: 'center',
  1684. columnLabel: '工具编码',
  1685. columnHidden: false,
  1686. columnImage: false,
  1687. columnSortable: false,
  1688. sortLv: 0,
  1689. status: true,
  1690. fixed: '',
  1691. columnWidth: 80
  1692. },
  1693. {
  1694. userId: this.$store.state.user.name,
  1695. functionId: 104003,
  1696. serialNumber: '104003Table3ToolDescription',
  1697. tableId: '104003Table3',
  1698. tableName: 'Routing工具表',
  1699. columnProp: 'toolDescription',
  1700. headerAlign: 'center',
  1701. align: 'center',
  1702. columnLabel: '工具名称',
  1703. columnHidden: false,
  1704. columnImage: false,
  1705. columnSortable: false,
  1706. sortLv: 0,
  1707. status: true,
  1708. fixed: '',
  1709. columnWidth: 100
  1710. },
  1711. {
  1712. userId: this.$store.state.user.name,
  1713. functionId: 104003,
  1714. serialNumber: '104003Table3ToolQty',
  1715. tableId: '104003Table3',
  1716. tableName: 'Routing工具表',
  1717. columnProp: 'toolQty',
  1718. headerAlign: 'center',
  1719. align: 'center',
  1720. columnLabel: '工具数量',
  1721. columnHidden: false,
  1722. columnImage: false,
  1723. columnSortable: false,
  1724. sortLv: 0,
  1725. status: true,
  1726. fixed: '',
  1727. columnWidth: 60
  1728. },
  1729. {
  1730. userId: this.$store.state.user.name,
  1731. functionId: 104003,
  1732. serialNumber: '104003Table3Remark',
  1733. tableId: '104003Table3',
  1734. tableName: 'Routing工具表',
  1735. columnProp: 'remark',
  1736. headerAlign: 'center',
  1737. align: 'center',
  1738. columnLabel: '备注',
  1739. columnHidden: false,
  1740. columnImage: false,
  1741. columnSortable: false,
  1742. sortLv: 0,
  1743. status: true,
  1744. fixed: '',
  1745. columnWidth: 150
  1746. },
  1747. ],
  1748. columnRoutingDetailList: [
  1749. {
  1750. columnProp: 'alternativeNo',
  1751. headerAlign: "center",
  1752. align: "center",
  1753. columnLabel: '替代编码',
  1754. columnHidden: false,
  1755. columnImage: false,
  1756. columnSortable: false,
  1757. sortLv: 0,
  1758. status: true,
  1759. fixed: '',
  1760. },
  1761. {
  1762. columnProp: 'alternativeDescription',
  1763. headerAlign: "center",
  1764. align: "center",
  1765. columnLabel: '替代名称',
  1766. columnHidden: false,
  1767. columnImage: false,
  1768. columnSortable: false,
  1769. sortLv: 0,
  1770. status: true,
  1771. fixed: '',
  1772. },
  1773. {
  1774. columnProp: 'status',
  1775. headerAlign: "center",
  1776. align: "center",
  1777. columnLabel: '状态',
  1778. columnHidden: false,
  1779. columnImage: false,
  1780. columnSortable: false,
  1781. sortLv: 0,
  1782. status: true,
  1783. fixed: '',
  1784. },
  1785. ],
  1786. workGuidelineColumnList: [
  1787. {
  1788. userId: this.$store.state.user.name,
  1789. functionId: 104003,
  1790. serialNumber: '104003Table4GuidelineSeq',
  1791. tableId: '104003Table4',
  1792. tableName: 'workGuideline表',
  1793. columnProp: 'guidelineSeq',
  1794. headerAlign: 'center',
  1795. align: 'right',
  1796. columnLabel: '序号',
  1797. columnHidden: false,
  1798. columnImage: false,
  1799. columnSortable: false,
  1800. sortLv: 0,
  1801. status: true,
  1802. fixed: '',
  1803. columnWidth: 60
  1804. },
  1805. {
  1806. userId: this.$store.state.user.name,
  1807. functionId: 104003,
  1808. serialNumber: '104003Table4GuidelineDesc',
  1809. tableId: '104003Table4',
  1810. tableName: 'workGuideline表',
  1811. columnProp: 'guidelineDesc',
  1812. headerAlign: 'center',
  1813. align: 'left',
  1814. columnLabel: '工艺指导名称',
  1815. columnHidden: false,
  1816. columnImage: false,
  1817. columnSortable: false,
  1818. sortLv: 0,
  1819. status: true,
  1820. fixed: '',
  1821. columnWidth: 120
  1822. },
  1823. {
  1824. userId: this.$store.state.user.name,
  1825. functionId: 104003,
  1826. serialNumber: '104003Table4GuidelineText',
  1827. tableId: '104003Table4',
  1828. tableName: 'workGuideline表',
  1829. columnProp: 'guidelineText',
  1830. headerAlign: 'center',
  1831. align: 'left',
  1832. columnLabel: '工艺指导描述',
  1833. columnHidden: false,
  1834. columnImage: false,
  1835. columnSortable: false,
  1836. sortLv: 0,
  1837. status: true,
  1838. fixed: '',
  1839. columnWidth: 200
  1840. },
  1841. {
  1842. userId: this.$store.state.user.name,
  1843. functionId: 104003,
  1844. serialNumber: '104003Table4GuidelineType',
  1845. tableId: '104003Table4',
  1846. tableName: 'workGuideline表',
  1847. columnProp: 'guidelineType',
  1848. headerAlign: 'center',
  1849. align: 'center',
  1850. columnLabel: '工艺指导类型',
  1851. columnHidden: false,
  1852. columnImage: false,
  1853. columnSortable: false,
  1854. sortLv: 0,
  1855. status: true,
  1856. fixed: '',
  1857. columnWidth: 120
  1858. },
  1859. {
  1860. userId: this.$store.state.user.name,
  1861. functionId: 104003,
  1862. serialNumber: '104003Table4SignOffRequired',
  1863. tableId: '104003Table4',
  1864. tableName: 'workGuideline表',
  1865. columnProp: 'signOffRequired',
  1866. headerAlign: 'center',
  1867. align: 'center',
  1868. columnLabel: '签字',
  1869. columnHidden: false,
  1870. columnImage: false,
  1871. columnSortable: false,
  1872. sortLv: 0,
  1873. status: true,
  1874. fixed: '',
  1875. columnWidth: 150
  1876. },
  1877. {
  1878. userId: this.$store.state.user.name,
  1879. functionId: 104003,
  1880. serialNumber: '104003Table4InspectionSignOffRequired',
  1881. tableId: '104003Table4',
  1882. tableName: 'workGuideline表',
  1883. columnProp: 'inspectionSignOffRequired',
  1884. headerAlign: 'center',
  1885. align: 'center',
  1886. columnLabel: '检验签字',
  1887. columnHidden: false,
  1888. columnImage: false,
  1889. columnSortable: false,
  1890. sortLv: 0,
  1891. status: true,
  1892. fixed: '',
  1893. columnWidth: 150
  1894. },
  1895. {
  1896. userId: this.$store.state.user.name,
  1897. functionId: 104003,
  1898. serialNumber: '104003Table4CreateDate',
  1899. tableId: '104003Table4',
  1900. tableName: 'BOM信息表',
  1901. columnProp: 'createDate',
  1902. headerAlign: 'center',
  1903. align: 'center',
  1904. columnLabel: '创建时间',
  1905. columnHidden: false,
  1906. columnImage: false,
  1907. columnSortable: false,
  1908. sortLv: 0,
  1909. status: true,
  1910. fixed: '',
  1911. columnWidth: 130
  1912. },
  1913. {
  1914. userId: this.$store.state.user.name,
  1915. functionId: 104003,
  1916. serialNumber: '104003Table4CreateBy',
  1917. tableId: '104003Table4',
  1918. tableName: 'BOM信息表',
  1919. columnProp: 'createBy',
  1920. headerAlign: 'center',
  1921. align: 'center',
  1922. columnLabel: '创建人',
  1923. columnHidden: false,
  1924. columnImage: false,
  1925. columnSortable: false,
  1926. sortLv: 0,
  1927. status: true,
  1928. fixed: '',
  1929. columnWidth: 80
  1930. },
  1931. {
  1932. userId: this.$store.state.user.name,
  1933. functionId: 104003,
  1934. serialNumber: '104003Table4UpdateDate',
  1935. tableId: '104003Table4',
  1936. tableName: 'BOM信息表',
  1937. columnProp: 'updateDate',
  1938. headerAlign: 'center',
  1939. align: 'center',
  1940. columnLabel: '更新时间',
  1941. columnHidden: false,
  1942. columnImage: false,
  1943. columnSortable: false,
  1944. sortLv: 0,
  1945. status: true,
  1946. fixed: '',
  1947. columnWidth: 130
  1948. },
  1949. {
  1950. userId: this.$store.state.user.name,
  1951. functionId: 104003,
  1952. serialNumber: '104003Table4UpdateBy',
  1953. tableId: '104003Table4',
  1954. tableName: 'BOM信息表',
  1955. columnProp: 'updateBy',
  1956. headerAlign: 'center',
  1957. align: 'center',
  1958. columnLabel: '更新人',
  1959. columnHidden: false,
  1960. columnImage: false,
  1961. columnSortable: false,
  1962. sortLv: 0,
  1963. status: true,
  1964. fixed: '',
  1965. columnWidth: 80
  1966. }
  1967. ],
  1968. // ======== 必填规则 ========
  1969. rules: {
  1970. partNo: [
  1971. {
  1972. required: true,
  1973. message: ' ',
  1974. trigger: ['blur','change']
  1975. }
  1976. ],
  1977. partDesc: [
  1978. {
  1979. required: true,
  1980. message: ' ',
  1981. trigger: ['blur','change']
  1982. }
  1983. ],
  1984. routingType: [
  1985. {
  1986. required: true,
  1987. message: ' ',
  1988. trigger: ['blur','change']
  1989. }
  1990. ],
  1991. phaseInDate: [
  1992. {
  1993. required: true,
  1994. message: ' ',
  1995. trigger: ['blur','change']
  1996. }
  1997. ],
  1998. routingRevision: [
  1999. {
  2000. required: true,
  2001. message: ' ',
  2002. trigger: ['blur','change']
  2003. }
  2004. ]
  2005. },
  2006. detailRules: {
  2007. alternativeNo: [
  2008. {
  2009. required: true,
  2010. message: ' ',
  2011. trigger: ['blur','change']
  2012. }
  2013. ],
  2014. alternativeDescription: [
  2015. {
  2016. required: true,
  2017. message: ' ',
  2018. trigger: ['blur','change']
  2019. }
  2020. ],
  2021. status: [
  2022. {
  2023. required: true,
  2024. message: ' ',
  2025. trigger: ['blur','change']
  2026. }
  2027. ]
  2028. },
  2029. componentRules: {
  2030. operationId: [
  2031. {
  2032. required: true,
  2033. message: ' ',
  2034. trigger: ['blur','change']
  2035. }
  2036. ],
  2037. operationName: [
  2038. {
  2039. required: true,
  2040. message: ' ',
  2041. trigger: ['blur','change']
  2042. }
  2043. ],
  2044. operationNo: [
  2045. {
  2046. required: true,
  2047. message: ' ',
  2048. trigger: ['blur','change']
  2049. }
  2050. ]
  2051. },
  2052. guidelineRules: {
  2053. guidelineSeq: [
  2054. {
  2055. required: true,
  2056. message: ' ',
  2057. trigger: ['blur','change']
  2058. }
  2059. ],
  2060. guidelineDesc: [
  2061. {
  2062. required: true,
  2063. message: ' ',
  2064. trigger: ['blur','change']
  2065. }
  2066. ],
  2067. guidelineType: [
  2068. {
  2069. required: true,
  2070. message: ' ',
  2071. trigger: ['blur','change']
  2072. }
  2073. ],
  2074. signOffRequired: [
  2075. {
  2076. required: true,
  2077. message: ' ',
  2078. trigger: ['blur','change']
  2079. }
  2080. ],
  2081. inspectionSignOffRequired: [
  2082. {
  2083. required: true,
  2084. message: ' ',
  2085. trigger: ['blur','change']
  2086. }
  2087. ]
  2088. },
  2089. // ======== 复选数据集 ========
  2090. routingSelections: [],
  2091. workGuidelineSelections: [],
  2092. // ======== 模态框开关控制 ========
  2093. modalFlag: false,
  2094. modalDisableFlag: false,
  2095. partModelFlag: false,
  2096. componentPartModelFlag: false,
  2097. saveDetailModalFlag: false,
  2098. saveDetailModalDisable: false,
  2099. componentSaveModal: false,
  2100. componentDisableFlag: false,
  2101. saveRoutingToolModal: false,
  2102. saveRoutingToolDisableModal: false,
  2103. copyRoutingModelFlag: false,
  2104. copyAlternativeModelFlag: false,
  2105. queryWorkGuidelineModal: false,
  2106. saveWorkGuidelineModal: false,
  2107. workGuidelineDisableModal: false
  2108. }
  2109. },
  2110. mounted () {
  2111. this.$nextTick(() => {
  2112. this.height = window.innerHeight - 180
  2113. })
  2114. },
  2115. created () {
  2116. this.getDataList()
  2117. },
  2118. activated() {
  2119. if (this.$route.params.partNo) {
  2120. this.searchData.partNo = this.$route.params.partNo
  2121. }
  2122. this.getDataList()
  2123. },
  2124. // js
  2125. methods: {
  2126. // ======== 分页相关方法 ========
  2127. /**
  2128. * 每页数
  2129. * @param val
  2130. */
  2131. sizeChangeHandle (val) {
  2132. this.pageSize = val
  2133. this.pageIndex = 1
  2134. this.getDataList()
  2135. },
  2136. /**
  2137. * 当前页
  2138. * @param val
  2139. */
  2140. currentChangeHandle (val) {
  2141. this.pageIndex = val
  2142. this.getDataList()
  2143. },
  2144. // ======== 页签切换相关方法 ========
  2145. /**
  2146. * 明细页签选择替换
  2147. * @param tab
  2148. * @param event
  2149. */
  2150. tabDetailClick (tab, event) {
  2151. // 刷新列表数据
  2152. this.refreshDetailTable()
  2153. },
  2154. /**
  2155. * 子明细页签选择替换
  2156. * @param tab
  2157. * @param event
  2158. */
  2159. tabSubDetailClick (tab, event) {
  2160. // 刷新列表数据
  2161. this.refreshSubDetailTable()
  2162. },
  2163. /**
  2164. * 刷新明细页签的table数据
  2165. */
  2166. refreshDetailTable () {
  2167. if (this.detailTable === 'routing_detail') {
  2168. } else if (this.detailTable === 'routing_tool') {
  2169. this.searchRoutingTools()
  2170. }
  2171. },
  2172. /**
  2173. * 刷新子明细页签的table数据
  2174. */
  2175. refreshSubDetailTable () {
  2176. if (this.subDetailTable === 'routing_sub_detail') {
  2177. }
  2178. },
  2179. // ======== 列表数据操作方法 ========
  2180. /**
  2181. * 未知
  2182. * @returns {boolean}
  2183. */
  2184. selectFlag () {
  2185. return true
  2186. },
  2187. /**
  2188. * 获取数据列表
  2189. */
  2190. getDataList () {
  2191. this.searchData.limit = this.pageSize
  2192. this.searchData.page = this.pageIndex
  2193. this.queryLoading = true
  2194. routingManagementSearch(this.searchData).then(({data}) => {
  2195. if (data.code === 0) {
  2196. this.dataList = data.page.list
  2197. this.pageIndex = data.page.currPage
  2198. this.pageSize = data.page.pageSize
  2199. this.totalPage = data.page.totalCount
  2200. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  2201. }
  2202. this.queryLoading = false
  2203. })
  2204. },
  2205. /**
  2206. * 复选列表信息
  2207. * @param val
  2208. */
  2209. selectionRouting (val) {
  2210. this.routingSelections = val
  2211. this.$refs.selectDiv.setLengthselected(this.routingSelections.length)
  2212. },
  2213. /**
  2214. * 查询 routingTools
  2215. */
  2216. searchRoutingTools () {
  2217. searchRoutingTools(this.modalData).then(({data}) => {
  2218. if (data && data.code === 0) {
  2219. this.routingToolList = data.rows
  2220. } else {
  2221. this.routingToolList = []
  2222. }
  2223. })
  2224. },
  2225. // ======== 新增/编辑模态框 ========
  2226. /**
  2227. * routing新增模态框
  2228. */
  2229. addModal () {
  2230. this.modalData = {
  2231. flag: '1',
  2232. title: 'Routing新增',
  2233. site: this.$store.state.user.site,
  2234. partNo: '',
  2235. partDesc: '',
  2236. routingRevision: '',
  2237. routingType: 'Manufacturing',
  2238. noteText: '',
  2239. phaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  2240. phaseOutDate: '',
  2241. createBy: this.$store.state.user.name,
  2242. printUnit: '',
  2243. printUnitName: '',
  2244. officialFlag: 'N'
  2245. }
  2246. this.detailData = {
  2247. site: this.$store.state.user.site,
  2248. partNo: '',
  2249. routingRevision: '',
  2250. routingType: '',
  2251. alternativeNo: '',
  2252. alternativeDescription: '',
  2253. routTemplateId: '',
  2254. planDate: '',
  2255. fixedLeadTimeDay: '',
  2256. fixedLeadTimeHour: '',
  2257. variableLeadTimeDay: '',
  2258. variableLeadTimeHour: '',
  2259. forStdLotByDay: '',
  2260. forLotByDay: '',
  2261. minLotQty: '',
  2262. detailNoteText: '',
  2263. status: '',
  2264. createBy: this.$store.state.user.name,
  2265. officialFlag: 'N'
  2266. }
  2267. this.detailDataList = []
  2268. this.subDetailList = []
  2269. this.modalDisableFlag = false
  2270. this.modalFlag = true
  2271. },
  2272. /**
  2273. * routing编辑模态框
  2274. */
  2275. async updateModal (row) {
  2276. this.modalData = {
  2277. flag: '2',
  2278. site: row.site,
  2279. partNo: row.partNo,
  2280. partDesc: row.partDesc,
  2281. routingRevision: row.routingRevision,
  2282. routingType: row.routingType,
  2283. noteText: row.noteText,
  2284. phaseInDate: row.phaseInDate,
  2285. phaseOutDate: row.phaseOutDate,
  2286. engRevision: row.engRevision,
  2287. typeFlag: row.typeFlag,
  2288. netWeight: row.netWeight,
  2289. updateBy: this.$store.state.user.name,
  2290. printUnit: row.printUnit,
  2291. printUnitName: row.printUnitName,
  2292. officialFlag: row.officialFlag
  2293. }
  2294. // 查routing明细
  2295. queryRoutingDetail(this.modalData).then(({data}) => {
  2296. if (data && data.code === 0) {
  2297. this.detailDataList = data.rows.detailList
  2298. this.subDetailList = data.rows.componentList
  2299. this.detailData = data.rows.detailData
  2300. this.modalDisableFlag = true
  2301. this.modalFlag = true
  2302. } else {
  2303. this.$alert(data.msg, '错误', {
  2304. confirmButtonText: '确定'
  2305. })
  2306. }
  2307. })
  2308. },
  2309. /**
  2310. * 新增替代模态框
  2311. */
  2312. saveRoutingDetail () {
  2313. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  2314. this.$message.warning('请先选择Routing物料!')
  2315. return
  2316. }
  2317. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  2318. this.$message.warning('请先填写Routing版本号!')
  2319. return
  2320. }
  2321. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  2322. this.$message.warning('请先选择工艺类型!')
  2323. return
  2324. }
  2325. this.saveDetailData = {
  2326. flag: '1',
  2327. site: this.$store.state.user.site,
  2328. partNo: this.modalData.partNo,
  2329. routingRevision: this.modalData.routingRevision,
  2330. routingType: this.modalData.routingType,
  2331. alternativeNo: '',
  2332. alternativeDescription: '',
  2333. routTemplateId: '',
  2334. planDate: '',
  2335. fixedLeadTimeDay: '',
  2336. fixedLeadTimeHour: '',
  2337. variableLeadTimeDay: '',
  2338. variableLeadTimeHour: '',
  2339. forStdLotByDay: '',
  2340. forLotByDay: '',
  2341. minLotQty: '',
  2342. detailNoteText: '',
  2343. status: 'Tentative',
  2344. createDate: '',
  2345. createBy: this.$store.state.user.name,
  2346. officialFlag: 'N'
  2347. }
  2348. // 查询routing主信息
  2349. queryRoutingHeader(this.modalData).then(({data}) => {
  2350. if (data && data.code === 0) {
  2351. if (data.rows.length > 0) {
  2352. this.saveDetailModalFlag = true
  2353. this.saveDetailModalDisable = false
  2354. } else {
  2355. this.$message.warning('请先保存Routing主记录!')
  2356. }
  2357. } else {
  2358. this.$alert(data.msg, '提示', {
  2359. confirmButtonText: '确定'
  2360. })
  2361. }
  2362. })
  2363. },
  2364. /**
  2365. * 替代编辑模态框
  2366. */
  2367. updateRoutingDetail () {
  2368. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  2369. this.$message.warning('请先选择Routing物料!')
  2370. return
  2371. }
  2372. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  2373. this.$message.warning('请先填写Routing版本号!')
  2374. return
  2375. }
  2376. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  2377. this.$message.warning('请先选择工艺类型!')
  2378. return
  2379. }
  2380. this.saveDetailData = {
  2381. flag: '2',
  2382. site: this.detailData.site,
  2383. partNo: this.detailData.partNo,
  2384. routingRevision: this.detailData.routingRevision,
  2385. routingType: this.detailData.routingType,
  2386. alternativeNo: this.detailData.alternativeNo,
  2387. alternativeDescription: this.detailData.alternativeDescription,
  2388. routTemplateId: this.detailData.routTemplateId,
  2389. planDate: this.detailData.planDate,
  2390. fixedLeadTimeDay: this.detailData.fixedLeadTimeDay,
  2391. fixedLeadTimeHour: this.detailData.fixedLeadTimeHour,
  2392. variableLeadTimeDay: this.detailData.variableLeadTimeDay,
  2393. variableLeadTimeHour: this.detailData.variableLeadTimeHour,
  2394. forStdLotByDay: this.detailData.forStdLotByDay,
  2395. forLotByDay: this.detailData.forLotByDay,
  2396. minLotQty: this.detailData.minLotQty,
  2397. detailNoteText: this.detailData.detailNoteText,
  2398. status: this.detailData.status,
  2399. updateBy: this.$store.state.user.name,
  2400. officialFlag: this.detailData.officialFlag
  2401. }
  2402. // 查询routing主信息
  2403. queryRoutingHeader(this.modalData).then(({data}) => {
  2404. if (data && data.code === 0) {
  2405. if (data.rows.length > 0) {
  2406. this.saveDetailModalFlag = true
  2407. this.saveDetailModalDisable = true
  2408. } else {
  2409. this.$message.warning('请先保存Routing主记录!')
  2410. }
  2411. } else {
  2412. this.$alert(data.msg, '提示', {
  2413. confirmButtonText: '确定'
  2414. })
  2415. }
  2416. })
  2417. },
  2418. /**
  2419. * 新增子明细模态框
  2420. */
  2421. saveComponentModal () {
  2422. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  2423. this.$message.warning('请先选择替代!')
  2424. return
  2425. }
  2426. if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  2427. this.$message.warning('不可编辑的替代状态!')
  2428. return
  2429. }
  2430. this.componentData = {
  2431. flag: '1',
  2432. site: this.$store.state.user.site,
  2433. partNo: this.modalData.partNo,
  2434. routingRevision: this.modalData.routingRevision,
  2435. routingType: this.modalData.routingType,
  2436. alternativeNo: this.detailData.alternativeNo,
  2437. operationId: '',
  2438. operationNo: '',
  2439. operationName: '',
  2440. efficiencyFactor: 100,
  2441. machRunFactor: '',
  2442. machSetupTime: '',
  2443. runTimeCode: '',
  2444. laborRunFactor: 100,
  2445. laborSetupTime: '',
  2446. crewSize: 1,
  2447. setupCrewSize: 1,
  2448. outsideOpItem: '',
  2449. machineNo: '',
  2450. workCenterNo: '',
  2451. workCenterDesc: '',
  2452. laborClassNo: '',
  2453. laborClassDesc: '',
  2454. setupLaborClassNo: '',
  2455. setupLaborClassDesc: '',
  2456. overlap: '',
  2457. noteText: '',
  2458. createBy: this.$store.state.user.name,
  2459. }
  2460. this.componentDisableFlag = false
  2461. this.componentSaveModal = true
  2462. },
  2463. /**
  2464. * 编辑模态框
  2465. */
  2466. updateComponentModal (row) {
  2467. if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  2468. this.$message.warning('不可编辑的替代状态!')
  2469. return
  2470. }
  2471. this.componentData = {
  2472. flag: '2',
  2473. site: row.site,
  2474. partNo: row.partNo,
  2475. routingRevision: row.routingRevision,
  2476. routingType: row.routingType,
  2477. alternativeNo: row.alternativeNo,
  2478. operationId: row.operationId,
  2479. operationNo: row.operationNo,
  2480. operationName: row.operationName,
  2481. efficiencyFactor: row.efficiencyFactor,
  2482. machRunFactor: row.machRunFactor,
  2483. machSetupTime: row.machSetupTime,
  2484. runTimeCode: row.runTimeCode,
  2485. laborRunFactor: row.laborRunFactor,
  2486. laborSetupTime: row.laborSetupTime,
  2487. crewSize: row.crewSize,
  2488. setupCrewSize: row.setupCrewSize,
  2489. outsideOpItem: row.outsideOpItem,
  2490. machineNo: row.machineNo,
  2491. workCenterNo: row.workCenterNo,
  2492. workCenterDesc: row.workCenterDesc,
  2493. laborClassNo: row.laborClassNo,
  2494. laborClassDesc: row.laborClassDesc,
  2495. setupLaborClassNo: row.setupLaborClassNo,
  2496. setupLaborClassDesc: row.setupLaborClassDesc,
  2497. overlap: row.overlap,
  2498. noteText: row.noteText,
  2499. updateBy: this.$store.state.user.name,
  2500. }
  2501. this.componentDisableFlag = true
  2502. this.componentSaveModal = true
  2503. },
  2504. /**
  2505. * routingTool 新增模态框
  2506. */
  2507. saveRoutingTool () {
  2508. this.routingToolData = {
  2509. flag: '1',
  2510. site: this.$store.state.user.site,
  2511. partNo: this.modalData.partNo,
  2512. partDesc: this.modalData.partDesc,
  2513. routingRevision: this.modalData.routingRevision,
  2514. routingType: this.modalData.routingType,
  2515. alternativeNo: '',
  2516. alternativeDescription: '',
  2517. operationId: '',
  2518. operationNo: '',
  2519. operationName: '',
  2520. toolId: '',
  2521. toolDescription: '',
  2522. toolQty: '',
  2523. remark: '',
  2524. createBy: this.$store.state.user.name
  2525. }
  2526. this.queryAlternativeList()
  2527. this.saveRoutingToolModal = true
  2528. this.saveRoutingToolDisableModal = false
  2529. },
  2530. /**
  2531. * routingTool 编辑模态框
  2532. */
  2533. updateToolModal (row) {
  2534. this.routingToolData = {
  2535. flag: '2',
  2536. site: row.site,
  2537. partNo: row.partNo,
  2538. partDesc: row.partDesc,
  2539. routingRevision: row.routingRevision,
  2540. routingType: row.routingType,
  2541. alternativeNo: row.alternativeNo,
  2542. alternativeDescription: row.alternativeDescription,
  2543. operationId: row.operationId,
  2544. operationNo: row.operationNo,
  2545. operationName: row.operationName,
  2546. toolId: row.toolId,
  2547. toolDescription: row.toolDescription,
  2548. toolQty: row.toolQty,
  2549. remark: row.remark,
  2550. updateBy: this.$store.state.user.name
  2551. }
  2552. this.queryAlternativeList()
  2553. this.saveRoutingToolModal = true
  2554. this.saveRoutingToolDisableModal = true
  2555. },
  2556. // ======== 新增/编辑/删除方法 ========
  2557. /**
  2558. * routing新增/编辑
  2559. */
  2560. saveData () {
  2561. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  2562. this.$message.warning('请选择物料编码!')
  2563. return
  2564. }
  2565. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  2566. this.$message.warning('请选择物料名称!')
  2567. return
  2568. }
  2569. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  2570. this.$message.warning('请选择制造类型!')
  2571. return
  2572. }
  2573. if (this.modalData.phaseInDate === '' || this.modalData.phaseInDate == null) {
  2574. this.$message.warning('请选择生效时间!')
  2575. return
  2576. }
  2577. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  2578. this.$message.warning('请填写Routing版本号!')
  2579. return
  2580. }
  2581. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  2582. this.$message.warning('请选择替代!')
  2583. return
  2584. }
  2585. if (this.detailData.status === '' || this.detailData.status == null) {
  2586. this.$message.warning('请选择替代状态!')
  2587. return
  2588. }
  2589. let tempData = {
  2590. site: this.$store.state.user.site,
  2591. partNo: this.modalData.partNo,
  2592. partDesc: this.modalData.partDesc,
  2593. routingRevision: this.modalData.routingRevision,
  2594. routingType: this.modalData.routingType,
  2595. noteText: this.modalData.noteText,
  2596. phaseInDate: this.modalData.phaseInDate,
  2597. phaseOutDate: this.modalData.phaseOutDate,
  2598. alternativeNo: this.detailData.alternativeNo,
  2599. alternativeDescription: this.detailData.alternativeDescription,
  2600. detailNoteText: this.detailData.detailNoteText,
  2601. status: this.detailData.status,
  2602. createBy: this.$store.state.user.name,
  2603. updateBy: this.$store.state.user.name,
  2604. informationList: this.subDetailList
  2605. }
  2606. if (this.modalData.flag === '1') {
  2607. this.saveAllLoading = true
  2608. routingManagementSave(tempData).then(({data}) => {
  2609. if (data && data.code === 0) {
  2610. this.getDataList()
  2611. this.modalFlag = false
  2612. this.$message({
  2613. message: '操作成功',
  2614. type: 'success',
  2615. duration: 1500,
  2616. onClose: () => {}
  2617. })
  2618. } else {
  2619. this.$alert(data.msg, '错误', {
  2620. confirmButtonText: '确定'
  2621. })
  2622. }
  2623. this.saveAllLoading = false
  2624. })
  2625. } else {
  2626. this.saveAllLoading = true
  2627. routingManagementEdit(tempData).then(({data}) => {
  2628. if (data && data.code === 0) {
  2629. this.getDataList()
  2630. this.modalFlag = false
  2631. this.$message({
  2632. message: '操作成功',
  2633. type: 'success',
  2634. duration: 1500,
  2635. onClose: () => {}
  2636. })
  2637. } else {
  2638. this.$alert(data.msg, '错误', {
  2639. confirmButtonText: '确定'
  2640. })
  2641. }
  2642. this.saveAllLoading = false
  2643. })
  2644. }
  2645. },
  2646. /**
  2647. * 新增编辑模态框关闭
  2648. */
  2649. closeModal () {
  2650. this.getDataList()
  2651. this.modalFlag = false
  2652. },
  2653. /**
  2654. * 新增编辑模态框关闭
  2655. */
  2656. closeModalX (done) {
  2657. this.getDataList()
  2658. done()
  2659. },
  2660. /**
  2661. * routing删除
  2662. */
  2663. delModal () {
  2664. if(this.routingSelections.length === 0){
  2665. this.$message.warning('请勾选要删除的Routing!')
  2666. return
  2667. }
  2668. this.$confirm(`是否删除这 `+ this.routingSelections.length +` 条Routing?`, '提示', {
  2669. confirmButtonText: '确定',
  2670. cancelButtonText: '取消',
  2671. type: 'warning'
  2672. }).then(() => {
  2673. let tempData = {
  2674. informationList: this.routingSelections
  2675. }
  2676. routingManagementDelete(tempData).then(({data}) => {
  2677. if (data && data.code === 0) {
  2678. this.getDataList()
  2679. this.routingSelections = []
  2680. this.$message({
  2681. message: '操作成功',
  2682. type: 'success',
  2683. duration: 1500,
  2684. onClose: () => {}
  2685. })
  2686. } else {
  2687. this.$alert(data.msg, '错误', {
  2688. confirmButtonText: '确定'
  2689. })
  2690. }
  2691. })
  2692. }).catch(() => {
  2693. })
  2694. },
  2695. /**
  2696. * 查询物料
  2697. */
  2698. queryPartList () {
  2699. queryPartList(this.partData).then(({data}) => {
  2700. if (data && data.code === 0) {
  2701. this.partList = data.rows
  2702. this.partModelFlag = true
  2703. } else {
  2704. this.$alert(data.msg, '错误', {
  2705. confirmButtonText: '确定'
  2706. })
  2707. }
  2708. })
  2709. },
  2710. /**
  2711. * 双击选中物料
  2712. * @param row
  2713. */
  2714. getRowData (row) {
  2715. this.modalData.partNo = row.partNo
  2716. this.modalData.partDesc = row.partDesc
  2717. this.modalData.printUnit = row.printUnit
  2718. this.modalData.printUnitName = row.printUnitName
  2719. // 获取物料的routing版本号
  2720. getRottingRevision(this.modalData).then(({data}) => {
  2721. if (data && data.code === 0) {
  2722. this.modalData.routingRevision = data.routingRevision
  2723. } else {
  2724. this.$alert(data.msg, '错误', {
  2725. confirmButtonText: '确定'
  2726. })
  2727. }
  2728. this.partModelFlag = false
  2729. })
  2730. },
  2731. /**
  2732. * 工艺类型改变
  2733. */
  2734. routingTypeChange () {
  2735. // 获取物料的routing版本号
  2736. getRottingRevision(this.modalData).then(({data}) => {
  2737. if (data && data.code === 0) {
  2738. this.modalData.routingRevision = data.routingRevision
  2739. } else {
  2740. this.$alert(data.msg, '错误', {
  2741. confirmButtonText: '确定'
  2742. })
  2743. }
  2744. })
  2745. },
  2746. /**
  2747. * 选中工序
  2748. * @param row
  2749. */
  2750. getComponentRowData (row) {
  2751. this.routingToolData.operationId = row.operationId
  2752. this.routingToolData.operationNo = row.operationNo
  2753. this.routingToolData.operationName = row.operationName
  2754. this.componentPartModelFlag = false
  2755. },
  2756. /**
  2757. * 工序列表
  2758. */
  2759. queryOperationList () {
  2760. if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
  2761. this.$message.warning('请先选择替代!')
  2762. return
  2763. }
  2764. this.operationData.site = this.routingToolData.site
  2765. this.operationData.partNo = this.routingToolData.partNo
  2766. this.operationData.routingRevision = this.routingToolData.routingRevision
  2767. this.operationData.routingType = this.routingToolData.routingType
  2768. this.operationData.alternativeNo = this.routingToolData.alternativeNo
  2769. // 查询所有工序
  2770. queryOperationListByAlternative(this.operationData).then(({data}) => {
  2771. if (data && data.code === 0) {
  2772. this.operationList = data.rows
  2773. this.componentPartModelFlag = true
  2774. } else {
  2775. this.$alert(data.msg, '错误', {
  2776. confirmButtonText: '确定'
  2777. })
  2778. }
  2779. })
  2780. },
  2781. /**
  2782. * 替代列表
  2783. */
  2784. queryAlternativeList () {
  2785. // 查询所有替代
  2786. queryAlternativeListByPartNo(this.modalData).then(({data}) => {
  2787. if (data && data.code === 0) {
  2788. this.alternativeList = data.rows
  2789. } else {
  2790. this.$alert(data.msg, '错误', {
  2791. confirmButtonText: '确定'
  2792. })
  2793. }
  2794. })
  2795. },
  2796. /**
  2797. * 表格的新增
  2798. * @param row
  2799. * @param rowIndex
  2800. */
  2801. rowClassName({ row, rowIndex }) {
  2802. row.xh = rowIndex + 1
  2803. },
  2804. /**
  2805. * 单选框选中数据
  2806. * @param selection
  2807. */
  2808. componentSelectionChange(selection) {
  2809. this.checkedDetail = selection
  2810. },
  2811. toolSelectionChange (selection) {
  2812. this.checkedTool = selection
  2813. },
  2814. /**
  2815. * 删除子物料
  2816. */
  2817. deleteComponentPart () {
  2818. if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  2819. this.$message.warning('不可编辑的替代状态!')
  2820. return
  2821. }
  2822. if (this.checkedDetail.length === 0) {
  2823. this.$message.warning('请选择要删除子物料!')
  2824. return
  2825. } else {
  2826. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  2827. confirmButtonText: "确定",
  2828. cancelButtonText: "取消",
  2829. type: "warning"
  2830. }).then(() => {
  2831. let tempData = {
  2832. informationList: this.checkedDetail
  2833. }
  2834. deleteRoutingComponent(tempData).then(({data}) => {
  2835. if (data && data.code === 0) {
  2836. this.subDetailList = data.rows
  2837. this.$message({
  2838. message: '操作成功',
  2839. type: 'success',
  2840. duration: 1500,
  2841. onClose: () => {}
  2842. })
  2843. } else {
  2844. this.$alert(data.msg, '错误', {
  2845. confirmButtonText: '确定'
  2846. })
  2847. }
  2848. })
  2849. }).catch(() => {
  2850. })
  2851. }
  2852. },
  2853. /**
  2854. * 子物料
  2855. * @param row
  2856. */
  2857. componentClickRow (row) {
  2858. this.$refs.componentTable.toggleRowSelection(row)
  2859. },
  2860. toolClickRow (row) {
  2861. this.$refs.toolTable.toggleRowSelection(row)
  2862. },
  2863. /**
  2864. * 新增子明细方法
  2865. */
  2866. componentDataSave () {
  2867. if (this.componentData.partNo === '' || this.componentData.partNo == null) {
  2868. this.$message.warning('请选择主记录物料编码!')
  2869. return
  2870. }
  2871. if (this.componentData.routingType === '' || this.componentData.routingType == null) {
  2872. this.$message.warning('请选择主记录工艺类型!')
  2873. return
  2874. }
  2875. if (this.componentData.routingRevision === '' || this.componentData.routingRevision == null) {
  2876. this.$message.warning('请填写主记录Routing版本号!')
  2877. return
  2878. }
  2879. if (this.componentData.operationNo === '' || this.componentData.operationNo == null) {
  2880. this.$message.warning('请填写工序编码!')
  2881. return
  2882. }
  2883. if (this.componentData.operationName === '' || this.componentData.operationName == null) {
  2884. this.$message.warning('请选择工序名称!')
  2885. return
  2886. }
  2887. if (this.componentData.flag === '1') {
  2888. this.saveComponentLoading = true
  2889. saveRoutingComponent(this.componentData).then(({data}) => {
  2890. if (data && data.code === 0) {
  2891. this.subDetailList = data.rows
  2892. this.componentSaveModal = false
  2893. this.$message({
  2894. message: '操作成功',
  2895. type: 'success',
  2896. duration: 1500,
  2897. onClose: () => {}
  2898. })
  2899. } else {
  2900. this.$alert(data.msg, '错误', {
  2901. confirmButtonText: '确定'
  2902. })
  2903. }
  2904. this.saveComponentLoading = false
  2905. })
  2906. } else if (this.componentData.flag === '2') {
  2907. this.saveComponentLoading = true
  2908. updateRoutingComponent(this.componentData).then(({data}) => {
  2909. if (data && data.code === 0) {
  2910. this.subDetailList = data.rows
  2911. this.componentSaveModal = false
  2912. this.$message({
  2913. message: '操作成功',
  2914. type: 'success',
  2915. duration: 1500,
  2916. onClose: () => {}
  2917. })
  2918. } else {
  2919. this.$alert(data.msg, '错误', {
  2920. confirmButtonText: '确定'
  2921. })
  2922. }
  2923. this.saveComponentLoading = false
  2924. })
  2925. }
  2926. },
  2927. /**
  2928. * 回车事件
  2929. */
  2930. focusNextInput (index, type) {
  2931. let aaa = ''
  2932. if (this.subDetailList.length - 1 === index) {
  2933. aaa = `${type}0`
  2934. } else {
  2935. aaa = `${type}${index + 1}`
  2936. }
  2937. this.$nextTick(() => {
  2938. this.$refs[aaa].focus()
  2939. })
  2940. },
  2941. /**
  2942. * 保存主表信息
  2943. */
  2944. saveRoutingHeader () {
  2945. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  2946. this.$message.warning('请先选择Routing物料!')
  2947. return
  2948. }
  2949. if (this.modalData.routingRevision === '' || this.modalData.routingRevision == null) {
  2950. this.$message.warning('请先填写Routing版本号!')
  2951. return
  2952. }
  2953. if (this.modalData.routingType === '' || this.modalData.routingType == null) {
  2954. this.$message.warning('请先选择制造类型!')
  2955. return
  2956. }
  2957. if (this.modalData.phaseOutDate != null && this.modalData.phaseOutDate !== '' && (this.modalData.phaseInDate > this.modalData.phaseOutDate)) {
  2958. this.$message.warning('失效日期不能小于生效日期!')
  2959. return
  2960. }
  2961. this.saveHeaderLoading = true
  2962. // 新增主表信息
  2963. saveRoutingHeader(this.modalData).then(({data}) => {
  2964. if (data && data.code === 0) {
  2965. this.modalData = {
  2966. flag: '1',
  2967. title: 'routing新增',
  2968. site: data.rows.modalData.site,
  2969. partNo: data.rows.modalData.partNo,
  2970. partDesc: data.rows.modalData.partDesc,
  2971. routingRevision: data.rows.modalData.routingRevision,
  2972. routingType: data.rows.modalData.routingType,
  2973. noteText: data.rows.modalData.noteText,
  2974. phaseInDate: data.rows.modalData.phaseInDate,
  2975. phaseOutDate: data.rows.modalData.phaseOutDate,
  2976. engRevision: data.rows.modalData.engRevision,
  2977. typeFlag: data.rows.modalData.typeFlag,
  2978. netWeight: data.rows.modalData.netWeight,
  2979. officialFlag: data.rows.modalData.officialFlag
  2980. }
  2981. this.detailDataList = data.rows.detailDataList
  2982. this.detailData = data.rows.detailData
  2983. this.subDetailList = []
  2984. this.modalDisableFlag = true
  2985. this.$message({
  2986. message: '操作成功',
  2987. type: 'success',
  2988. duration: 1500,
  2989. onClose: () => {}
  2990. })
  2991. } else {
  2992. this.$alert(data.msg, '错误', {
  2993. confirmButtonText: '确定'
  2994. })
  2995. }
  2996. this.saveHeaderLoading = false
  2997. })
  2998. },
  2999. /**
  3000. * 复制Routing的模态框
  3001. */
  3002. copyRoutingRevision () {
  3003. this.copyRoutingData = {
  3004. site: this.modalData.site,
  3005. partNo: this.modalData.partNo,
  3006. routingRevision: this.modalData.routingRevision + 1,
  3007. routingType: this.modalData.routingType,
  3008. phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
  3009. phaseOutDate: '',
  3010. previousVersion: {},
  3011. createBy: this.$store.state.user.name,
  3012. officialFlag: 'N'
  3013. }
  3014. this.copyRoutingModelFlag = true
  3015. },
  3016. /**
  3017. * 复制Routing的方法
  3018. */
  3019. copyRouting () {
  3020. if (this.copyRoutingData.partNo === '' || this.copyRoutingData.partNo == null) {
  3021. this.$message.warning('请选择Routing物料!')
  3022. return
  3023. }
  3024. if (this.copyRoutingData.routingRevision === '' || this.copyRoutingData.routingRevision == null) {
  3025. this.$message.warning('请填写Routing版本号!')
  3026. return
  3027. }
  3028. if (this.copyRoutingData.routingType === '' || this.copyRoutingData.routingType == null) {
  3029. this.$message.warning('请选择工艺类型!')
  3030. return
  3031. }
  3032. this.copyRoutingData.previousVersion = this.modalData
  3033. // 新增主表信息
  3034. copyRouting(this.copyRoutingData).then(({data}) => {
  3035. if (data && data.code === 0) {
  3036. this.copyRoutingModelFlag = false
  3037. this.$message({
  3038. message: '操作成功',
  3039. type: 'success',
  3040. duration: 1500,
  3041. onClose: () => {}
  3042. })
  3043. } else {
  3044. this.$alert(data.msg, '错误', {
  3045. confirmButtonText: '确定'
  3046. })
  3047. }
  3048. })
  3049. },
  3050. /**
  3051. * 复制alternative的模态框
  3052. */
  3053. copyRoutingAlternative () {
  3054. this.copyAlternativeData = {
  3055. site: this.detailData.site,
  3056. partNo: this.detailData.partNo,
  3057. routingRevision: this.detailData.routingRevision,
  3058. routingType: this.detailData.routingType,
  3059. alternativeNo: this.detailData.alternativeNo,
  3060. alternativeDescription: this.detailData.alternativeDescription,
  3061. routTemplateId: '',
  3062. planDate: '',
  3063. fixedLeadTimeDay: '',
  3064. fixedLeadTimeHour: '',
  3065. variableLeadTimeDay: '',
  3066. variableLeadTimeHour: '',
  3067. forStdLotByDay: '',
  3068. forLotByDay: '',
  3069. minLotQty: '',
  3070. detailNoteText: this.detailData.detailNoteText,
  3071. status: 'Tentative',
  3072. officialFlag: 'N',
  3073. previousVersion: {},
  3074. createBy: this.$store.state.user.name
  3075. }
  3076. this.copyAlternativeModelFlag = true
  3077. },
  3078. /**
  3079. * 工艺指导模态框
  3080. */
  3081. workGuidelineModal (row) {
  3082. this.workGuidelineData = {
  3083. site: this.modalData.site,
  3084. partNo: this.modalData.partNo,
  3085. partDesc: this.modalData.partDesc,
  3086. routingRevision: this.modalData.routingRevision,
  3087. routingType: this.modalData.routingType,
  3088. alternativeNo: this.detailData.alternativeNo,
  3089. alternativeDescription: this.detailData.alternativeDescription,
  3090. operationId: row.operationId,
  3091. operationNo: row.operationNo,
  3092. operationName: row.operationName
  3093. }
  3094. this.getRoutingWorkGuideline()
  3095. this.queryWorkGuidelineModal = true
  3096. },
  3097. /**
  3098. * 获取 workGuideline
  3099. */
  3100. getRoutingWorkGuideline () {
  3101. getRoutingWorkGuideline(this.workGuidelineData).then(({data}) => {
  3102. if (data && data.code === 0) {
  3103. this.workGuidelineList = data.rows
  3104. } else {
  3105. this.workGuidelineList = []
  3106. }
  3107. })
  3108. },
  3109. /**
  3110. * 复选列表信息
  3111. * @param val
  3112. */
  3113. selectionWorkGuideline (val) {
  3114. this.workGuidelineSelections = val
  3115. },
  3116. /**
  3117. * workGuideline 新增模态框
  3118. */
  3119. saveWorkGuideline () {
  3120. this.saveWorkGuidelineData = {
  3121. flag: '1',
  3122. id: '',
  3123. site: this.workGuidelineData.site,
  3124. partNo: this.workGuidelineData.partNo,
  3125. partDesc: this.workGuidelineData.partDesc,
  3126. routingRevision: this.workGuidelineData.routingRevision,
  3127. routingType: this.workGuidelineData.routingType,
  3128. alternativeNo: this.workGuidelineData.alternativeNo,
  3129. alternativeDescription: this.workGuidelineData.alternativeDescription,
  3130. operationId: this.workGuidelineData.operationId,
  3131. operationNo: this.workGuidelineData.operationNo,
  3132. operationName: this.workGuidelineData.operationName,
  3133. guidelineSeq: '',
  3134. guidelineDesc: '',
  3135. guidelineText: '',
  3136. guidelineType: 'Instruction',
  3137. signOffRequired: 'Not Required',
  3138. inspectionSignOffRequired: 'Not Required',
  3139. createBy: this.$store.state.user.name,
  3140. updateBy: ''
  3141. }
  3142. // 查询seq
  3143. getGuidelineSeq(this.workGuidelineData).then(({data}) => {
  3144. if (data && data.code === 0) {
  3145. this.saveWorkGuidelineData.guidelineSeq = data.guidelineSeq
  3146. }
  3147. })
  3148. // 开启模态框
  3149. this.saveWorkGuidelineModal = true
  3150. this.workGuidelineDisableModal = false
  3151. },
  3152. /**
  3153. * workGuideline 编辑模态框
  3154. */
  3155. updateWorkGuidelineModal (row) {
  3156. this.saveWorkGuidelineData = {
  3157. flag: '2',
  3158. id: row.id,
  3159. site: row.site,
  3160. partNo: row.partNo,
  3161. partDesc: row.partDesc,
  3162. routingRevision: row.routingRevision,
  3163. routingType: row.routingType,
  3164. alternativeNo: row.alternativeNo,
  3165. alternativeDescription: row.alternativeDescription,
  3166. operationId: row.operationId,
  3167. operationNo: row.operationNo,
  3168. operationName: row.operationName,
  3169. guidelineSeq: row.guidelineSeq,
  3170. guidelineDesc: row.guidelineDesc,
  3171. guidelineText: row.guidelineText,
  3172. guidelineType: row.guidelineType,
  3173. signOffRequired: row.signOffRequired,
  3174. inspectionSignOffRequired: row.inspectionSignOffRequired,
  3175. createBy: '',
  3176. updateBy: this.$store.state.user.name
  3177. }
  3178. // 开启模态框
  3179. this.saveWorkGuidelineModal = true
  3180. this.workGuidelineDisableModal = true
  3181. },
  3182. /**
  3183. * workGuideline 新增方法
  3184. */
  3185. workGuidelineCommit () {
  3186. if (this.saveWorkGuidelineData.guidelineSeq === '' || this.saveWorkGuidelineData.guidelineSeq == null) {
  3187. this.$message.warning('请输入序号!')
  3188. return
  3189. }
  3190. if (this.saveWorkGuidelineData.guidelineDesc === '' || this.saveWorkGuidelineData.guidelineDesc == null) {
  3191. this.$message.warning('请输入工艺指导名称!')
  3192. return
  3193. }
  3194. if (this.saveWorkGuidelineData.guidelineType === '' || this.saveWorkGuidelineData.guidelineType == null) {
  3195. this.$message.warning('请选择工艺指导类型!')
  3196. return
  3197. }
  3198. if (this.saveWorkGuidelineData.signOffRequired === '' || this.saveWorkGuidelineData.signOffRequired == null) {
  3199. this.$message.warning('请选择签字!')
  3200. return
  3201. }
  3202. if (this.saveWorkGuidelineData.inspectionSignOffRequired === '' || this.saveWorkGuidelineData.inspectionSignOffRequired == null) {
  3203. this.$message.warning('请选择检验签字!')
  3204. return
  3205. }
  3206. if (this.saveWorkGuidelineData.flag === '1') {
  3207. workGuidelineSave(this.saveWorkGuidelineData).then(({data}) => {
  3208. if (data && data.code === 0) {
  3209. this.getRoutingWorkGuideline()
  3210. this.saveWorkGuidelineModal = false
  3211. this.$message({
  3212. message: '操作成功',
  3213. type: 'success',
  3214. duration: 1500,
  3215. onClose: () => {}
  3216. })
  3217. } else {
  3218. this.$alert(data.msg, '错误', {
  3219. confirmButtonText: '确定'
  3220. })
  3221. }
  3222. })
  3223. } else {
  3224. workGuidelineEdit(this.saveWorkGuidelineData).then(({data}) => {
  3225. if (data && data.code === 0) {
  3226. this.getRoutingWorkGuideline()
  3227. this.saveWorkGuidelineModal = false
  3228. this.$message({
  3229. message: '操作成功',
  3230. type: 'success',
  3231. duration: 1500,
  3232. onClose: () => {}
  3233. })
  3234. } else {
  3235. this.$alert(data.msg, '错误', {
  3236. confirmButtonText: '确定'
  3237. })
  3238. }
  3239. })
  3240. }
  3241. },
  3242. /**
  3243. * 删除 workGuideline
  3244. */
  3245. deleteModal () {
  3246. if(this.workGuidelineSelections.length === 0){
  3247. this.$message.warning('请勾选要删除的工艺指导!')
  3248. return
  3249. }
  3250. this.$confirm(`是否删除这 `+ this.workGuidelineSelections.length +` 条工艺指导?`, '提示', {
  3251. confirmButtonText: '确定',
  3252. cancelButtonText: '取消',
  3253. type: 'warning'
  3254. }).then(() => {
  3255. let tempData = {
  3256. informationList: this.workGuidelineSelections
  3257. }
  3258. deleteWorkGuideline(tempData).then(({data}) => {
  3259. if (data && data.code === 0) {
  3260. this.getRoutingWorkGuideline()
  3261. this.workGuidelineSelections = []
  3262. this.$message({
  3263. message: '操作成功',
  3264. type: 'success',
  3265. duration: 1500,
  3266. onClose: () => {}
  3267. })
  3268. } else {
  3269. this.$alert(data.msg, '错误', {
  3270. confirmButtonText: '确定'
  3271. })
  3272. }
  3273. })
  3274. }).catch(() => {
  3275. })
  3276. },
  3277. /**
  3278. * 复制alternative的方法
  3279. */
  3280. copyAlternative () {
  3281. if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
  3282. this.$message.warning('请选择Routing物料!')
  3283. return
  3284. }
  3285. if (this.copyAlternativeData.routingRevision === '' || this.copyAlternativeData.routingRevision == null) {
  3286. this.$message.warning('请填写Routing版本号!')
  3287. return
  3288. }
  3289. if (this.copyAlternativeData.routingType === '' || this.copyAlternativeData.routingType == null) {
  3290. this.$message.warning('请选择工艺类型!')
  3291. return
  3292. }
  3293. if (this.copyAlternativeData.alternativeNo === '' || this.copyAlternativeData.alternativeNo == null) {
  3294. this.$message.warning('请填写替代编码!')
  3295. return
  3296. }
  3297. if (this.copyAlternativeData.alternativeDescription === '' || this.copyAlternativeData.alternativeDescription == null) {
  3298. this.$message.warning('请填写替代名称!')
  3299. return
  3300. }
  3301. this.copyAlternativeData.previousVersion = this.detailData
  3302. copyAlternative(this.copyAlternativeData).then(({data}) => {
  3303. if (data && data.code === 0) {
  3304. this.detailDataList = data.rows.detailDataList
  3305. this.copyAlternativeModelFlag = false
  3306. this.$message({
  3307. message: '操作成功',
  3308. type: 'success',
  3309. duration: 1500,
  3310. onClose: () => {}
  3311. })
  3312. } else {
  3313. this.$alert(data.msg, '错误', {
  3314. confirmButtonText: '确定'
  3315. })
  3316. }
  3317. })
  3318. },
  3319. /**
  3320. * 新增替代方法
  3321. */
  3322. detailDataSave () {
  3323. if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) {
  3324. this.$message.warning('请先选择Routing物料!')
  3325. return
  3326. }
  3327. if (this.saveDetailData.routingRevision === '' || this.saveDetailData.routingRevision == null) {
  3328. this.$message.warning('请先填写Routing版本号!')
  3329. return
  3330. }
  3331. if (this.saveDetailData.routingType === '' || this.saveDetailData.routingType == null) {
  3332. this.$message.warning('请先选择工艺类型!')
  3333. return
  3334. }
  3335. if (this.saveDetailData.alternativeNo === '' || this.saveDetailData.alternativeNo == null) {
  3336. this.$message.warning('请填写替代编码!')
  3337. return
  3338. }
  3339. if (this.saveDetailData.alternativeDescription === '' || this.saveDetailData.alternativeDescription == null) {
  3340. this.$message.warning('请填写替代名称!')
  3341. return
  3342. }
  3343. if (this.saveDetailData.status === '' || this.saveDetailData.status == null) {
  3344. this.$message.warning('请选择替代状态!')
  3345. return
  3346. }
  3347. this.saveDetailLoading = true
  3348. if (this.saveDetailData.flag === '1') {
  3349. routingDetailSave(this.saveDetailData).then(({data}) => {
  3350. if (data && data.code === 0) {
  3351. this.detailDataList = data.rows
  3352. this.detailData = this.saveDetailData
  3353. this.subDetailList = []
  3354. this.saveDetailModalFlag = false
  3355. this.$message({
  3356. message: '操作成功',
  3357. type: 'success',
  3358. duration: 1500,
  3359. onClose: () => {}
  3360. })
  3361. } else {
  3362. this.$alert(data.msg, '错误', {
  3363. confirmButtonText: '确定'
  3364. })
  3365. }
  3366. this.saveDetailLoading = false
  3367. })
  3368. } else {
  3369. routingDetailUpdate(this.saveDetailData).then(({data}) => {
  3370. if (data && data.code === 0) {
  3371. this.detailDataList = data.rows.detailDataList
  3372. this.detailData = data.rows.detailData
  3373. this.subDetailList = data.rows.subDetailList
  3374. this.saveDetailModalFlag = false
  3375. this.$message({
  3376. message: '操作成功',
  3377. type: 'success',
  3378. duration: 1500,
  3379. onClose: () => {}
  3380. })
  3381. } else {
  3382. this.$alert(data.msg, '错误', {
  3383. confirmButtonText: '确定'
  3384. })
  3385. }
  3386. this.saveDetailLoading = false
  3387. })
  3388. }
  3389. },
  3390. /**
  3391. * 删除替代
  3392. */
  3393. deleteRoutingDetail () {
  3394. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3395. this.$message.warning('请选择要删除的替代编码!')
  3396. return
  3397. }
  3398. if (this.detailData.alternativeNo === '*') {
  3399. this.$message.warning('当前为默认替代,不可以删除!')
  3400. return
  3401. }
  3402. this.$confirm(`是否删除这项替代?`, '提示', {
  3403. confirmButtonText: '确定',
  3404. cancelButtonText: '取消',
  3405. type: 'warning'
  3406. }).then(() => {
  3407. routingDetailDelete(this.detailData).then(({data}) => {
  3408. if (data && data.code === 0) {
  3409. this.detailData = data.rows.detailData
  3410. this.detailDataList = data.rows.detailDataList
  3411. this.subDetailList = data.rows.subDetailList
  3412. this.$message({
  3413. message: '操作成功',
  3414. type: 'success',
  3415. duration: 1500,
  3416. onClose: () => {}
  3417. })
  3418. } else {
  3419. this.$alert(data.msg, '错误', {
  3420. confirmButtonText: '确定'
  3421. })
  3422. }
  3423. })
  3424. }).catch(() => {
  3425. })
  3426. },
  3427. /**
  3428. * 修改替代状态为 Buildable
  3429. */
  3430. updateStatusToBuildable () {
  3431. this.$confirm(`是否修改状态为Buildable?`, '提示', {
  3432. confirmButtonText: '确定',
  3433. cancelButtonText: '取消',
  3434. type: 'warning'
  3435. }).then(() => {
  3436. updateAlternativeStatus(this.detailData).then(({data}) => {
  3437. if (data && data.code === 0) {
  3438. this.detailDataList = data.rows.detailDataList
  3439. this.detailData = data.rows.detailData
  3440. this.subDetailList = data.rows.subDetailList
  3441. this.$message({
  3442. message: '操作成功',
  3443. type: 'success',
  3444. duration: 1500,
  3445. onClose: () => {}
  3446. })
  3447. } else {
  3448. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  3449. // 刷新替代和子明细
  3450. this.alternativeChange()
  3451. }
  3452. })
  3453. }).catch(() => {
  3454. })
  3455. },
  3456. /**
  3457. * 修改替代状态为 Obsolete
  3458. */
  3459. updateStatusToObsolete () {
  3460. this.$confirm(`是否修改状态为Obsolete?`, '提示', {
  3461. confirmButtonText: '确定',
  3462. cancelButtonText: '取消',
  3463. type: 'warning'
  3464. }).then(() => {
  3465. updateAlternativeStatus(this.detailData).then(({data}) => {
  3466. if (data && data.code === 0) {
  3467. this.detailDataList = data.rows.detailDataList
  3468. this.detailData = data.rows.detailData
  3469. this.subDetailList = data.rows.subDetailList
  3470. this.$message({
  3471. message: '操作成功',
  3472. type: 'success',
  3473. duration: 1500,
  3474. onClose: () => {}
  3475. })
  3476. } else {
  3477. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  3478. // 刷新替代和子明细
  3479. this.alternativeChange()
  3480. }
  3481. })
  3482. }).catch(() => {
  3483. })
  3484. },
  3485. /**
  3486. * 替代改变事件
  3487. */
  3488. alternativeChange () {
  3489. queryRoutingComponent(this.detailData).then(({data}) => {
  3490. if (data && data.code === 0) {
  3491. this.detailDataList = data.rows.detailDataList
  3492. this.detailData = data.rows.detailData
  3493. this.subDetailList = data.rows.subDetailList
  3494. } else {
  3495. this.$alert(data.msg, '错误', {
  3496. confirmButtonText: '确定'
  3497. })
  3498. }
  3499. })
  3500. },
  3501. // 临时Routing转为正式Routing
  3502. toBecomeOfficialRouting () {
  3503. toBecomeOfficialRouting(this.detailData).then(({data}) => {
  3504. if (data && data.code === 0) {
  3505. this.$message({
  3506. message: '操作成功',
  3507. type: 'success',
  3508. duration: 1500,
  3509. onClose: () => {}
  3510. })
  3511. } else {
  3512. this.$alert(data.msg, '错误', {
  3513. confirmButtonText: '确定'
  3514. })
  3515. }
  3516. })
  3517. },
  3518. /**
  3519. * 新增 routingTool
  3520. */
  3521. routingToolSave () {
  3522. if (this.routingToolData.alternativeNo === '' || this.routingToolData.alternativeNo == null) {
  3523. this.$message.warning('请选择替代!')
  3524. return
  3525. }
  3526. if (this.routingToolData.operationNo === '' || this.routingToolData.operationNo == null) {
  3527. this.$message.warning('请选择工序!')
  3528. return
  3529. }
  3530. if (this.routingToolData.toolId === '' || this.routingToolData.toolId == null) {
  3531. this.$message.warning('请选择工具!')
  3532. return
  3533. }
  3534. if (this.routingToolData.toolQty === '' || this.routingToolData.toolQty == null) {
  3535. this.$message.warning('请输入工具数量!')
  3536. return
  3537. }
  3538. if (this.routingToolData.flag === '1') {
  3539. routingToolSave(this.routingToolData).then(({data}) => {
  3540. if (data && data.code === 0) {
  3541. this.searchRoutingTools()
  3542. this.saveRoutingToolModal = false
  3543. this.$message({
  3544. message: '操作成功',
  3545. type: 'success',
  3546. duration: 1500,
  3547. onClose: () => {}
  3548. })
  3549. } else {
  3550. this.$alert(data.msg, '错误', {
  3551. confirmButtonText: '确定'
  3552. })
  3553. }
  3554. })
  3555. } else {
  3556. routingToolEdit(this.routingToolData).then(({data}) => {
  3557. if (data && data.code === 0) {
  3558. this.searchRoutingTools()
  3559. this.saveRoutingToolModal = false
  3560. this.$message({
  3561. message: '操作成功',
  3562. type: 'success',
  3563. duration: 1500,
  3564. onClose: () => {}
  3565. })
  3566. } else {
  3567. this.$alert(data.msg, '错误', {
  3568. confirmButtonText: '确定'
  3569. })
  3570. }
  3571. })
  3572. }
  3573. },
  3574. /**
  3575. * 删除 routingTool
  3576. */
  3577. deleteRoutingTool () {
  3578. if (this.checkedTool.length === 0) {
  3579. this.$message.warning('请选择要删除的工具!')
  3580. return
  3581. } else {
  3582. this.$confirm("请是否确认删除该工具?", "提示", {
  3583. confirmButtonText: "确定",
  3584. cancelButtonText: "取消",
  3585. type: "warning"
  3586. }).then(() => {
  3587. let tempData = {
  3588. informationList: this.checkedTool
  3589. }
  3590. deleteRoutingTool(tempData).then(({data}) => {
  3591. if (data && data.code === 0) {
  3592. this.searchRoutingTools()
  3593. this.$message({
  3594. message: '操作成功',
  3595. type: 'success',
  3596. duration: 1500,
  3597. onClose: () => {}
  3598. })
  3599. } else {
  3600. this.$alert(data.msg, '错误', {
  3601. confirmButtonText: '确定'
  3602. })
  3603. }
  3604. })
  3605. }).catch(() => {
  3606. })
  3607. }
  3608. },
  3609. // ======= 正则校验 =======
  3610. handleInput (value, type) {
  3611. // 大于等于0,且只能输入4位小数
  3612. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  3613. if (val == null || val == undefined || val == '') {
  3614. val = 0
  3615. }
  3616. if (type === 1) {
  3617. this.modalData.machRunFactor = val
  3618. } else if (type === 2) {
  3619. this.detailData.machSetupTime = val
  3620. } else if (type === 3) {
  3621. this.saveDetailData.setupCrewSize = val
  3622. } else if (type === 4) {
  3623. this.componentData.crewSize = val
  3624. } else if (type === 5) {
  3625. this.componentData.laborSetupTime = val
  3626. }
  3627. },
  3628. handleInputB (value, type) {
  3629. const reg = /^(([1-9]?\d{0,1}(\.\d{1,2})?)|100|100\.(0){1,2})$/
  3630. if (type === 1) {
  3631. if (reg.test(value) === true) {
  3632. this.componentData.efficiencyFactor = value
  3633. } else if (value > 100) {
  3634. this.componentData.efficiencyFactor = 100
  3635. } else {
  3636. this.componentData.efficiencyFactor = 0
  3637. }
  3638. } else if (type === 2) {
  3639. if (reg.test(value) === true) {
  3640. this.componentData.laborRunFactor = value
  3641. } else if (value > 100) {
  3642. this.componentData.laborRunFactor = 100
  3643. } else {
  3644. this.componentData.laborRunFactor = 0
  3645. }
  3646. }
  3647. },
  3648. // ======== chooseList相关方法 ========
  3649. /**
  3650. * 获取基础数据列表S
  3651. * @param val
  3652. * @param type
  3653. */
  3654. getBaseList (val, type) {
  3655. this.tagNo = val
  3656. this.tagNo1 = type
  3657. this.$nextTick(() => {
  3658. let strVal = ''
  3659. if (val === 118) {
  3660. if(type === 1) {
  3661. strVal = this.componentData.laborClassNo
  3662. } else if (type === 2) {
  3663. strVal = this.componentData.setupLaborClassNo
  3664. }
  3665. }
  3666. if (val === 119) {
  3667. strVal = this.componentData.workCenterNo
  3668. }
  3669. if (val === 122) {
  3670. strVal = this.routingToolData.toolId
  3671. }
  3672. this.$refs.baseList.init(val, strVal)
  3673. })
  3674. },
  3675. /**
  3676. * 列表方法的回调
  3677. * @param val
  3678. */
  3679. getBaseData (val) {
  3680. if (this.tagNo === 118) {
  3681. if (this.tagNo1 === 1) {
  3682. this.componentData.laborClassNo = val.level_id
  3683. this.componentData.laborClassDesc = val.level_desc
  3684. } else if (this.tagNo1 === 2) {
  3685. this.componentData.setupLaborClassNo = val.level_id
  3686. this.componentData.setupLaborClassDesc = val.level_desc
  3687. }
  3688. }
  3689. if (this.tagNo === 119) {
  3690. this.componentData.workCenterNo = val.work_center_no
  3691. this.componentData.workCenterDesc = val.work_center_desc
  3692. }
  3693. if (this.tagNo === 122) {
  3694. this.routingToolData.toolId = val.tool_id
  3695. this.routingToolData.toolDescription = val.tool_description
  3696. }
  3697. },
  3698. // ======== 导出相关方法 ========
  3699. /**
  3700. * 导出excel
  3701. */
  3702. async createExportData () {
  3703. this.searchData.limit = -1
  3704. this.searchData.page = 1
  3705. await routingManagementSearch(this.searchData).then(({data}) => {
  3706. this.resultList = data.page.list
  3707. })
  3708. return this.resultList
  3709. },
  3710. startDownload () {},
  3711. finishDownload () {},
  3712. fields () {
  3713. let json = '{'
  3714. this.columnList.forEach((item, index) => {
  3715. if (index == this.columnList.length - 1) {
  3716. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3717. } else {
  3718. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3719. }
  3720. })
  3721. json += '}'
  3722. let s = eval('(' + json + ')')
  3723. return s
  3724. },
  3725. // 切换到Bom
  3726. checkOutToBom (partNo) {
  3727. if (this.$router.resolve('part-bomManagement').resolved.name === '404') {
  3728. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  3729. } else {
  3730. this.$router.push({name:"part-bomManagement",params:{partNo: partNo}})
  3731. }
  3732. }
  3733. }
  3734. }
  3735. </script>
  3736. <style scoped lang="scss">
  3737. /deep/ .customer-tab .el-tabs__content {
  3738. padding: 0px !important;
  3739. }
  3740. /deep/ .detail-tab .el-tabs__content {
  3741. height: 165px;
  3742. padding: 15px 0px 0px 0px;
  3743. }
  3744. /deep/ .sub_detail-tab .el-tabs__content {
  3745. height: 280px;
  3746. padding: 0px;
  3747. }
  3748. .numInput /deep/ .el-input__inner{
  3749. text-align: right;
  3750. }
  3751. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3752. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3753. -webkit-appearance: none;
  3754. }
  3755. /deep/ .inlineNumber input[type="number"]{
  3756. -moz-appearance: textfield;
  3757. padding-right: 5px !important;
  3758. }
  3759. </style>