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.

5453 lines
202 KiB

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