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.

5227 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
12 months ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1 year ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
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
11 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
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
12 months ago
11 months ago
12 months ago
3 years ago
12 months ago
3 years ago
3 years ago
3 years ago
2 years ago
11 months ago
12 months ago
11 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
11 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
11 months ago
3 years ago
3 years ago
12 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
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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
11 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
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
12 months ago
12 months ago
12 months 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
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
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
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
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
11 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
11 months ago
3 years ago
3 years ago
11 months ago
3 years ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 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
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
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
12 months ago
12 months ago
12 months ago
12 months ago
11 months ago
12 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
  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: 'weightShare',
  2929. headerAlign: "center",
  2930. align: "left",
  2931. columnLabel: '重量分配',
  2932. columnHidden: false,
  2933. columnImage: false,
  2934. status: true,
  2935. fixed: '',
  2936. columnWidth: 200
  2937. },
  2938. {
  2939. columnProp: 'partsByWeight',
  2940. headerAlign: "center",
  2941. align: "right",
  2942. columnLabel: '零件-按重量',
  2943. columnHidden: false,
  2944. columnImage: false,
  2945. status: true,
  2946. fixed: '',
  2947. columnWidth: 140
  2948. },
  2949. {
  2950. columnProp: 'qtyUom',
  2951. headerAlign: "center",
  2952. align: "left",
  2953. columnLabel: '数量计量单位',
  2954. columnHidden: false,
  2955. columnImage: false,
  2956. status: true,
  2957. fixed: '',
  2958. columnWidth: 80
  2959. },
  2960. ],
  2961. productGroupId4ColumnList: [
  2962. {
  2963. columnProp: 'productGroupId4',
  2964. headerAlign: "center",
  2965. align: "left",
  2966. columnLabel: '计划人编码',
  2967. columnHidden: false,
  2968. columnImage: false,
  2969. status: true,
  2970. fixed: '',
  2971. columnWidth: 80
  2972. },
  2973. {
  2974. columnProp: 'productGroupName4',
  2975. headerAlign: "center",
  2976. align: "left",
  2977. columnLabel: '计划人名称',
  2978. columnHidden: false,
  2979. columnImage: false,
  2980. status: true,
  2981. fixed: '',
  2982. columnWidth: 100
  2983. }
  2984. ],
  2985. // ======== 必填规则 ========
  2986. rules: {
  2987. partNo: [
  2988. {
  2989. required: true,
  2990. message: ' ',
  2991. trigger: ['blur','change']
  2992. }
  2993. ],
  2994. partDesc: [
  2995. {
  2996. required: true,
  2997. message: ' ',
  2998. trigger: ['blur','change']
  2999. }
  3000. ],
  3001. bomType: [
  3002. {
  3003. required: true,
  3004. message: ' ',
  3005. trigger: ['blur','change']
  3006. }
  3007. ],
  3008. effPhaseInDate: [
  3009. {
  3010. required: true,
  3011. message: ' ',
  3012. trigger: ['blur','change']
  3013. }
  3014. ],
  3015. engChgLevel: [
  3016. {
  3017. required: true,
  3018. message: ' ',
  3019. trigger: ['blur','change']
  3020. }
  3021. ]
  3022. },
  3023. detailRules: {
  3024. alternativeNo: [
  3025. {
  3026. required: true,
  3027. message: ' ',
  3028. trigger: ['blur','change']
  3029. }
  3030. ],
  3031. alternativeDescription: [
  3032. {
  3033. required: true,
  3034. message: ' ',
  3035. trigger: ['blur','change']
  3036. }
  3037. ],
  3038. minLotQty: [
  3039. {
  3040. required: true,
  3041. message: ' ',
  3042. trigger: ['blur','change']
  3043. }
  3044. ],
  3045. status: [
  3046. {
  3047. required: true,
  3048. message: ' ',
  3049. trigger: ['blur','change']
  3050. }
  3051. ]
  3052. },
  3053. componentRules: {
  3054. componentPart: [
  3055. {
  3056. required: true,
  3057. message: ' ',
  3058. trigger: ['blur','change']
  3059. }
  3060. ],
  3061. lineSequence: [
  3062. {
  3063. required: true,
  3064. message: ' ',
  3065. trigger: ['blur','change']
  3066. }
  3067. ],
  3068. qtyPerAssembly: [
  3069. {
  3070. required: true,
  3071. message: ' ',
  3072. trigger: ['blur','change']
  3073. }
  3074. ],
  3075. componentScrap: [
  3076. {
  3077. required: true,
  3078. message: ' ',
  3079. trigger: ['blur','change']
  3080. }
  3081. ],
  3082. shrinkageFactor: [
  3083. {
  3084. required: true,
  3085. message: ' ',
  3086. trigger: ['blur','change']
  3087. }
  3088. ],
  3089. issueType: [
  3090. {
  3091. required: true,
  3092. message: ' ',
  3093. trigger: ['blur','change']
  3094. }
  3095. ],
  3096. consumptionItem: [
  3097. {
  3098. required: true,
  3099. message: ' ',
  3100. trigger: ['blur','change']
  3101. }
  3102. ]
  3103. },
  3104. // ======== 复选数据集 ========
  3105. bomSelections: [],
  3106. // ======== 模态框开关控制 ========
  3107. modalFlag: false,
  3108. modalDisableFlag: false,
  3109. partModelFlag: false,
  3110. componentPartModelFlag: false,
  3111. copyPartModelFlag: false,
  3112. saveDetailModalFlag :false,
  3113. saveDetailModalDisable: false,
  3114. componentSaveModal: false,
  3115. componentDisableFlag: false,
  3116. operationModelFlag: false,
  3117. copyBomModelFlag: false,
  3118. copyAlternativeModelFlag: false,
  3119. headerSaveFlag: false,
  3120. manufStructCostDistribModal: false,
  3121. productGroupId4ModelFlag: false,
  3122. productGroupId4SaveModelFlag: false,
  3123. filterVisible: false,
  3124. isFilterSearch: false,
  3125. filterSearchData: {},
  3126. }
  3127. },
  3128. mounted () {
  3129. this.$nextTick(() => {
  3130. this.height = window.innerHeight - 170
  3131. })
  3132. // const skipModal = localStorage.getItem('skipModal') === 'true'
  3133. // const bomData = localStorage.getItem('bomData')
  3134. //
  3135. // if (bomData && !skipModal) {
  3136. // this.modalFlag = true
  3137. // }
  3138. //
  3139. // localStorage.removeItem('skipModal')
  3140. },
  3141. activated() {
  3142. if (this.$route.params && this.$route.params.type && this.$route.params.type === 'quote') {
  3143. this.handleQueryBomByQuote();
  3144. } else if (this.$route.params.partNo) {
  3145. this.searchData.plmPartNo = this.$route.params.partNo
  3146. this.getDataList()
  3147. } else if (this.initPage === false) {
  3148. this.getDataList()
  3149. }
  3150. this.initPage = true
  3151. },
  3152. // js
  3153. methods: {
  3154. // === 报价查询 ===
  3155. handleQueryBomByQuote () {
  3156. let params = {
  3157. site: this.$store.state.user.site,
  3158. plmPartNo: this.$route.params.partNo,
  3159. bomType: this.$route.params.bomType,
  3160. engChgLevel: this.$route.params.engChgLevel,
  3161. page: this.pageIndex,
  3162. limit: this.pageSize
  3163. }
  3164. this.queryLoading = true
  3165. bomManagementSearch(params).then(({data})=>{
  3166. if (data && data.code === 0) {
  3167. this.dataList = data.page.list
  3168. this.pageIndex = data.page.currPage
  3169. this.pageSize = data.page.pageSize
  3170. this.totalPage = data.page.totalCount
  3171. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  3172. }
  3173. this.queryLoading = false
  3174. })
  3175. },
  3176. // ======== 分页相关方法 ========
  3177. // 每页数
  3178. sizeChangeHandle (val) {
  3179. this.pageSize = val
  3180. this.pageIndex = 1
  3181. if ( this.isFilterSearch === false){
  3182. this.getDataList()
  3183. } else {
  3184. this.queryByAnyField(this.filterSearchData)
  3185. }
  3186. },
  3187. // 当前页
  3188. currentChangeHandle (val) {
  3189. this.pageIndex = val
  3190. if ( this.isFilterSearch === false){
  3191. this.getDataList()
  3192. } else {
  3193. this.queryByAnyField(this.filterSearchData)
  3194. }
  3195. },
  3196. // 每页数
  3197. sizeChangeHandle2 (val) {
  3198. this.pageSize2 = val
  3199. this.pageIndex2 = 1
  3200. this.queryPartList()
  3201. },
  3202. // 当前页
  3203. currentChangeHandle2 (val) {
  3204. this.pageIndex2 = val
  3205. this.queryPartList()
  3206. },
  3207. // 每页数
  3208. sizeChangeHandle3 (val) {
  3209. this.pageSize3 = val
  3210. this.pageIndex3 = 1
  3211. this.queryComponentPartList()
  3212. },
  3213. // 当前页
  3214. currentChangeHandle3 (val) {
  3215. this.pageIndex3 = val
  3216. this.queryComponentPartList()
  3217. },
  3218. // 每页数
  3219. sizeChangeHandle4 (val) {
  3220. this.pageSize4 = val
  3221. this.pageIndex4 = 1
  3222. this.queryCopyPartModal()
  3223. },
  3224. // 当前页
  3225. currentChangeHandle4 (val) {
  3226. this.pageIndex4 = val
  3227. this.queryCopyPartModal()
  3228. },
  3229. // ======== 页签切换相关方法 ========
  3230. // 明细页签选择替换
  3231. tabDetailClick (tab, event) {
  3232. // 刷新列表数据
  3233. this.refreshDetailTable()
  3234. },
  3235. // 子明细页签选择替换
  3236. tabSubDetailClick (tab, event) {
  3237. // 刷新列表数据
  3238. this.refreshSubDetailTable()
  3239. },
  3240. // 刷新明细页签的table数据
  3241. refreshDetailTable () {
  3242. if (this.detailTable === 'bom_detail') {
  3243. }
  3244. },
  3245. // 刷新子明细页签的table数据
  3246. refreshSubDetailTable () {
  3247. if (this.subDetailTable === 'bom_sub_detail') {
  3248. this.queryBomComponentTable()
  3249. } else if (this.subDetailTable === 'by_products') {
  3250. this.queryBomByProductTable()
  3251. } else if (this.subDetailTable === 'manuf_struct_cost_distribtion') {
  3252. this.queryManufStructCostDistribtionTable()
  3253. } else if (this.subDetailTable === 'multi_level_structure') {
  3254. this.queryMultiLevelStructureTable()
  3255. }
  3256. },
  3257. // 刷新方法
  3258. queryBomComponentTable () {
  3259. queryBomComponentTable(this.detailData).then(({data}) => {
  3260. if (data.code === 0) {
  3261. this.subDetailList = data.rows
  3262. }
  3263. })
  3264. },
  3265. // 刷新方法
  3266. queryBomByProductTable () {
  3267. queryBomByProductTable(this.detailData).then(({data}) => {
  3268. if (data.code === 0) {
  3269. this.byProductList = data.rows
  3270. }
  3271. })
  3272. },
  3273. // 刷新方法
  3274. queryManufStructCostDistribtionTable () {
  3275. queryManufStructCostDistribtionTable(this.detailData).then(({data}) => {
  3276. if (data.code === 0) {
  3277. this.manufStructCostDistribList = data.rows
  3278. }
  3279. })
  3280. },
  3281. // 刷新方法
  3282. queryMultiLevelStructureTable () {
  3283. queryMultiLevelStructureTable(this.detailData).then(({data}) => {
  3284. if (data.code === 0) {
  3285. this.multiLevelStructureList = data.rows
  3286. }
  3287. })
  3288. },
  3289. // ======== 列表数据操作方法 ========
  3290. // 获取数据列表
  3291. getDataList () {
  3292. //如果是跳转过来的 要判断
  3293. if (localStorage.getItem('bomData')) {
  3294. let data = JSON.parse(localStorage.getItem('bomData'))
  3295. this.searchData.ifsPartNo = data.partNo
  3296. this.searchData.bomType = data.bomType
  3297. this.searchData.engChgLevel = data.engChgLevel
  3298. }
  3299. this.searchData.limit = this.pageSize
  3300. this.searchData.page = this.pageIndex
  3301. this.queryLoading = true
  3302. bomManagementSearch(this.searchData).then(({data}) => {
  3303. if (data.code === 0) {
  3304. this.dataList = data.page.list
  3305. this.pageIndex = data.page.currPage
  3306. this.pageSize = data.page.pageSize
  3307. this.totalPage = data.page.totalCount
  3308. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  3309. if (localStorage.getItem('bomData')) {
  3310. let data = JSON.parse(localStorage.getItem('bomData'))
  3311. if (data.engChgLevel && data.engChgLevel !== '' && data.engChgLevel !== null && isAuth('104002001:update')) {
  3312. this.updateModal(this.dataList[0])
  3313. }
  3314. }
  3315. this.queryLoading = false
  3316. } else {
  3317. this.queryLoading = false
  3318. }
  3319. if (localStorage.getItem('bomData')) {
  3320. this.$nextTick(function () {
  3321. localStorage.removeItem('bomData')
  3322. })
  3323. }
  3324. }).catch(()=>{
  3325. this.queryLoading = false
  3326. })
  3327. this.isFilterSearch = false
  3328. },
  3329. // 复选列表信息
  3330. selectionBom (val) {
  3331. this.bomSelections = val
  3332. this.$refs.selectDiv.setLengthselected(this.bomSelections.length)
  3333. },
  3334. // ======== 新增/编辑模态框 ========
  3335. // bom新增模态框
  3336. addModal () {
  3337. this.modalData = {
  3338. flag: '1',
  3339. title: 'bom新增',
  3340. site: this.$store.state.user.site,
  3341. partNo: '',
  3342. partDesc: '',
  3343. engChgLevel: '',
  3344. bomType: 'Manufacturing',
  3345. noteText: '',
  3346. effPhaseInDate: new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, ''),
  3347. effPhaseOutDate: '',
  3348. engRevision: '',
  3349. typeFlag: 'B',
  3350. netWeight: 0,
  3351. createBy: this.$store.state.user.name,
  3352. printUnit: '',
  3353. printUnitName: '',
  3354. officialFlag: 'N'
  3355. }
  3356. this.detailData = {
  3357. site: this.$store.state.user.site,
  3358. partNo: '',
  3359. engChgLevel: '',
  3360. bomType: '',
  3361. alternativeNo: '',
  3362. alternativeDescription: '',
  3363. minLotQty: '',
  3364. defaultFlag: '',
  3365. detailNoteText: '',
  3366. status: '',
  3367. createDate: '',
  3368. createBy: this.$store.state.user.name,
  3369. updateDate: '',
  3370. updateBy: this.$store.state.user.name,
  3371. officialFlag: 'N'
  3372. }
  3373. this.detailDataList = []
  3374. this.subDetailList = []
  3375. this.byProductList = []
  3376. this.manufStructCostDistribList = []
  3377. this.headerSaveFlag = true
  3378. this.modalDisableFlag = false
  3379. this.modalFlag = true
  3380. },
  3381. // bom编辑模态框
  3382. async updateModal (row) {
  3383. this.modalData = {
  3384. flag: '2',
  3385. site: row.site,
  3386. partNo: row.partNo,
  3387. partDesc: row.partDesc,
  3388. engChgLevel: row.engChgLevel,
  3389. bomType: row.bomType,
  3390. noteText: row.noteText,
  3391. effPhaseInDate: row.effPhaseInDate,
  3392. effPhaseOutDate: row.effPhaseOutDate,
  3393. engRevision: row.engRevision,
  3394. typeFlag: row.typeFlag,
  3395. netWeight: row.netWeight,
  3396. updateBy: this.$store.state.user.name,
  3397. printUnit: row.printUnit,
  3398. printUnitName: row.printUnitName,
  3399. officialFlag: row.officialFlag,
  3400. alternativeNo: row.alternativeNo,
  3401. ifsPartNo: row.ifsPartNo,
  3402. }
  3403. this.subDetailTable = 'bom_sub_detail'
  3404. // 查bom明细
  3405. queryBomDetail(this.modalData).then(({data}) => {
  3406. if (data && data.code === 0) {
  3407. this.detailDataList = data.rows.detailList
  3408. this.subDetailList = data.rows.componentList
  3409. this.detailData = data.rows.detailData
  3410. this.modalDisableFlag = true
  3411. this.modalFlag = true
  3412. } else {
  3413. this.$alert(data.msg, '错误', {
  3414. confirmButtonText: '确定'
  3415. })
  3416. }
  3417. })
  3418. },
  3419. // 详情
  3420. async detailsModal (row) {
  3421. this.modalData = {
  3422. ...row,
  3423. flag: '3',
  3424. updateBy: this.$store.state.user.name,
  3425. }
  3426. this.subDetailTable = 'bom_sub_detail'
  3427. // 查bom明细
  3428. queryBomDetail(this.modalData).then(({data}) => {
  3429. if (data && data.code === 0) {
  3430. this.detailDataList = data.rows.detailList
  3431. this.subDetailList = data.rows.componentList
  3432. this.detailData = data.rows.detailData
  3433. this.modalDisableFlag = true
  3434. this.modalFlag = true
  3435. } else {
  3436. this.$alert(data.msg, '错误', {
  3437. confirmButtonText: '确定'
  3438. })
  3439. }
  3440. })
  3441. },
  3442. // 替代新增模态框
  3443. saveBomDetail () {
  3444. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3445. this.$message.warning('请先选择Bom物料!')
  3446. return
  3447. }
  3448. if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
  3449. this.$message.warning('请先填写Bom版本号!')
  3450. return
  3451. }
  3452. if (this.modalData.bomType === '' || this.modalData.bomType == null) {
  3453. this.$message.warning('请先选择制造类型!')
  3454. return
  3455. }
  3456. this.saveDetailData = {
  3457. flag: '1',
  3458. site: this.$store.state.user.site,
  3459. partNo: this.modalData.partNo,
  3460. engChgLevel: this.modalData.engChgLevel,
  3461. bomType: this.modalData.bomType,
  3462. alternativeNo: '',
  3463. alternativeDescription: '',
  3464. minLotQty: 0,
  3465. defaultFlag: '',
  3466. detailNoteText: '',
  3467. status: 'Tentative',
  3468. createDate: '',
  3469. createBy: this.$store.state.user.name,
  3470. officialFlag: 'N'
  3471. }
  3472. // 查询bom主信息
  3473. queryBomHeader(this.modalData).then(({data}) => {
  3474. if (data && data.code === 0) {
  3475. if (data.rows.length > 0) {
  3476. this.saveDetailModalFlag = true
  3477. this.saveDetailModalDisable = false
  3478. } else {
  3479. this.$message.warning('请先保存BOM主记录!')
  3480. }
  3481. } else {
  3482. this.$alert(data.msg, '提示', {
  3483. confirmButtonText: '确定'
  3484. })
  3485. }
  3486. })
  3487. },
  3488. // 替代编辑模态框
  3489. updateBomDetail () {
  3490. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3491. this.$message.warning('请先选择Bom物料!')
  3492. return
  3493. }
  3494. if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
  3495. this.$message.warning('请先填写Bom版本号!')
  3496. return
  3497. }
  3498. if (this.modalData.bomType === '' || this.modalData.bomType == null) {
  3499. this.$message.warning('请先选择制造类型!')
  3500. return
  3501. }
  3502. this.saveDetailData = {
  3503. flag: '2',
  3504. site: this.detailData.site,
  3505. partNo: this.detailData.partNo,
  3506. engChgLevel: this.detailData.engChgLevel,
  3507. bomType: this.detailData.bomType,
  3508. alternativeNo: this.detailData.alternativeNo,
  3509. alternativeDescription: this.detailData.alternativeDescription,
  3510. minLotQty: this.detailData.minLotQty,
  3511. defaultFlag: '',
  3512. detailNoteText: this.detailData.detailNoteText,
  3513. status: this.detailData.status,
  3514. updateBy: this.$store.state.user.name,
  3515. officialFlag: this.detailData.officialFlag
  3516. }
  3517. // 查询bom主信息
  3518. queryBomHeader(this.modalData).then(({data}) => {
  3519. if (data && data.code === 0) {
  3520. if (data.rows.length > 0) {
  3521. this.saveDetailModalFlag = true
  3522. this.saveDetailModalDisable = true
  3523. } else {
  3524. this.$message.warning('请先保存BOM主记录!')
  3525. }
  3526. } else {
  3527. this.$alert(data.msg, '提示', {
  3528. confirmButtonText: '确定'
  3529. })
  3530. }
  3531. })
  3532. },
  3533. // 子明细新增模态框
  3534. saveComponentModal () {
  3535. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3536. this.$message.warning('请先选择替代!')
  3537. return
  3538. }
  3539. this.componentData = {
  3540. flag: '1',
  3541. site: this.$store.state.user.site,
  3542. partNo: this.modalData.partNo,
  3543. engChgLevel: this.modalData.engChgLevel,
  3544. bomType: this.modalData.bomType,
  3545. alternativeNo: this.detailData.alternativeNo,
  3546. componentPart: '',
  3547. componentPartDesc: '',
  3548. printUnit: '',
  3549. printUnitName: '',
  3550. qtyPerAssembly: 0,
  3551. componentScrap: 0,
  3552. issueType: 'Reserve And Backflush',
  3553. shrinkageFactor: 0,
  3554. lineItemNo: '',
  3555. operationId: '',
  3556. operationNo: '',
  3557. issueToLoc: '',
  3558. issueToLocName: '',
  3559. noteText: '',
  3560. createBy: this.$store.state.user.name,
  3561. lineSequence: '',
  3562. consumptionItem: 'Consumed',
  3563. productFlag: 'component'
  3564. }
  3565. // 获取子料的序号
  3566. getComponentLineSequence(this.componentData).then(({data}) => {
  3567. if (data && data.code === 0) {
  3568. this.componentData.lineSequence = data.lineSequence
  3569. }
  3570. })
  3571. this.componentDisableFlag = false
  3572. this.componentSaveModal = true
  3573. },
  3574. // 副产品新增模态框
  3575. saveByProductModal () {
  3576. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3577. this.$message.warning('请先选择替代!')
  3578. return
  3579. }
  3580. this.componentData = {
  3581. flag: '1',
  3582. site: this.$store.state.user.site,
  3583. partNo: this.modalData.partNo,
  3584. engChgLevel: this.modalData.engChgLevel,
  3585. bomType: this.modalData.bomType,
  3586. alternativeNo: this.detailData.alternativeNo,
  3587. componentPart: '',
  3588. componentPartDesc: '',
  3589. printUnit: '',
  3590. printUnitName: '',
  3591. qtyPerAssembly: 0,
  3592. componentScrap: 0,
  3593. issueType: '',
  3594. shrinkageFactor: 0,
  3595. lineItemNo: '',
  3596. operationId: '',
  3597. operationNo: '',
  3598. issueToLoc: '',
  3599. issueToLocName: '',
  3600. noteText: '',
  3601. createBy: this.$store.state.user.name,
  3602. lineSequence: '',
  3603. consumptionItem: 'Consumed',
  3604. productFlag: 'byProduct'
  3605. }
  3606. // 获取子料的序号
  3607. getComponentLineSequence(this.componentData).then(({data}) => {
  3608. if (data && data.code === 0) {
  3609. this.componentData.lineSequence = data.lineSequence
  3610. }
  3611. })
  3612. this.componentDisableFlag = false
  3613. this.componentSaveModal = true
  3614. },
  3615. // 子明细编辑模态框
  3616. updateComponentModal (row) {
  3617. this.componentData = {
  3618. flag: '2',
  3619. site: row.site,
  3620. partNo: row.partNo,
  3621. engChgLevel: row.engChgLevel,
  3622. bomType: row.bomType,
  3623. alternativeNo: row.alternativeNo,
  3624. componentPart: row.componentPart,
  3625. componentPartDesc: row.componentPartDesc,
  3626. printUnit: row.printUnit,
  3627. printUnitName: row.printUnitName,
  3628. qtyPerAssembly: row.qtyPerAssembly,
  3629. componentScrap: row.componentScrap,
  3630. issueType: row.issueType,
  3631. shrinkageFactor: row.shrinkageFactor,
  3632. lineItemNo: row.lineItemNo,
  3633. operationId: row.operationId,
  3634. operationNo: row.operationNo,
  3635. issueToLoc: row.issueToLoc,
  3636. issueToLocName: row.issueToLocName,
  3637. noteText: row.noteText,
  3638. updateBy: this.$store.state.user.name,
  3639. lineSequence: row.lineSequence,
  3640. consumptionItem: row.consumptionItem,
  3641. productFlag: 'component'
  3642. }
  3643. this.componentDisableFlag = true
  3644. this.componentSaveModal = true
  3645. },
  3646. // 子明细复制模态框
  3647. copyComponentModal (row) {
  3648. this.componentData = {
  3649. flag: '3',
  3650. site: row.site,
  3651. partNo: row.partNo,
  3652. engChgLevel: row.engChgLevel,
  3653. bomType: row.bomType,
  3654. alternativeNo: row.alternativeNo,
  3655. componentPart: row.componentPart,
  3656. componentPartDesc: row.componentPartDesc,
  3657. printUnit: row.printUnit,
  3658. printUnitName: row.printUnitName,
  3659. qtyPerAssembly: row.qtyPerAssembly,
  3660. componentScrap: row.componentScrap,
  3661. issueType: row.issueType,
  3662. shrinkageFactor: row.shrinkageFactor,
  3663. lineItemNo: row.lineItemNo,
  3664. operationId: row.operationId,
  3665. operationNo: row.operationNo,
  3666. issueToLoc: row.issueToLoc,
  3667. issueToLocName: row.issueToLocName,
  3668. noteText: row.noteText,
  3669. updateBy: this.$store.state.user.name,
  3670. lineSequence: row.lineSequence,
  3671. consumptionItem: row.consumptionItem,
  3672. productFlag: 'component'
  3673. }
  3674. // 获取子料的序号
  3675. getComponentLineSequence(this.componentData).then(({data}) => {
  3676. if (data && data.code === 0) {
  3677. this.componentData.lineSequence = data.lineSequence
  3678. }
  3679. })
  3680. this.componentDisableFlag = false
  3681. this.componentSaveModal = true
  3682. },
  3683. // 副产品编辑模态框
  3684. updateByProductModal (row) {
  3685. this.componentData = {
  3686. flag: '2',
  3687. site: row.site,
  3688. partNo: row.partNo,
  3689. engChgLevel: row.engChgLevel,
  3690. bomType: row.bomType,
  3691. alternativeNo: row.alternativeNo,
  3692. componentPart: row.componentPart,
  3693. componentPartDesc: row.componentPartDesc,
  3694. printUnit: row.printUnit,
  3695. printUnitName: row.printUnitName,
  3696. qtyPerAssembly: row.qtyPerAssembly,
  3697. componentScrap: row.componentScrap,
  3698. issueType: row.issueType,
  3699. shrinkageFactor: row.shrinkageFactor,
  3700. lineItemNo: row.lineItemNo,
  3701. operationId: row.operationId,
  3702. operationNo: row.operationNo,
  3703. issueToLoc: row.issueToLoc,
  3704. issueToLocName: row.issueToLocName,
  3705. noteText: row.noteText,
  3706. updateBy: this.$store.state.user.name,
  3707. lineSequence: row.lineSequence,
  3708. consumptionItem: row.consumptionItem,
  3709. productFlag: 'byProduct'
  3710. }
  3711. this.componentDisableFlag = true
  3712. this.componentSaveModal = true
  3713. },
  3714. // 副产品成本分配编辑模态框
  3715. updateManufStructCostDistribModal (row) {
  3716. this.manufStructCostDistribData = {
  3717. site: row.site,
  3718. partNo: row.partNo,
  3719. engChgLevel: row.engChgLevel,
  3720. bomType: row.bomType,
  3721. alternativeNo: row.alternativeNo,
  3722. byProdLineItemNo: row.byProdLineItemNo,
  3723. componentLineItemNo: row.componentLineItemNo,
  3724. componentPartNo: row.componentPartNo,
  3725. componentPartDesc: row.componentPartDesc,
  3726. byProdPartNo: row.byProdPartNo,
  3727. byProdPartDesc: row.byProdPartDesc,
  3728. itemCostDistribution: row.itemCostDistribution,
  3729. updateBy: this.$store.state.user.name,
  3730. }
  3731. this.manufStructCostDistribModal = true
  3732. },
  3733. // ======== 新增/编辑/删除方法 ========
  3734. // bom新增/编辑
  3735. saveData () {
  3736. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3737. this.$message.warning('请选择物料编码!')
  3738. return
  3739. }
  3740. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3741. this.$message.warning('请选择物料名称!')
  3742. return
  3743. }
  3744. if (this.modalData.bomType === '' || this.modalData.bomType == null) {
  3745. this.$message.warning('请选择制造类型!')
  3746. return
  3747. }
  3748. if (this.modalData.effPhaseInDate === '' || this.modalData.effPhaseInDate == null) {
  3749. this.$message.warning('请选择生效日期!')
  3750. return
  3751. }
  3752. if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
  3753. this.$message.warning('请填写BOM版本号!')
  3754. return
  3755. }
  3756. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  3757. this.$message.warning('请选择替代!')
  3758. return
  3759. }
  3760. if (this.detailData.status === '' || this.detailData.status == null) {
  3761. this.$message.warning('请选择替代状态!')
  3762. return
  3763. }
  3764. let tempData = {
  3765. site: this.$store.state.user.site,
  3766. partNo: this.modalData.partNo,
  3767. partDesc: this.modalData.partDesc,
  3768. engChgLevel: this.modalData.engChgLevel,
  3769. bomType: this.modalData.bomType,
  3770. noteText: this.modalData.noteText,
  3771. effPhaseInDate: this.modalData.effPhaseInDate,
  3772. effPhaseOutDate: this.modalData.effPhaseOutDate,
  3773. engRevision: this.modalData.engRevision,
  3774. typeFlag: this.modalData.typeFlag,
  3775. netWeight: this.modalData.netWeight,
  3776. officialFlag: this.modalData.officialFlag,
  3777. alternativeNo: this.detailData.alternativeNo,
  3778. alternativeDescription: this.detailData.alternativeDescription,
  3779. minLotQty: this.detailData.minLotQty,
  3780. defaultFlag: this.detailData.defaultFlag,
  3781. detailNoteText: this.detailData.detailNoteText,
  3782. status: this.detailData.status,
  3783. createBy: this.$store.state.user.name,
  3784. updateBy: this.$store.state.user.name,
  3785. informationList: this.subDetailList,
  3786. productGroupId4: this.modalData.productGroupId4
  3787. }
  3788. if (this.modalData.flag === '1') {
  3789. this.saveAllLoading = true
  3790. bomManagementSave(tempData).then(({data}) => {
  3791. if (data && data.code === 0) {
  3792. this.getDataList()
  3793. this.modalFlag = false
  3794. this.$message({
  3795. message: '操作成功',
  3796. type: 'success',
  3797. duration: 1500,
  3798. onClose: () => {}
  3799. })
  3800. } else {
  3801. this.$alert(data.msg, '错误', {
  3802. confirmButtonText: '确定'
  3803. })
  3804. }
  3805. this.saveAllLoading = false
  3806. })
  3807. } else {
  3808. this.saveAllLoading = true
  3809. bomManagementEdit(tempData).then(({data}) => {
  3810. if (data && data.code === 0) {
  3811. this.getDataList()
  3812. this.modalFlag = false
  3813. this.$message({
  3814. message: '操作成功',
  3815. type: 'success',
  3816. duration: 1500,
  3817. onClose: () => {}
  3818. })
  3819. } else {
  3820. this.$alert(data.msg, '错误', {
  3821. confirmButtonText: '确定'
  3822. })
  3823. }
  3824. this.saveAllLoading = false
  3825. })
  3826. }
  3827. },
  3828. // 新增编辑模态框关闭
  3829. closeModal () {
  3830. this.modalFlag = false
  3831. },
  3832. // 新增编辑模态框关闭
  3833. closeModalX (done) {
  3834. done()
  3835. },
  3836. // bom删除
  3837. delModal () {
  3838. if (this.bomSelections.length === 0) {
  3839. this.$message.warning('请勾选要删除的BOM!')
  3840. return
  3841. }
  3842. this.$confirm(`是否删除这 `+ this.bomSelections.length +` 条BOM?`, '提示', {
  3843. confirmButtonText: '确定',
  3844. cancelButtonText: '取消',
  3845. type: 'warning'
  3846. }).then(() => {
  3847. let tempData = {
  3848. informationList: this.bomSelections
  3849. }
  3850. bomManagementDelete(tempData).then(({data}) => {
  3851. if (data && data.code === 0) {
  3852. this.getDataList()
  3853. this.bomSelections = []
  3854. this.$message({
  3855. message: '操作成功',
  3856. type: 'success',
  3857. duration: 1500,
  3858. onClose: () => {}
  3859. })
  3860. } else {
  3861. this.$alert(data.msg, '错误', {
  3862. confirmButtonText: '确定'
  3863. })
  3864. }
  3865. })
  3866. })
  3867. },
  3868. // 查询物料
  3869. queryPartList () {
  3870. this.partData.productGroupId4 = ''
  3871. this.partData.limit = this.pageSize2
  3872. this.partData.page = this.pageIndex2
  3873. queryPartListBom(this.partData).then(({data}) => {
  3874. if (data && data.code === 0) {
  3875. this.partList = data.page.list
  3876. this.pageIndex2 = data.page.currPage
  3877. this.pageSize2 = data.page.pageSize
  3878. this.totalPage2 = data.page.totalCount
  3879. this.partModelFlag = true
  3880. } else {
  3881. this.$alert(data.msg, '错误', {
  3882. confirmButtonText: '确定'
  3883. })
  3884. }
  3885. })
  3886. },
  3887. // 物料编码失焦事件
  3888. partNoBlur () {
  3889. this.partData.limit = this.pageSize2
  3890. this.partData.page = this.pageIndex2
  3891. this.partData.ifsPartNo = this.modalData.partNo
  3892. queryPartList(this.partData).then(({data}) => {
  3893. if (data && data.code === 0) {
  3894. if (data.page.list.length === 1) {
  3895. this.modalData.partDesc = data.page.list[0].partDesc
  3896. this.modalData.printUnit = data.page.list[0].printUnit
  3897. this.modalData.printUnitName = data.page[0].printUnitName
  3898. }
  3899. }
  3900. })
  3901. },
  3902. // 双击选中物料
  3903. getRowData (row) {
  3904. this.modalData.partNo = row.partNo
  3905. this.modalData.partDesc = row.partDesc
  3906. this.modalData.printUnit = row.printUnit
  3907. this.modalData.printUnitName = row.printUnitName
  3908. this.partModelFlag = false
  3909. },
  3910. // bom类型改变
  3911. bomTypeChange () {
  3912. // 获取物料的bom版本号
  3913. getBomEngChgLevel(this.modalData).then(({data}) => {
  3914. if (data && data.code === 0) {
  3915. this.modalData.engChgLevel = data.engChgLevel
  3916. } else {
  3917. this.$alert(data.msg, '错误', {
  3918. confirmButtonText: '确定'
  3919. })
  3920. }
  3921. })
  3922. },
  3923. // 双击选中工序
  3924. getRowOperationData (row) {
  3925. this.componentData.operationId = row.operationId
  3926. this.componentData.operationNo = row.operationNo
  3927. this.operationModelFlag = false
  3928. },
  3929. // 双击选中子物料
  3930. getComponentRowData (row) {
  3931. this.componentData.componentPart = row.partNo
  3932. this.componentData.componentPartDesc = row.partDesc
  3933. this.componentData.printUnit = row.printUnit
  3934. this.componentData.printUnitName = row.printUnitName
  3935. this.componentPartModelFlag = false
  3936. },
  3937. // 双击选择copy物料
  3938. getCopyRowData (row) {
  3939. if (this.copyPartData.type === '1') {
  3940. this.copyBomData.partNo = row.partNo
  3941. this.copyBomData.partDesc = row.partDesc
  3942. this.copyBomTypeChange()
  3943. } else {
  3944. this.copyAlternativeData.partNo = row.partNo
  3945. this.copyAlternativeData.partDesc = row.partDesc
  3946. }
  3947. this.copyPartModelFlag = false
  3948. },
  3949. // 子物料列表
  3950. queryComponentPartModal () {
  3951. this.componentPartData.productGroupId4 = ''
  3952. this.componentPartData.limit = this.pageSize3
  3953. this.componentPartData.page = this.pageIndex3
  3954. this.componentPartData.status = 'Y'
  3955. // 查询所有物料
  3956. queryPartListAll(this.componentPartData).then(({data}) => {
  3957. if (data && data.code === 0) {
  3958. this.componentPartList = data.page.list
  3959. this.pageIndex3 = data.page.currPage
  3960. this.pageSize3 = data.page.pageSize
  3961. this.totalPage3 = data.page.totalCount
  3962. if (data.page.list.length > 0){
  3963. this.componentPartCurrentRow = JSON.parse(JSON.stringify(this.componentPartList[0]))
  3964. if (this.componentPartCurrentRow.ifHasPeifang==='Y'){
  3965. this.queryComponentPartRecipeList()
  3966. }
  3967. if (this.componentPartCurrentRow.ifHasBom==='Y'){
  3968. this.queryComponentPartBomList()
  3969. }
  3970. }
  3971. this.componentPartModelFlag = true
  3972. } else {
  3973. this.$alert(data.msg, '错误', {
  3974. confirmButtonText: '确定'
  3975. })
  3976. }
  3977. })
  3978. },
  3979. // 刷新页签的table数据
  3980. tabClick () {
  3981. // if (this.componentTable === 'component_part_bom') {
  3982. // this.queryComponentPartBomList()
  3983. // }
  3984. },
  3985. // 子物料Bom列表
  3986. queryComponentPartBomList () {
  3987. let tempData = {
  3988. site: this.$store.state.user.site,
  3989. partNo: this.componentPartCurrentRow.partNo,
  3990. }
  3991. queryComponentPartBomList(tempData).then(({data}) => {
  3992. if (data && data.code === 0) {
  3993. this.componentPartBomList = data.rows
  3994. } else {
  3995. this.componentPartBomList = []
  3996. }
  3997. })
  3998. },
  3999. queryComponentPartRecipeList () {
  4000. let tempData = {
  4001. site: this.$store.state.user.site,
  4002. partNo: this.componentPartCurrentRow.partNo,
  4003. }
  4004. queryComponentPartRecipeList(tempData).then(({data}) => {
  4005. if (data && data.code === 0) {
  4006. this.componentPartRecipeList = data.rows
  4007. } else {
  4008. this.componentPartRecipeList = []
  4009. }
  4010. })
  4011. },
  4012. rowStyle ({row}) {
  4013. if (this.componentPartCurrentRow.partNo === row.partNo) {
  4014. return { 'background-color': '#E8F7F6', cursor: 'pointer' }
  4015. }
  4016. },
  4017. // 单机选中物料信息
  4018. componentPartClickRow (row, column) {
  4019. this.componentPartCurrentRow = JSON.parse(JSON.stringify(row))
  4020. if (this.componentPartCurrentRow.ifHasPeifang==='Y'){
  4021. this.queryComponentPartRecipeList()
  4022. }
  4023. if (this.componentPartCurrentRow.ifHasBom==='Y'){
  4024. this.queryComponentPartBomList()
  4025. }
  4026. },
  4027. // 当前值发生变化的时候修改
  4028. changeCurrentRow (row, oldRow) {
  4029. // 判断是否是获取焦点的事件
  4030. if (row) {
  4031. this.componentPartCurrentRow = JSON.parse(JSON.stringify(row))
  4032. this.tabClick()
  4033. }
  4034. },
  4035. // copy物料列表
  4036. queryCopyPartModal () {
  4037. this.copyPartData.limit = this.pageSize4
  4038. this.copyPartData.page = this.pageIndex4
  4039. // 查询所有物料
  4040. queryPartList(this.copyPartData).then(({data}) => {
  4041. if (data && data.code === 0) {
  4042. this.copyPartList = data.page.list
  4043. this.pageIndex4 = data.page.currPage
  4044. this.pageSize4 = data.page.pageSize
  4045. this.totalPage4 = data.page.totalCount
  4046. this.copyPartModelFlag = true
  4047. } else {
  4048. this.$alert(data.msg, '错误', {
  4049. confirmButtonText: '确定'
  4050. })
  4051. }
  4052. })
  4053. },
  4054. // 物料列表
  4055. queryComponentPartList () {
  4056. this.componentPartData.limit = this.pageSize3
  4057. this.componentPartData.page = this.pageIndex3
  4058. // 查询所有物料
  4059. queryPartListAll(this.componentPartData).then(({data}) => {
  4060. if (data && data.code === 0) {
  4061. this.componentPartList = data.page.list
  4062. this.pageIndex3 = data.page.currPage
  4063. this.pageSize3 = data.page.pageSize
  4064. this.totalPage3 = data.page.totalCount
  4065. if (data.page.list.length > 0){
  4066. this.componentPartCurrentRow = JSON.parse(JSON.stringify(this.componentPartList[0]))
  4067. if (this.componentPartCurrentRow.ifHasPeifang==='Y'){
  4068. this.queryComponentPartRecipeList()
  4069. }
  4070. if (this.componentPartCurrentRow.ifHasBom==='Y'){
  4071. this.queryComponentPartBomList()
  4072. }
  4073. }
  4074. } else {
  4075. this.componentPartList = []
  4076. }
  4077. })
  4078. },
  4079. // copy物料查询列表
  4080. queryCopyPartList () {
  4081. this.copyPartData.limit = this.pageSize4
  4082. this.copyPartData.page = this.pageIndex4
  4083. // 查询所有物料
  4084. queryPartList(this.copyPartData).then(({data}) => {
  4085. if (data && data.code === 0) {
  4086. this.copyPartList = data.page.list
  4087. this.pageIndex4 = data.page.currPage
  4088. this.pageSize4 = data.page.pageSize
  4089. this.totalPage4 = data.page.totalCount
  4090. } else {
  4091. this.copyPartList = []
  4092. }
  4093. })
  4094. },
  4095. // 子物料编码失焦事件
  4096. componentPartBlur () {
  4097. if (this.componentData.componentPart != null && this.componentData.componentPart !== '') {
  4098. this.componentPartData.limit = this.pageSize3
  4099. this.componentPartData.page = this.pageIndex3
  4100. this.componentPartData.ifsPartNo = this.componentData.componentPart
  4101. queryPartListAll(this.componentPartData).then(({data}) => {
  4102. if (data && data.code === 0) {
  4103. if (data.page.list.length === 1) {
  4104. this.componentData.componentPartDesc = data.page.list[0].partDesc
  4105. this.componentData.printUnit = data.page.list[0].printUnit
  4106. this.componentData.printUnitName = data.page.list[0].printUnitName
  4107. return
  4108. }
  4109. }
  4110. })
  4111. }
  4112. this.componentData.componentPartDesc = ''
  4113. this.componentData.printUnit = ''
  4114. this.componentData.printUnitName = ''
  4115. },
  4116. // copy物料编码失焦事件
  4117. copyPartBlur () {
  4118. if (this.copyPartData.type === '1') {
  4119. if (this.copyBomData.partNo != null && this.copyBomData.partNo !== '') {
  4120. this.copyPartData.limit = this.pageSize4
  4121. this.copyPartData.page = this.pageIndex4
  4122. this.copyPartData.partNo = this.copyBomData.partNo
  4123. queryPartList(this.copyPartData).then(({data}) => {
  4124. if (data && data.code === 0) {
  4125. if (data.page.list.length === 1) {
  4126. this.copyBomData.partDesc = data.page.list[0].partDesc
  4127. return
  4128. }
  4129. }
  4130. })
  4131. }
  4132. this.copyBomData.partDesc = ''
  4133. } else {
  4134. if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
  4135. this.copyPartData.limit = this.pageSize4
  4136. this.copyPartData.page = this.pageIndex4
  4137. this.copyPartData.partNo = this.copyAlternativeData.partNo
  4138. queryPartList(this.copyPartData).then(({data}) => {
  4139. if (data && data.code === 0) {
  4140. if (data.page.list.length === 1) {
  4141. this.copyAlternativeData.partDesc = data.page.list[0].partDesc
  4142. return
  4143. }
  4144. }
  4145. })
  4146. }
  4147. this.copyAlternativeData.partDesc = ''
  4148. }
  4149. },
  4150. // copy BOM类型改变
  4151. copyBomTypeChange () {
  4152. // 获取物料的bom版本号
  4153. getBomEngChgLevel(this.copyBomData).then(({data}) => {
  4154. if (data && data.code === 0) {
  4155. this.copyBomData.engChgLevel = data.engChgLevel
  4156. } else {
  4157. this.copyBomData.engChgLevel = ''
  4158. }
  4159. })
  4160. },
  4161. // 表格的新增
  4162. rowClassName({ row, rowIndex }) {
  4163. row.xh = rowIndex + 1
  4164. },
  4165. // 选中数据
  4166. componentSelectionChange(selection) {
  4167. this.checkedDetail = selection
  4168. },
  4169. byProductSelection (selection) {
  4170. this.checkedByProduct = selection
  4171. },
  4172. // 删除子物料
  4173. deleteComponentPart () {
  4174. // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  4175. // this.$message.warning('不可编辑的替代状态!')
  4176. // return
  4177. // }
  4178. if (this.checkedDetail.length === 0) {
  4179. this.$message.warning('请选择要删除子物料!')
  4180. return
  4181. } else {
  4182. this.$confirm("请是否确认删除该子明细记录?", "提示", {
  4183. confirmButtonText: "确定",
  4184. cancelButtonText: "取消",
  4185. type: "warning"
  4186. }).then(() => {
  4187. let tempData = {
  4188. informationList: this.checkedDetail,
  4189. productFlag: 'component',
  4190. updateBy: this.$store.state.user.name,
  4191. }
  4192. deleteBomComponent(tempData).then(({data}) => {
  4193. if (data && data.code === 0) {
  4194. this.subDetailList = data.rows.subDetailList
  4195. this.byProductList = data.rows.byProductList
  4196. this.manufStructCostDistribList = data.rows.manufStructCostDistribList
  4197. this.$message({
  4198. message: '操作成功',
  4199. type: 'success',
  4200. duration: 1500,
  4201. onClose: () => {}
  4202. })
  4203. } else {
  4204. this.$alert(data.msg, '错误', {
  4205. confirmButtonText: '确定'
  4206. })
  4207. }
  4208. })
  4209. })
  4210. }
  4211. },
  4212. // 删除子物料
  4213. deleteByProduct () {
  4214. // if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') {
  4215. // this.$message.warning('不可编辑的替代状态!')
  4216. // return
  4217. // }
  4218. if (this.checkedByProduct.length === 0) {
  4219. this.$message.warning('请选择要删除副产品!')
  4220. return
  4221. } else {
  4222. this.$confirm("请是否确认删除该副产品记录?", "提示", {
  4223. confirmButtonText: "确定",
  4224. cancelButtonText: "取消",
  4225. type: "warning"
  4226. }).then(() => {
  4227. let tempData = {
  4228. informationList: this.checkedByProduct,
  4229. productFlag: 'byProduct',
  4230. updateBy: this.$store.state.user.name,
  4231. }
  4232. deleteBomComponent(tempData).then(({data}) => {
  4233. if (data && data.code === 0) {
  4234. this.subDetailList = data.rows.subDetailList
  4235. this.byProductList = data.rows.byProductList
  4236. this.manufStructCostDistribList = data.rows.manufStructCostDistribList
  4237. this.$message({
  4238. message: '操作成功',
  4239. type: 'success',
  4240. duration: 1500,
  4241. onClose: () => {}
  4242. })
  4243. } else {
  4244. this.$alert(data.msg, '错误', {
  4245. confirmButtonText: '确定'
  4246. })
  4247. }
  4248. })
  4249. })
  4250. }
  4251. },
  4252. componentClickRow (row) {
  4253. this.$refs.componentTable.toggleRowSelection(row)
  4254. },
  4255. byProductClickRow (row) {
  4256. this.$refs.byProductTable.toggleRowSelection(row)
  4257. },
  4258. // 新增子明细方法
  4259. componentDataSave (isClose) {
  4260. if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) {
  4261. this.$message.warning('序号不能为空!')
  4262. return
  4263. }
  4264. if (this.componentData.partNo === '' || this.componentData.partNo == null) {
  4265. this.$message.warning('请选择主记录物料编码!')
  4266. return
  4267. }
  4268. if (this.componentData.bomType === '' || this.componentData.bomType == null) {
  4269. this.$message.warning('请选择主记录制造类型!')
  4270. return
  4271. }
  4272. if (this.componentData.engChgLevel === '' || this.componentData.engChgLevel == null) {
  4273. this.$message.warning('请填写主记录BOM版本号!')
  4274. return
  4275. }
  4276. if (this.componentData.componentPart === '' || this.componentData.componentPart == null) {
  4277. this.$message.warning('请选择子物料编码!')
  4278. return
  4279. }
  4280. if (this.componentData.productFlag === 'component' && (this.componentData.consumptionItem === '' || this.componentData.consumptionItem == null)) {
  4281. this.$message.warning('请选择消耗项目!')
  4282. return
  4283. }
  4284. if (this.componentData.qtyPerAssembly === '' || this.componentData.qtyPerAssembly == null) {
  4285. this.$message.warning('请填写单位用量!')
  4286. return
  4287. }
  4288. if (this.componentData.qtyPerAssembly === 0) {
  4289. this.$message.warning('单位用量不能为0!')
  4290. return
  4291. }
  4292. if (this.componentData.componentScrap === '' || this.componentData.componentScrap == null) {
  4293. this.$message.warning('请填写调机量!')
  4294. return
  4295. }
  4296. if (this.componentData.shrinkageFactor === '' || this.componentData.shrinkageFactor == null) {
  4297. this.$message.warning('请填写损耗率!')
  4298. return
  4299. }
  4300. if (this.componentData.productFlag === 'component' && (this.componentData.issueType === '' || this.componentData.issueType == null)) {
  4301. this.$message.warning('请选择生产属性!')
  4302. return
  4303. }
  4304. this.saveComponentLoading = true
  4305. if (this.componentData.flag === '1') {
  4306. saveBomComponent(this.componentData).then(({data}) => {
  4307. if (data && data.code === 0) {
  4308. this.subDetailList = data.rows.subDetailList
  4309. this.byProductList = data.rows.byProductList
  4310. this.manufStructCostDistribList = data.rows.manufStructCostDistribList
  4311. if (isClose) {
  4312. if (this.subDetailTable === 'by_products') {
  4313. this.saveByProductModal()
  4314. } else {
  4315. this.saveComponentModal()
  4316. }
  4317. } else {
  4318. this.componentSaveModal = false
  4319. }
  4320. this.saveComponentLoading = false
  4321. this.$message({
  4322. message: '操作成功',
  4323. type: 'success',
  4324. duration: 1500,
  4325. onClose: () => {}
  4326. })
  4327. } else {
  4328. this.saveComponentLoading = false
  4329. this.$alert(data.msg, '错误', {
  4330. confirmButtonText: '确定'
  4331. })
  4332. }
  4333. }).catch(()=>{
  4334. this.saveComponentLoading = false
  4335. })
  4336. } else if (this.componentData.flag === '2') {
  4337. updateBomComponent(this.componentData).then(({data}) => {
  4338. if (data && data.code === 0) {
  4339. this.subDetailList = data.rows.subDetailList
  4340. this.byProductList = data.rows.byProductList
  4341. this.componentSaveModal = false
  4342. this.saveComponentLoading = false
  4343. this.$message({
  4344. message: '操作成功',
  4345. type: 'success',
  4346. duration: 1500,
  4347. onClose: () => {}
  4348. })
  4349. } else {
  4350. this.saveComponentLoading = false
  4351. this.$alert(data.msg, '错误', {
  4352. confirmButtonText: '确定'
  4353. })
  4354. }
  4355. }).catch(()=>{
  4356. this.saveComponentLoading = false
  4357. })
  4358. }
  4359. },
  4360. // 编辑副产品成本分配方法
  4361. manufStructCostDistribUpdate () {
  4362. if (this.manufStructCostDistribData.itemCostDistribution < 0 || this.manufStructCostDistribData.itemCostDistribution > 1) {
  4363. this.$message.warning('项目成本分配系数必须介于0和1之间!')
  4364. return
  4365. }
  4366. updateManufStructCostDistrib(this.manufStructCostDistribData).then(({data}) => {
  4367. if (data && data.code === 0) {
  4368. this.manufStructCostDistribList = data.rows.manufStructCostDistribList
  4369. this.manufStructCostDistribModal = false
  4370. this.$message({
  4371. message: '操作成功',
  4372. type: 'success',
  4373. duration: 1500,
  4374. onClose: () => {}
  4375. })
  4376. } else {
  4377. this.$alert(data.msg, '错误', {
  4378. confirmButtonText: '确定'
  4379. })
  4380. }
  4381. })
  4382. },
  4383. // 回车事件
  4384. focusNextInput (index, type) {
  4385. let aaa = ''
  4386. if (this.subDetailList.length - 1 === index) {
  4387. aaa = `${type}0`
  4388. } else {
  4389. aaa = `${type}${index + 1}`
  4390. }
  4391. this.$nextTick(() => {
  4392. this.$refs[aaa].focus()
  4393. })
  4394. },
  4395. // 保存主表信息
  4396. saveBomHeader () {
  4397. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  4398. this.$message.warning('请先选择Bom物料!')
  4399. return
  4400. }
  4401. if (this.modalData.engChgLevel === '' || this.modalData.engChgLevel == null) {
  4402. this.$message.warning('请先填写Bom版本号!')
  4403. return
  4404. }
  4405. if (this.modalData.bomType === '' || this.modalData.bomType == null) {
  4406. this.$message.warning('请先选择制造类型!')
  4407. return
  4408. }
  4409. if (this.modalData.typeFlag === '' || this.modalData.typeFlag == null) {
  4410. this.$message.warning('请先选择类型!')
  4411. return
  4412. }
  4413. this.saveHeaderLoading = true
  4414. // 新增主表信息
  4415. saveBomHeader(this.modalData).then(({data}) => {
  4416. if (data && data.code === 0) {
  4417. this.modalData = {
  4418. flag: '1',
  4419. title: 'bom新增',
  4420. site: data.rows.modalData.site,
  4421. partNo: data.rows.modalData.partNo,
  4422. partDesc: data.rows.modalData.partDesc,
  4423. engChgLevel: data.rows.modalData.engChgLevel,
  4424. bomType: data.rows.modalData.bomType,
  4425. noteText: data.rows.modalData.noteText,
  4426. effPhaseInDate: data.rows.modalData.effPhaseInDate,
  4427. effPhaseOutDate: data.rows.modalData.effPhaseOutDate,
  4428. engRevision: data.rows.modalData.engRevision,
  4429. typeFlag: data.rows.modalData.typeFlag,
  4430. netWeight: data.rows.modalData.netWeight,
  4431. officialFlag: data.rows.modalData.officialFlag,
  4432. }
  4433. this.detailDataList = data.rows.detailDataList
  4434. this.detailData = data.rows.detailData
  4435. this.subDetailList = []
  4436. this.modalDisableFlag = true
  4437. this.headerSaveFlag = false
  4438. this.$message({
  4439. message: '操作成功',
  4440. type: 'success',
  4441. duration: 1500,
  4442. onClose: () => {}
  4443. })
  4444. } else {
  4445. this.$alert(data.msg, '错误', {
  4446. confirmButtonText: '确定'
  4447. })
  4448. }
  4449. this.saveHeaderLoading = false
  4450. })
  4451. },
  4452. // 复制bom的模态框
  4453. copyBomRevision () {
  4454. this.copyBomData = {
  4455. site: this.modalData.site,
  4456. partNo: this.modalData.partNo,
  4457. partDesc: this.modalData.partDesc,
  4458. engChgLevel: '',
  4459. bomType: this.modalData.bomType,
  4460. effPhaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
  4461. effPhaseOutDate: '',
  4462. previousVersion: {},
  4463. createBy: this.$store.state.user.name,
  4464. officialFlag: 'N'
  4465. }
  4466. // 获取物料的bom版本号
  4467. getBomEngChgLevel(this.copyBomData).then(({data}) => {
  4468. if (data && data.code === 0) {
  4469. this.copyBomData.engChgLevel = data.engChgLevel
  4470. }
  4471. })
  4472. this.copyPartData = {
  4473. type: '1',
  4474. site: this.$store.state.user.site,
  4475. partNo: '',
  4476. plmPartNo: '',
  4477. ifsPartNo: '',
  4478. partDesc: '',
  4479. page: 1,
  4480. limit: 10
  4481. }
  4482. this.copyBomModelFlag = true
  4483. },
  4484. // 复制bom的方法
  4485. copyBom () {
  4486. if (this.copyBomData.partNo === '' || this.copyBomData.partNo == null) {
  4487. this.$message.warning('请选择Bom物料!')
  4488. return
  4489. }
  4490. if (this.copyBomData.engChgLevel === '' || this.copyBomData.engChgLevel == null) {
  4491. this.$message.warning('请填写Bom版本号!')
  4492. return
  4493. }
  4494. if (this.copyBomData.bomType === '' || this.copyBomData.bomType == null) {
  4495. this.$message.warning('请选择制造类型!')
  4496. return
  4497. }
  4498. if (this.copyBomData.effPhaseOutDate != null && this.copyBomData.effPhaseOutDate !== '' && this.copyBomData.effPhaseOutDate < this.copyBomData.effPhaseInDate) {
  4499. this.$message.warning('失效日期必须大于生效日期!')
  4500. return
  4501. }
  4502. this.copyBomData.previousVersion = this.modalData
  4503. this.copyLoading = true
  4504. // 新增主表信息
  4505. copyBom(this.copyBomData).then(({data}) => {
  4506. if (data && data.code === 0) {
  4507. this.copyBomModelFlag = false
  4508. this.updateModal(data.rows)
  4509. this.$message({
  4510. message: '操作成功',
  4511. type: 'success',
  4512. duration: 1500,
  4513. onClose: () => {}
  4514. })
  4515. } else {
  4516. this.$alert(data.msg, '错误', {
  4517. confirmButtonText: '确定'
  4518. })
  4519. }
  4520. this.copyLoading = false
  4521. }).catch(()=>{
  4522. this.copyLoading = false
  4523. })
  4524. },
  4525. // 复制alternative的模态框
  4526. copyBomAlternative () {
  4527. this.copyAlternativeData = {
  4528. site: this.detailData.site,
  4529. partNo: this.detailData.partNo,
  4530. partDesc: this.modalData.partDesc,
  4531. engChgLevel: this.detailData.engChgLevel,
  4532. bomType: this.detailData.bomType,
  4533. alternativeNo: this.detailData.alternativeNo,
  4534. alternativeDescription: this.detailData.alternativeDescription,
  4535. minLotQty: this.detailData.minLotQty,
  4536. defaultFlag: this.detailData.defaultFlag,
  4537. detailNoteText: this.detailData.detailNoteText,
  4538. status: 'Tentative',
  4539. officialFlag: 'N',
  4540. previousVersion: {},
  4541. createBy: this.$store.state.user.name
  4542. }
  4543. this.copyPartData = {
  4544. type: '2',
  4545. site: this.$store.state.user.site,
  4546. partNo: '',
  4547. plmPartNo: '',
  4548. ifsPartNo: '',
  4549. partDesc: '',
  4550. page: 1,
  4551. limit: 10
  4552. }
  4553. this.copyAlternativeModelFlag = true
  4554. },
  4555. // 复制alternative的方法
  4556. copyAlternative () {
  4557. if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) {
  4558. this.$message.warning('请选择Bom物料!')
  4559. return
  4560. }
  4561. if (this.copyAlternativeData.engChgLevel === '' || this.copyAlternativeData.engChgLevel == null) {
  4562. this.$message.warning('请填写Bom版本号!')
  4563. return
  4564. }
  4565. if (this.copyAlternativeData.bomType === '' || this.copyAlternativeData.bomType == null) {
  4566. this.$message.warning('请选择制造类型!')
  4567. return
  4568. }
  4569. if (this.copyAlternativeData.alternativeNo === '' || this.copyAlternativeData.alternativeNo == null) {
  4570. this.$message.warning('请填写替代编码!')
  4571. return
  4572. }
  4573. // if (this.copyAlternativeData.alternativeDescription === '' || this.copyAlternativeData.alternativeDescription == null) {
  4574. // this.$message.warning('请填写替代名称!')
  4575. // return
  4576. // }
  4577. this.copyAlternativeData.previousVersion = this.detailData
  4578. this.copyLoading = true
  4579. copyAlternative(this.copyAlternativeData).then(({data}) => {
  4580. if (data && data.code === 0) {
  4581. this.copyAlternativeModelFlag = false
  4582. this.updateModal(data.rows)
  4583. this.$message({
  4584. message: '操作成功',
  4585. type: 'success',
  4586. duration: 1500,
  4587. onClose: () => {}
  4588. })
  4589. } else {
  4590. this.$alert(data.msg, '错误', {
  4591. confirmButtonText: '确定'
  4592. })
  4593. }
  4594. this.copyLoading = false
  4595. }).catch(()=>{
  4596. this.copyLoading = false
  4597. })
  4598. },
  4599. // 新增替代方法
  4600. detailDataSave () {
  4601. if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) {
  4602. this.$message.warning('请先选择Bom物料!')
  4603. return
  4604. }
  4605. if (this.saveDetailData.engChgLevel === '' || this.saveDetailData.engChgLevel == null) {
  4606. this.$message.warning('请先填写Bom版本号!')
  4607. return
  4608. }
  4609. if (this.saveDetailData.bomType === '' || this.saveDetailData.bomType == null) {
  4610. this.$message.warning('请先选择制造类型!')
  4611. return
  4612. }
  4613. if (this.saveDetailData.alternativeNo === '' || this.saveDetailData.alternativeNo == null) {
  4614. this.$message.warning('请填写替代编码!')
  4615. return
  4616. }
  4617. if (this.saveDetailData.alternativeDescription === '' || this.saveDetailData.alternativeDescription == null) {
  4618. this.$message.warning('请填写替代名称!')
  4619. return
  4620. }
  4621. if (this.saveDetailData.status === '' || this.saveDetailData.status == null) {
  4622. this.$message.warning('请选择替代状态!')
  4623. return
  4624. }
  4625. this.saveDetailLoading = true
  4626. if (this.saveDetailData.flag === '1') {
  4627. bomDetailSave(this.saveDetailData).then(({data}) => {
  4628. if (data && data.code === 0) {
  4629. this.detailDataList = data.rows
  4630. this.detailData = this.saveDetailData
  4631. this.subDetailList = []
  4632. this.saveDetailModalFlag = false
  4633. this.$message({
  4634. message: '操作成功',
  4635. type: 'success',
  4636. duration: 1500,
  4637. onClose: () => {}
  4638. })
  4639. } else {
  4640. this.$alert(data.msg, '错误', {
  4641. confirmButtonText: '确定'
  4642. })
  4643. }
  4644. this.saveDetailLoading = false
  4645. })
  4646. } else {
  4647. bomDetailUpdate(this.saveDetailData).then(({data}) => {
  4648. if (data && data.code === 0) {
  4649. this.detailDataList = data.rows.detailDataList
  4650. this.detailData = data.rows.detailData
  4651. this.subDetailList = data.rows.subDetailList
  4652. this.saveDetailModalFlag = false
  4653. this.$message({
  4654. message: '操作成功',
  4655. type: 'success',
  4656. duration: 1500,
  4657. onClose: () => {}
  4658. })
  4659. } else {
  4660. this.$alert(data.msg, '错误', {
  4661. confirmButtonText: '确定'
  4662. })
  4663. }
  4664. this.saveDetailLoading = false
  4665. })
  4666. }
  4667. },
  4668. // 删除替代
  4669. deleteBomDetail () {
  4670. if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) {
  4671. this.$message.warning('请选择要删除的替代编码!')
  4672. return
  4673. }
  4674. if (this.detailData.alternativeNo === '*') {
  4675. this.$message.warning('当前为默认替代,不可以删除!')
  4676. return
  4677. }
  4678. this.$confirm(`是否删除这项替代?`, '提示', {
  4679. confirmButtonText: '确定',
  4680. cancelButtonText: '取消',
  4681. type: 'warning'
  4682. }).then(() => {
  4683. this.detailData.updateBy = this.$store.state.user.name
  4684. bomDetailDelete(this.detailData).then(({data}) => {
  4685. if (data && data.code === 0) {
  4686. this.detailData = data.rows.detailData
  4687. this.detailDataList = data.rows.detailDataList
  4688. this.subDetailList = data.rows.subDetailList
  4689. this.$message({
  4690. message: '操作成功',
  4691. type: 'success',
  4692. duration: 1500,
  4693. onClose: () => {}
  4694. })
  4695. } else {
  4696. this.$alert(data.msg, '错误', {
  4697. confirmButtonText: '确定'
  4698. })
  4699. }
  4700. })
  4701. })
  4702. },
  4703. // 修改替代状态为 Buildable
  4704. updateStatusToBuildable () {
  4705. this.detailData.updateBy = this.$store.state.user.name
  4706. this.$confirm(`是否修改状态为Buildable?`, '提示', {
  4707. confirmButtonText: '确定',
  4708. cancelButtonText: '取消',
  4709. type: 'warning'
  4710. }).then(() => {
  4711. updateAlternativeStatus(this.detailData).then(({data}) => {
  4712. if (data && data.code === 0) {
  4713. this.detailDataList = data.rows.detailDataList
  4714. this.detailData = data.rows.detailData
  4715. this.subDetailList = data.rows.subDetailList
  4716. this.$message({
  4717. message: '操作成功',
  4718. type: 'success',
  4719. duration: 1500,
  4720. onClose: () => {}
  4721. })
  4722. } else {
  4723. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  4724. // 刷新替代和子明细
  4725. this.alternativeChange()
  4726. }
  4727. })
  4728. })
  4729. },
  4730. // 修改替代状态为 Obsolete
  4731. updateStatusToObsolete () {
  4732. this.detailData.updateBy = this.$store.state.user.name
  4733. this.$confirm(`是否修改状态为Obsolete?`, '提示', {
  4734. confirmButtonText: '确定',
  4735. cancelButtonText: '取消',
  4736. type: 'warning'
  4737. }).then(() => {
  4738. updateAlternativeStatus(this.detailData).then(({data}) => {
  4739. if (data && data.code === 0) {
  4740. this.detailDataList = data.rows.detailDataList
  4741. this.detailData = data.rows.detailData
  4742. this.subDetailList = data.rows.subDetailList
  4743. this.$message({
  4744. message: '操作成功',
  4745. type: 'success',
  4746. duration: 1500,
  4747. onClose: () => {}
  4748. })
  4749. } else {
  4750. this.$alert(data.msg, '错误', {confirmButtonText: '确定'})
  4751. // 刷新替代和子明细
  4752. this.alternativeChange()
  4753. }
  4754. })
  4755. })
  4756. },
  4757. // 替代改变事件
  4758. alternativeChange () {
  4759. queryBomComponent(this.detailData).then(({data}) => {
  4760. if (data && data.code === 0) {
  4761. this.detailDataList = data.rows.detailDataList
  4762. this.detailData = data.rows.detailData
  4763. this.subDetailList = data.rows.subDetailList
  4764. this.refreshSubDetailTable()
  4765. } else {
  4766. this.$alert(data.msg, '错误', {
  4767. confirmButtonText: '确定'
  4768. })
  4769. }
  4770. })
  4771. },
  4772. // 临时Bom转为正式Bom
  4773. toBecomeOfficialBom () {
  4774. this.detailData.updateBy = this.$store.state.user.name
  4775. this.toBecomeOfficialLoading = true
  4776. toBecomeOfficialBom(this.detailData).then(({data}) => {
  4777. if (data && data.code === 0) {
  4778. this.getDataList()
  4779. this.modalFlag = false
  4780. this.toBecomeOfficialLoading = false
  4781. this.$message({
  4782. message: '操作成功',
  4783. type: 'success',
  4784. duration: 1500,
  4785. onClose: () => {}
  4786. })
  4787. } else {
  4788. this.toBecomeOfficialLoading = false
  4789. this.$alert(data.msg, '错误', {
  4790. confirmButtonText: '确定'
  4791. })
  4792. }
  4793. }).catch(()=>{
  4794. this.toBecomeOfficialLoading = false
  4795. })
  4796. },
  4797. // 正向同步替代下的数据 PLM-IFS
  4798. syncPlmToIfs () {
  4799. this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {
  4800. confirmButtonText: '确定',
  4801. cancelButtonText: '取消',
  4802. type: 'warning'
  4803. }).then(() => {
  4804. this.detailData.updateBy = this.$store.state.user.name
  4805. this.toBecomeOfficialLoading = true
  4806. syncBomInfoPlmToIfs(this.detailData).then(({data}) => {
  4807. if (data && data.code === 0) {
  4808. this.refreshSubDetailTable()
  4809. this.toBecomeOfficialLoading = false
  4810. this.$message({
  4811. message: '操作成功',
  4812. type: 'success',
  4813. duration: 1500,
  4814. onClose: () => {}
  4815. })
  4816. } else {
  4817. this.toBecomeOfficialLoading = false
  4818. this.$alert(data.msg, '错误', {
  4819. confirmButtonText: '确定'
  4820. })
  4821. }
  4822. }).catch(()=>{
  4823. this.toBecomeOfficialLoading = false
  4824. })
  4825. })
  4826. },
  4827. // 反向同步替代下的数据 IFS-PLM
  4828. syncIfsToPlm () {
  4829. this.$confirm(`警告:该操作将会更新此替代下的所有信息,是否继续?`, '提示', {
  4830. confirmButtonText: '确定',
  4831. cancelButtonText: '取消',
  4832. type: 'warning'
  4833. }).then(() => {
  4834. this.detailData.updateBy = this.$store.state.user.name
  4835. this.toBecomeOfficialLoading = true
  4836. syncBomInfoIfsToPlm(this.detailData).then(({data}) => {
  4837. if (data && data.code === 0) {
  4838. this.refreshSubDetailTable()
  4839. this.toBecomeOfficialLoading = false
  4840. this.$message({
  4841. message: '操作成功',
  4842. type: 'success',
  4843. duration: 1500,
  4844. onClose: () => {}
  4845. })
  4846. } else {
  4847. this.toBecomeOfficialLoading = false
  4848. this.$alert(data.msg, '错误', {
  4849. confirmButtonText: '确定'
  4850. })
  4851. }
  4852. }).catch(()=>{
  4853. this.toBecomeOfficialLoading = false
  4854. })
  4855. })
  4856. },
  4857. // 根据物料编码查询工序
  4858. queryOperationList () {
  4859. this.operationData.partNo = this.modalData.partNo
  4860. // 查询所有
  4861. queryOperationList(this.operationData).then(({data}) => {
  4862. if (data && data.code === 0) {
  4863. this.operationList = data.rows
  4864. this.operationData = {
  4865. site: this.$store.state.user.site,
  4866. partNo: this.modalData.partNo,
  4867. routingRevision: '',
  4868. routingType: '',
  4869. alternativeNo: '',
  4870. operationNo: '',
  4871. operationName: '',
  4872. }
  4873. this.operationModelFlag = true
  4874. } else {
  4875. this.$alert(data.msg, '错误', {
  4876. confirmButtonText: '确定'
  4877. })
  4878. }
  4879. })
  4880. },
  4881. // ======== chooseList相关方法 ========
  4882. // 获取基础数据列表S
  4883. getBaseList (val, type) {
  4884. this.tagNo = val
  4885. this.$nextTick(() => {
  4886. let strVal = ''
  4887. if (val === 117) {
  4888. strVal = this.componentData.issueToLoc
  4889. }
  4890. this.$refs.baseList.init(val, strVal)
  4891. })
  4892. },
  4893. // 列表方法的回调
  4894. getBaseData (val) {
  4895. if (this.tagNo === 117) {
  4896. this.componentData.issueToLoc = val.location_id
  4897. this.componentData.issueToLocName = val.location_name
  4898. }
  4899. },
  4900. // ======== 导出相关方法 ========
  4901. // 导出excel
  4902. async createExportData () {
  4903. this.searchData.limit = -1
  4904. this.searchData.page = 1
  4905. await bomManagementSearch(this.searchData).then(({data}) => {
  4906. this.resultList = data.page.list
  4907. })
  4908. return this.resultList
  4909. },
  4910. startDownload () {},
  4911. finishDownload () {},
  4912. fields () {
  4913. let json = '{'
  4914. this.columnList.forEach((item, index) => {
  4915. if (index == this.columnList.length - 1) {
  4916. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  4917. } else {
  4918. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  4919. }
  4920. })
  4921. json += '}'
  4922. let s = eval('(' + json + ')')
  4923. return s
  4924. },
  4925. // 切换到routing
  4926. checkOutToRouting (partNo) {
  4927. if (this.$router.resolve('part-routingManagement').resolved.name === '404') {
  4928. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4929. } else {
  4930. this.$router.push({name:"part-routingManagement",params:{partNo: partNo}})
  4931. }
  4932. },
  4933. // 切换到inventoryPart
  4934. toPartMenu (ifsPartNo) {
  4935. if (this.$router.resolve(`/part-partInformation`).resolved.name === '404') {
  4936. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4937. } else {
  4938. this.$router.push({name:`part-partInformation`,params:{ifsPartNo: ifsPartNo},})
  4939. }
  4940. },
  4941. toMenu (type, row) {
  4942. let path = ''
  4943. if (type === 'Routing' ) {
  4944. path = 'routing'
  4945. } else if (type === 'BOM' && row.partType !== 'Manufactured Recipe') {
  4946. path = 'bom'
  4947. } else if (type === 'BOM' && row.partType === 'Manufactured Recipe') {
  4948. path = 'recipe'
  4949. }
  4950. this.modalFlag = false
  4951. if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404') {
  4952. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  4953. } else {
  4954. this.$router.push({name:`part-${path}Management`,params:{partNo: row.componentPart},})
  4955. }
  4956. },
  4957. jumpBom (row) {
  4958. if (row.engChgLevel != null || row.engChgLevel !== '') {
  4959. this.$message.error("bom明细不存在")
  4960. }
  4961. let inData = {
  4962. site: this.searchData.site,
  4963. partNo: row.componentPart,
  4964. engChgLevel: row.engChgLevel,
  4965. }
  4966. localStorage.setItem('bomData', JSON.stringify(inData))
  4967. window.open('#/part-bomManagement')
  4968. },
  4969. jumpPeifang (row) {
  4970. let inData = {
  4971. site: row.site,
  4972. ifsPartNo: row.componentPart,
  4973. bomType: 'Manufacturing',
  4974. }
  4975. localStorage.setItem('recipeData', JSON.stringify(inData))
  4976. window.open('#/part-recipeManagement')
  4977. },
  4978. queryByAnyField(params){
  4979. params.no = this.pageIndex
  4980. params.size = this.pageSize
  4981. params.userId = this.$store.state.user.id.toString()
  4982. params.site = this.$store.state.user.site
  4983. this.dataListLoading = true;
  4984. bomManagementSearchAny(params).then(({data})=>{
  4985. if (data && data.code === 0){
  4986. this.dataList = data.page.list
  4987. this.totalPage = data.page.totalCount
  4988. }else {
  4989. this.$message.warning(data.msg)
  4990. }
  4991. this.dataListLoading = false;
  4992. }).catch((error)=>{
  4993. this.$message.error(error)
  4994. this.dataListLoading = false;
  4995. })
  4996. this.filterSearchData = params
  4997. this.isFilterSearch = true
  4998. this.filterVisible = false
  4999. },
  5000. queryProductGroupId4(){
  5001. this.componentPartProductGroupId4Data.productGroupId4 = this.componentPartData.productGroupId4
  5002. this.componentPartProductGroupId4Data.limit = this.pageSize5
  5003. this.componentPartProductGroupId4Data.page = this.pageIndex5
  5004. this.componentPartProductGroupId4Data.site = this.$store.state.user.site
  5005. queryProductGroupId4(this.componentPartProductGroupId4Data).then(({data}) => {
  5006. if (data && data.code === 0) {
  5007. this.productGroupId4List = data.rows.list
  5008. this.pageIndex5 = data.rows.currPage
  5009. this.pageSize5 = data.rows.pageSize
  5010. this.totalPage5 = data.rows.totalCount
  5011. this.productGroupId4ModelFlag = true
  5012. } else {
  5013. this.productGroupId4List = []
  5014. }
  5015. })
  5016. },
  5017. getProductGroupId4RowData(row) {
  5018. this.componentPartData.productGroupId4 = row.productGroupId4
  5019. queryPartListAll(this.componentPartData).then(({data}) => {
  5020. if (data && data.code === 0) {
  5021. this.componentPartList = data.page.list
  5022. } else {
  5023. this.componentPartList = []
  5024. }
  5025. })
  5026. this.productGroupId4ModelFlag = false
  5027. },
  5028. sizeChangeHandle5(val){
  5029. this.pageSize5 = val
  5030. this.pageIndex5 = 1
  5031. this.queryProductGroupId4()
  5032. },
  5033. currentChangeHandle5(val) {
  5034. this.pageIndex5 = val
  5035. this.queryProductGroupId4()
  5036. },
  5037. sizeChangeHandle6(val){
  5038. this.pageSize6 = val
  5039. this.pageIndex6 = 1
  5040. this.queryProductGroupId4Save()
  5041. },
  5042. currentChangeHandle6(val) {
  5043. this.pageIndex6 = val
  5044. this.queryProductGroupId4Save()
  5045. },
  5046. queryProductGroupId4Save(){
  5047. this.componentPartProductGroupId4SaveData.productGroupId4 = this.partData.productGroupId4
  5048. this.componentPartProductGroupId4SaveData.limit = this.pageSize6
  5049. this.componentPartProductGroupId4SaveData.page = this.pageIndex6
  5050. this.componentPartProductGroupId4SaveData.site = this.$store.state.user.site
  5051. queryProductGroupId4(this.componentPartProductGroupId4SaveData).then(({data}) => {
  5052. if (data && data.code === 0) {
  5053. this.productGroupId4SaveList = data.rows.list
  5054. this.pageIndex6 = data.rows.currPage
  5055. this.pageSize6 = data.rows.pageSize
  5056. this.totalPage6 = data.rows.totalCount
  5057. this.productGroupId4SaveModelFlag = true
  5058. } else {
  5059. this.productGroupId4SaveList = []
  5060. }
  5061. })
  5062. },
  5063. getProductGroupId4SaveRowData(row){
  5064. this.partData.productGroupId4 = row.productGroupId4
  5065. this.productGroupId4SaveModelFlag = false
  5066. }
  5067. }
  5068. }
  5069. </script>
  5070. <style scoped lang="scss">
  5071. /deep/ .detail-tab .el-tabs__content {
  5072. height: 165px;
  5073. padding: 15px 0px 0px 0px;
  5074. }
  5075. /deep/ .sub_detail-tab .el-tabs__content {
  5076. height: 280px;
  5077. padding: 0px;
  5078. }
  5079. .numInput /deep/ .el-input__inner{
  5080. text-align: right;
  5081. }
  5082. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  5083. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  5084. -webkit-appearance: none;
  5085. }
  5086. /deep/ .inlineNumber input[type="number"]{
  5087. -moz-appearance: textfield;
  5088. padding-right: 5px !important;
  5089. }
  5090. </style>