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.

5054 lines
174 KiB

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