冷凝胶前端
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.

5035 lines
192 KiB

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