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.

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