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.

4752 lines
162 KiB

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