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.

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