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.

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