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.

5784 lines
196 KiB

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