plm前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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