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.

5449 lines
201 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. this.$message({
  3198. message: '操作成功',
  3199. type: 'success',
  3200. duration: 1500,
  3201. onClose: () => {}
  3202. })
  3203. } else {
  3204. this.$alert(data.msg, '错误', {
  3205. confirmButtonText: '确定'
  3206. })
  3207. }
  3208. })
  3209. }
  3210. },
  3211. // 删除物料revision
  3212. deleteRevisionModal (row) {
  3213. this.$confirm(`是否删除该版本?`, '提示', {
  3214. confirmButtonText: '确定',
  3215. cancelButtonText: '取消',
  3216. type: 'warning'
  3217. }).then(() => {
  3218. deleteRevision(row).then(({data}) => {
  3219. if (data && data.code === 0) {
  3220. this.queryPartRevisionList()
  3221. this.$message({
  3222. message: '操作成功',
  3223. type: 'success',
  3224. duration: 1500,
  3225. onClose: () => {}
  3226. })
  3227. } else {
  3228. this.$alert(data.msg, '错误', {
  3229. confirmButtonText: '确定'
  3230. })
  3231. }
  3232. })
  3233. }).catch(() => {
  3234. })
  3235. },
  3236. // 临时物料转为正式物料
  3237. toBecomeOfficialPart () {
  3238. toBecomeOfficialPart(this.modalData).then(({data}) => {
  3239. if (data && data.code === 0) {
  3240. this.getDataList()
  3241. this.modalFlag = false
  3242. this.$message({
  3243. message: '操作成功',
  3244. type: 'success',
  3245. duration: 1500,
  3246. onClose: () => {}
  3247. })
  3248. } else {
  3249. this.$alert(data.msg, '错误', {
  3250. confirmButtonText: '确定'
  3251. })
  3252. }
  3253. })
  3254. },
  3255. // 物料编码失去焦点事件
  3256. queryMasterField () {
  3257. // 根据物料编码查 masterPart 属性
  3258. queryMasterField(this.modalData).then(({data}) => {
  3259. if (data && data.code === 0) {
  3260. if (data.data != null) {
  3261. this.modalData.partDesc = data.data.partDesc
  3262. this.modalData.umId = data.data.umId
  3263. this.modalData.umName = data.data.umName
  3264. this.modalData.weightNet = data.data.weightNet
  3265. //this.modalData.uomForWeightNet = data.data.uomForWeightNet
  3266. this.modalData.volumeNet = data.data.volumeNet
  3267. //this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
  3268. }
  3269. }
  3270. })
  3271. },
  3272. // 制造提前期内容改变事件
  3273. changeExpectedLeadTime () {
  3274. this.modalData.expectedLeadTime = this.modalData.manufacturingLeadTime
  3275. },
  3276. // 天数内容改变事件
  3277. changeDurabilityWeek () {
  3278. this.modalData.durabilityWeek = this.modalData.durabilityDay / 7
  3279. },
  3280. focusNextInput (index, type) {
  3281. let aaa = ''
  3282. if (this.updatePartItemList.length - 1 === index) {
  3283. aaa = `${type}0`
  3284. } else {
  3285. aaa = `${type}${index + 1}`
  3286. }
  3287. this.$nextTick(() => {
  3288. this.$refs[aaa].focus()
  3289. })
  3290. },
  3291. // /**
  3292. // * 编辑物料属性
  3293. // */
  3294. // updateItemValue () {
  3295. // let tempData = {
  3296. // site: this.$store.state.user.site,
  3297. // partNo: this.partCurrentRow.partNo,
  3298. // codeNo: this.partCurrentRow.codeNo,
  3299. // recordType: 'IP'
  3300. // }
  3301. // getPartItem(tempData).then(({data}) => {
  3302. // if (data && data.code === 0) {
  3303. // this.updatePartItemList = data.rows
  3304. // this.updateItemModelFlag = true
  3305. // } else {
  3306. // this.updatePartItemList = []
  3307. // }
  3308. // })
  3309. // },
  3310. clickSave () {
  3311. if (!this.attributeDialog) { // 保存
  3312. this.updateItemValue()
  3313. } else { // 编辑
  3314. this.copyAttributeList = JSON.parse(JSON.stringify(this.partItemList))
  3315. this.attributeDialog = false
  3316. }
  3317. },
  3318. /**
  3319. * 编辑物料属性
  3320. */
  3321. updateItemValue () {
  3322. this.loading = true
  3323. let tempData = {
  3324. itemList: JSON.parse(JSON.stringify(this.copyAttributeList))
  3325. }
  3326. commitItemValue(tempData).then(({data}) => {
  3327. if (data && data.code === 0) {
  3328. this.getPartItem()
  3329. this.attributeDialog = true
  3330. this.$message({
  3331. message: '操作成功',
  3332. type: 'success',
  3333. duration: 1500,
  3334. onClose: () => {}
  3335. })
  3336. } else {
  3337. this.$alert(data.msg, '错误', {
  3338. confirmButtonText: '确定'
  3339. })
  3340. }
  3341. this.loading = false
  3342. }).catch((error) => {
  3343. this.$message.error(error)
  3344. this.loading = false
  3345. })
  3346. },
  3347. /**
  3348. * 新增/删除物料属性
  3349. */
  3350. addOrDelItem () {
  3351. if (!this.attributeDialog) {
  3352. this.$message.warning('请保存更改!')
  3353. return
  3354. }
  3355. this.itemSelections1 = null
  3356. this.itemSelections2 = null
  3357. this.itemData.propertiesItemNo = ''
  3358. this.itemData.itemDesc = ''
  3359. let tempData = {
  3360. site: this.partCurrentRow.site,
  3361. partNo: this.partCurrentRow.partNo,
  3362. codeNo: this.partCurrentRow.codeNo,
  3363. recordType: 'IP'
  3364. }
  3365. getItemLists(tempData).then(({data}) => {
  3366. this.itemList1 = data.row1
  3367. this.itemList2 = data.row2
  3368. })
  3369. this.fastAddFlag = true
  3370. },
  3371. // 可选属性
  3372. itemClickRow1 (row) {
  3373. this.$refs.itemTable1.toggleRowSelection(row)
  3374. },
  3375. // 已有属性
  3376. itemClickRow2 (row) {
  3377. this.$refs.itemTable2.toggleRowSelection(row)
  3378. },
  3379. selectionItem1 (val) {
  3380. this.itemSelections1 = val
  3381. },
  3382. selectionItem2 (val) {
  3383. this.itemSelections2 = val
  3384. },
  3385. // 物料项目新增
  3386. addItem () {
  3387. if (this.itemSelections1 == null || this.itemSelections1.length === 0) {
  3388. this.$message.warning('请选择可选属性!')
  3389. return
  3390. }
  3391. let inData = {
  3392. site: this.$store.state.user.site,
  3393. partNo: this.partCurrentRow.partNo,
  3394. codeNo: this.partCurrentRow.codeNo,
  3395. codeDesc: this.partCurrentRow.codeDesc,
  3396. recordType: 'IP',
  3397. itemList: this.itemSelections1
  3398. }
  3399. addPartItem(inData).then(({data}) => {
  3400. if (data && data.code === 0) {
  3401. getItemLists(inData).then(({data}) => {
  3402. this.itemList1 = data.row1
  3403. this.itemList2 = data.row2
  3404. })
  3405. this.getPartItem()
  3406. this.itemSelections1 = []
  3407. this.$message({
  3408. message: '操作成功',
  3409. type: 'success',
  3410. duration: 1500,
  3411. onClose: () => {}
  3412. })
  3413. } else {
  3414. this.$alert(data.msg, '错误', {
  3415. confirmButtonText: '确定'
  3416. })
  3417. }
  3418. })
  3419. },
  3420. // 物料项目删除
  3421. deleteItem () {
  3422. if (this.itemSelections2 == null || this.itemSelections2.length === 0) {
  3423. this.$alert("请选择已有属性!", '提示', {
  3424. confirmButtonText: '确定'
  3425. })
  3426. return false
  3427. }
  3428. let inData = {
  3429. site: this.$store.state.user.site,
  3430. partNo: this.partCurrentRow.partNo,
  3431. codeNo: this.partCurrentRow.codeNo,
  3432. codeDesc: this.partCurrentRow.codeDesc,
  3433. recordType: 'IP',
  3434. itemList: this.itemSelections2
  3435. }
  3436. deletePartItem(inData).then(({data}) => {
  3437. if (data && data.code === 0) {
  3438. getItemLists(inData).then(({data}) => {
  3439. this.itemList1 = data.row1
  3440. this.itemList2 = data.row2
  3441. })
  3442. this.getPartItem()
  3443. this.itemSelections2 = []
  3444. this.$message({
  3445. message: '操作成功',
  3446. type: 'success',
  3447. duration: 1500,
  3448. onClose: () => {}
  3449. })
  3450. } else {
  3451. this.$alert(data.msg, '错误', {
  3452. confirmButtonText: '确定'
  3453. })
  3454. }
  3455. })
  3456. },
  3457. // 查询物料项目
  3458. queryPartItem () {
  3459. this.itemData.partNo = this.partCurrentRow.partNo
  3460. this.itemData.codeNo = this.partCurrentRow.codeNo
  3461. this.itemData.partNo = this.partCurrentRow.partNo
  3462. queryPartItem(this.itemData).then(({data}) => {
  3463. if (data && data.code === 0) {
  3464. this.itemList1 = data.rows
  3465. } else {
  3466. this.itemList1 = []
  3467. }
  3468. })
  3469. },
  3470. // 确认修改物料属性
  3471. commitItemValue () {
  3472. let tempData = {
  3473. itemList: JSON.parse(JSON.stringify(this.updatePartItemList))
  3474. }
  3475. commitItemValue(tempData).then(({data}) => {
  3476. if (data && data.code === 0) {
  3477. this.getPartItem()
  3478. this.updateItemModelFlag = false
  3479. this.$message({
  3480. message: '操作成功',
  3481. type: 'success',
  3482. duration: 1500,
  3483. onClose: () => {}
  3484. })
  3485. } else {
  3486. this.$alert(data.msg, '错误', {
  3487. confirmButtonText: '确定'
  3488. })
  3489. }
  3490. })
  3491. },
  3492. // ======== 分页相关方法 ========
  3493. /**
  3494. * 每页数
  3495. * @param val
  3496. */
  3497. sizeChangeHandle (val) {
  3498. this.pageSize = val
  3499. this.pageIndex = 1
  3500. this.getDataList()
  3501. },
  3502. /**
  3503. * 当前页
  3504. * @param val
  3505. */
  3506. currentChangeHandle (val) {
  3507. this.pageIndex = val
  3508. this.getDataList()
  3509. },
  3510. // ======== 页签切换相关方法 ========
  3511. /**
  3512. * 未知
  3513. * @returns {boolean}
  3514. */
  3515. selectFlag(row, index) {
  3516. if (row.status !== 'Y') {
  3517. return true
  3518. } else {
  3519. return false
  3520. }
  3521. },
  3522. /**
  3523. * 列表表格选择替换
  3524. * @param tab
  3525. * @param event
  3526. */
  3527. tabClick (tab, event) {
  3528. // 刷新列表数据
  3529. this.refreshCurrentTabTable()
  3530. },
  3531. /**
  3532. * 当前值发生变化的时候修改
  3533. * @param row
  3534. * @param oldRow
  3535. */
  3536. changeCurrentRow (row, oldRow) {
  3537. // 判断是否是获取焦点的事件
  3538. if (row) {
  3539. this.partCurrentRow = JSON.parse(JSON.stringify(row))
  3540. //刷新当前页表
  3541. this.refreshCurrentTabTable()
  3542. }
  3543. },
  3544. /**
  3545. * 刷新页签的table数据
  3546. */
  3547. refreshCurrentTabTable () {
  3548. if (this.activeTable === 'part_item') {
  3549. this.getPartItem()
  3550. } else if (this.activeTable === 'part_agent') {
  3551. this.getPartAgent()
  3552. } else if (this.activeTable === 'part_file') {
  3553. this.getFileContentData()
  3554. } else if (this.activeTable === 'part_manufacturer') {
  3555. this.getPartManufacturer()
  3556. } else if (this.activeTable === 'default_locations') {
  3557. this.getDefaultLocation()
  3558. }
  3559. },
  3560. // ======== 列表数据刷新方法 ========
  3561. /**
  3562. * 查询物料属性
  3563. */
  3564. getPartItem () {
  3565. let tempData = {
  3566. site: this.$store.state.user.site,
  3567. partNo: this.partCurrentRow.partNo,
  3568. codeNo: this.partCurrentRow.codeNo,
  3569. recordType: 'IP'
  3570. }
  3571. getPartItem(tempData).then(({data}) => {
  3572. if (data && data.code === 0) {
  3573. this.partItemList = data.rows
  3574. } else {
  3575. this.partItemList = []
  3576. }
  3577. })
  3578. },
  3579. /**
  3580. * 查询物料代理商
  3581. */
  3582. getPartAgent () {
  3583. let tempData = {
  3584. site: this.$store.state.user.site,
  3585. partNo: this.partCurrentRow.partNo,
  3586. //agentId: this.partCurrentRow.agentId
  3587. }
  3588. getPartAgent(tempData).then(({data}) => {
  3589. if (data && data.code === 0) {
  3590. this.partAgentList = data.rows
  3591. } else {
  3592. this.partAgentList = []
  3593. }
  3594. })
  3595. },
  3596. /**
  3597. * 查询物料制造商
  3598. */
  3599. getPartManufacturer () {
  3600. let tempData = {
  3601. site: this.$store.state.user.site,
  3602. partNo: this.partCurrentRow.partNo,
  3603. //agentId: this.partCurrentRow.agentId
  3604. }
  3605. getPartManufacturer(tempData).then(({data}) => {
  3606. if (data && data.code === 0) {
  3607. this.partManufacturerList = data.rows
  3608. } else {
  3609. this.partManufacturerList = []
  3610. }
  3611. })
  3612. },
  3613. /**
  3614. * 查询物料库位
  3615. */
  3616. getDefaultLocation () {
  3617. let tempData = {
  3618. site: this.$store.state.user.site,
  3619. partNo: this.partCurrentRow.partNo,
  3620. }
  3621. getDefaultLocation(tempData).then(({data}) => {
  3622. if (data && data.code === 0) {
  3623. this.defaultLocationList = data.rows
  3624. } else {
  3625. this.defaultLocationList = []
  3626. }
  3627. })
  3628. },
  3629. // ======== 列表数据刷新方法 ========
  3630. /**
  3631. * 获取数据列表
  3632. */
  3633. getDataList () {
  3634. this.searchData.limit = this.pageSize
  3635. this.searchData.page = this.pageIndex
  3636. partInformationSearch(this.searchData).then(({data}) => {
  3637. if (data.code === 0) {
  3638. this.dataList = data.page.list
  3639. this.pageIndex = data.page.currPage
  3640. this.pageSize = data.page.pageSize
  3641. this.totalPage = data.page.totalCount
  3642. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  3643. // 判断是否全部存在数据
  3644. if (this.dataList.length > 0) {
  3645. // 设置选中行
  3646. this.$refs.partTable.setCurrentRow(this.dataList[0])
  3647. this.partClickRow(this.dataList[0])
  3648. } else {
  3649. this.partCurrentRow = {}
  3650. }
  3651. // 加载当前的页签的table
  3652. //this.refreshCurrentTabTable()
  3653. }
  3654. })
  3655. },
  3656. // ======== 新增/编辑模态框 ========
  3657. /**
  3658. * 物料信息新增模态框
  3659. */
  3660. addModal () {
  3661. getProjectPartNo(this.searchData).then(({data}) => {
  3662. if (data && data.code === 0) {
  3663. this.modalData = {
  3664. flag: '1',
  3665. title: '物料新增',
  3666. site: this.$store.state.user.site,
  3667. partNo: data.partNo,
  3668. partDesc: '',
  3669. spec: '',
  3670. partTypeDb: '',
  3671. partType: 'Purchased (raw)',
  3672. familyId: '',
  3673. familyName: '',
  3674. groupId: '',
  3675. groupName: '',
  3676. umId: '',
  3677. umName: '',
  3678. weightNet: '',
  3679. uomForWeightNet: 'kg',
  3680. volumeNet: '',
  3681. uomForVolumeNet: 'm3',
  3682. lotTrackingCode: 'Order Based',
  3683. active: 'Y',
  3684. remark: '',
  3685. supplierId: '',
  3686. supplierName: '',
  3687. productGroupId1: '',
  3688. productGroupName1: '',
  3689. productGroupId2: '',
  3690. productGroupName2: '',
  3691. productGroupId3: '',
  3692. productGroupName3: '',
  3693. productGroupId4: '*',
  3694. productGroupName4: 'NorthSky Application owner',
  3695. erpPartNo: '',
  3696. codeNo: '',
  3697. codeDesc: '',
  3698. manufacturerId: '',
  3699. manufacturerName: '',
  3700. agentId: '',
  3701. agentName: '',
  3702. createBy: this.$store.state.user.name,
  3703. typeDesignation: '',
  3704. hazardCode: '',
  3705. hazardDesc: '',
  3706. assetClass: 'S',
  3707. assetClassDesc: '标准',
  3708. dimQuality: '',
  3709. abcClass: 'C',
  3710. abcClassDesc: '',
  3711. frequencyClass: 'Very Slow Mover',
  3712. lifecycleStage: 'Development',
  3713. countryOfOrigin: '',
  3714. countryOfOriginDesc: '',
  3715. manufacturingLeadTime: 0,
  3716. expectedLeadTime: 0,
  3717. regionOfOrigin: '',
  3718. regionOfOriginDesc: '',
  3719. durabilityWeek: '',
  3720. customsStatNo: '',
  3721. customsStatDesc: '',
  3722. durabilityDay: '',
  3723. intrastatConvFactor: undefined,
  3724. umDesc: '',
  3725. status: 'N',
  3726. partStatus: 'A',
  3727. partStatusDesc: '活动',
  3728. configurationId: '*',
  3729. estimatedMaterialCost: 0,
  3730. inventoryValuationMethod: 'Standard Cost',
  3731. partCostGroupId: '',
  3732. partCostGroupDesc: '',
  3733. inventoryPartCostLevel: 'Cost Per Part',
  3734. invoiceConsideration: 'Ignore Invoice Price',
  3735. zeroCostFlag: 'Zero Cost Forbidden',
  3736. planningMethod: '',
  3737. planningMethodDesc: '',
  3738. safetyStock: 0,
  3739. minOrderQty: 0,
  3740. maxOrderQty: 0,
  3741. mulOrderQty: 0,
  3742. safetyLeadTime: 0,
  3743. shrinkageFac: 0,
  3744. stdOrderQty: 0,
  3745. cumLeadTime: 0,
  3746. backFlushPart: 'All Locations',
  3747. byProdAsSupplyInMrpDb: '',
  3748. unprotectedLeadTime: 0,
  3749. issueType: 'Reserve And Backflush',
  3750. mrpControlFlagDb: 'Y',
  3751. fixedLeadTimeDay: 0,
  3752. overReporting: 'Allowed',
  3753. useTheoreticalDensityDb: '',
  3754. variableLeadTimeDay: 0,
  3755. overReportTolerance: 0,
  3756. fixedLeadTimeHour: 0,
  3757. density: undefined,
  3758. variableLeadTimeHour: 0
  3759. }
  3760. this.inventoryPartTable = 'General'
  3761. this.modalDisableFlag = false
  3762. this.modalFlag = true
  3763. } else {
  3764. this.$message.error(data.msg)
  3765. }
  3766. })
  3767. },
  3768. /**
  3769. * 物料信息编辑模态框
  3770. * @param row
  3771. */
  3772. updateModal (row) {
  3773. this.modalData = {
  3774. flag: '2',
  3775. title: '物料编辑',
  3776. site: row.site,
  3777. partNo: row.partNo,
  3778. partDesc: row.partDesc,
  3779. spec: row.spec,
  3780. partTypeDb: row.partTypeDb,
  3781. partType: row.partType,
  3782. familyId: row.familyId,
  3783. familyName: row.familyName,
  3784. groupId: row.groupId,
  3785. groupName: row.groupName,
  3786. umId: row.umId,
  3787. umName: row.umName,
  3788. weightNet: row.weightNet,
  3789. uomForWeightNet: row.uomForWeightNet,
  3790. volumeNet: row.volumeNet,
  3791. uomForVolumeNet: row.uomForVolumeNet,
  3792. lotTrackingCode: row.lotTrackingCode,
  3793. active: row.active,
  3794. remark: row.remark,
  3795. supplierId: row.supplierId,
  3796. supplierName: row.supplierName,
  3797. productGroupId1: row.productGroupId1,
  3798. productGroupName1: row.productGroupName1,
  3799. productGroupId2: row.productGroupId2,
  3800. productGroupName2: row.productGroupName2,
  3801. productGroupId3: row.productGroupId3,
  3802. productGroupName3: row.productGroupName3,
  3803. productGroupId4: row.productGroupId4,
  3804. productGroupName4: row.productGroupName4,
  3805. erpPartNo: row.erpPartNo,
  3806. codeNo: row.codeNo,
  3807. codeDesc: row.codeDesc,
  3808. manufacturerId: row.manufacturerId,
  3809. manufacturerName: row.manufacturerName,
  3810. agentId: row.agentId,
  3811. agentName: row.agentName,
  3812. updateBy: this.$store.state.user.name,
  3813. typeDesignation: row.typeDesignation,
  3814. hazardCode: row.hazardCode,
  3815. hazardDesc: row.hazardDesc,
  3816. assetClass: row.assetClass,
  3817. assetClassDesc: row.assetClassDesc,
  3818. dimQuality: row.dimQuality,
  3819. abcClass: row.abcClass,
  3820. abcClassDesc: row.abcClassDesc,
  3821. frequencyClass: row.frequencyClass,
  3822. lifecycleStage: row.lifecycleStage,
  3823. countryOfOrigin: row.countryOfOrigin,
  3824. countryOfOriginDesc: row.countryOfOriginDesc,
  3825. manufacturingLeadTime: row.manufacturingLeadTime,
  3826. expectedLeadTime: row.expectedLeadTime,
  3827. regionOfOrigin: row.regionOfOrigin,
  3828. regionOfOriginDesc: row.regionOfOriginDesc,
  3829. durabilityWeek: '',
  3830. customsStatNo: row.customsStatNo,
  3831. customsStatDesc: row.customsStatDesc,
  3832. durabilityDay: row.durabilityDay,
  3833. intrastatConvFactor: row.intrastatConvFactor,
  3834. umDesc: row.umDesc,
  3835. status: row.status,
  3836. partStatus: row.partStatus,
  3837. partStatusDesc: row.partStatusDesc,
  3838. configurationId: row.configurationId,
  3839. estimatedMaterialCost: row.estimatedMaterialCost,
  3840. inventoryValuationMethod: row.inventoryValuationMethod,
  3841. partCostGroupId: row.partCostGroupId,
  3842. partCostGroupDesc: row.partCostGroupDesc,
  3843. inventoryPartCostLevel: row.inventoryPartCostLevel,
  3844. invoiceConsideration: row.invoiceConsideration,
  3845. zeroCostFlag: row.zeroCostFlag,
  3846. planningMethod: row.planningMethod,
  3847. planningMethodDesc: row.planningMethodDesc,
  3848. safetyStock: row.safetyStock,
  3849. minOrderQty: row.minOrderQty,
  3850. maxOrderQty: row.maxOrderQty,
  3851. mulOrderQty: row.mulOrderQty,
  3852. safetyLeadTime: row.safetyLeadTime,
  3853. shrinkageFac: row.shrinkageFac,
  3854. stdOrderQty: row.stdOrderQty,
  3855. cumLeadTime: row.cumLeadTime,
  3856. backFlushPart: row.backFlushPart,
  3857. byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
  3858. unprotectedLeadTime: row.unprotectedLeadTime,
  3859. issueType: row.issueType,
  3860. mrpControlFlagDb: row.mrpControlFlagDb,
  3861. fixedLeadTimeDay: row.fixedLeadTimeDay,
  3862. overReporting: row.overReporting,
  3863. useTheoreticalDensityDb: row.useTheoreticalDensityDb,
  3864. variableLeadTimeDay: row.variableLeadTimeDay,
  3865. overReportTolerance: row.overReportTolerance,
  3866. fixedLeadTimeHour: row.fixedLeadTimeHour,
  3867. density: row.density,
  3868. variableLeadTimeHour: row.variableLeadTimeHour,
  3869. createDate: row.createDate
  3870. }
  3871. this.inventoryPartTable = 'General'
  3872. this.modalDisableFlag = true
  3873. this.modalFlag = true
  3874. },
  3875. // 转正式物料
  3876. toBecomeOfficialPartModal (row) {
  3877. this.modalData = {
  3878. flag: '3',
  3879. title: '同步物料信息',
  3880. site: row.site,
  3881. partNo: row.partNo,
  3882. partDesc: row.partDesc,
  3883. spec: row.spec,
  3884. partTypeDb: row.partTypeDb,
  3885. partType: row.partType,
  3886. familyId: row.familyId,
  3887. familyName: row.familyName,
  3888. groupId: row.groupId,
  3889. groupName: row.groupName,
  3890. umId: row.umId,
  3891. umName: row.umName,
  3892. weightNet: row.weightNet,
  3893. uomForWeightNet: row.uomForWeightNet,
  3894. volumeNet: row.volumeNet,
  3895. uomForVolumeNet: row.uomForVolumeNet,
  3896. lotTrackingCode: row.lotTrackingCode,
  3897. active: row.active,
  3898. remark: row.remark,
  3899. supplierId: row.supplierId,
  3900. supplierName: row.supplierName,
  3901. productGroupId1: row.productGroupId1,
  3902. productGroupName1: row.productGroupName1,
  3903. productGroupId2: row.productGroupId2,
  3904. productGroupName2: row.productGroupName2,
  3905. productGroupId3: row.productGroupId3,
  3906. productGroupName3: row.productGroupName3,
  3907. productGroupId4: row.productGroupId4,
  3908. productGroupName4: row.productGroupName4,
  3909. erpPartNo: row.erpPartNo,
  3910. codeNo: row.codeNo,
  3911. codeDesc: row.codeDesc,
  3912. manufacturerId: row.manufacturerId,
  3913. manufacturerName: row.manufacturerName,
  3914. agentId: row.agentId,
  3915. agentName: row.agentName,
  3916. updateBy: this.$store.state.user.name,
  3917. typeDesignation: row.typeDesignation,
  3918. hazardCode: row.hazardCode,
  3919. hazardDesc: row.hazardDesc,
  3920. assetClass: row.assetClass,
  3921. assetClassDesc: row.assetClassDesc,
  3922. dimQuality: row.dimQuality,
  3923. abcClass: row.abcClass,
  3924. abcClassDesc: row.abcClassDesc,
  3925. frequencyClass: row.frequencyClass,
  3926. lifecycleStage: row.lifecycleStage,
  3927. countryOfOrigin: row.countryOfOrigin,
  3928. countryOfOriginDesc: row.countryOfOriginDesc,
  3929. manufacturingLeadTime: row.manufacturingLeadTime,
  3930. expectedLeadTime: row.expectedLeadTime,
  3931. regionOfOrigin: row.regionOfOrigin,
  3932. regionOfOriginDesc: row.regionOfOriginDesc,
  3933. durabilityWeek: '',
  3934. customsStatNo: row.customsStatNo,
  3935. customsStatDesc: row.customsStatDesc,
  3936. durabilityDay: row.durabilityDay,
  3937. intrastatConvFactor: row.intrastatConvFactor,
  3938. umDesc: row.umDesc,
  3939. status: row.status,
  3940. partStatus: row.partStatus,
  3941. partStatusDesc: row.partStatusDesc,
  3942. configurationId: row.configurationId,
  3943. estimatedMaterialCost: row.estimatedMaterialCost,
  3944. inventoryValuationMethod: row.inventoryValuationMethod,
  3945. partCostGroupId: row.partCostGroupId,
  3946. partCostGroupDesc: row.partCostGroupDesc,
  3947. inventoryPartCostLevel: row.inventoryPartCostLevel,
  3948. invoiceConsideration: row.invoiceConsideration,
  3949. zeroCostFlag: row.zeroCostFlag,
  3950. planningMethod: row.planningMethod,
  3951. planningMethodDesc: row.planningMethodDesc,
  3952. safetyStock: row.safetyStock,
  3953. minOrderQty: row.minOrderQty,
  3954. maxOrderQty: row.maxOrderQty,
  3955. mulOrderQty: row.mulOrderQty,
  3956. safetyLeadTime: row.safetyLeadTime,
  3957. shrinkageFac: row.shrinkageFac,
  3958. stdOrderQty: row.stdOrderQty,
  3959. cumLeadTime: row.cumLeadTime,
  3960. backFlushPart: row.backFlushPart,
  3961. byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
  3962. unprotectedLeadTime: row.unprotectedLeadTime,
  3963. issueType: row.issueType,
  3964. mrpControlFlagDb: row.mrpControlFlagDb,
  3965. fixedLeadTimeDay: row.fixedLeadTimeDay,
  3966. overReporting: row.overReporting,
  3967. useTheoreticalDensityDb: row.useTheoreticalDensityDb,
  3968. variableLeadTimeDay: row.variableLeadTimeDay,
  3969. overReportTolerance: row.overReportTolerance,
  3970. fixedLeadTimeHour: row.fixedLeadTimeHour,
  3971. density: row.density,
  3972. variableLeadTimeHour: row.variableLeadTimeHour,
  3973. createDate: row.createDate,
  3974. bomAlternativeList: [],
  3975. routingAlternativeList: [],
  3976. ifsPartNo: ''
  3977. }
  3978. // 查出该物料的BOM和routing的替代
  3979. this.getBomAndRoutingList()
  3980. this.inventoryPartTable = 'General'
  3981. this.modalDisableFlag = true
  3982. this.modalFlag = true
  3983. },
  3984. // 查出该物料的BOM和routing的替代
  3985. getBomAndRoutingList () {
  3986. getBomAndRoutingList(this.modalData).then(({data}) => {
  3987. if (data && data.code === 0) {
  3988. this.bomAlternativeList = data.rows.bomList
  3989. this.routingAlternativeList = data.rows.routingList
  3990. this.defaultChecked()
  3991. } else {
  3992. this.bomAlternativeList = []
  3993. this.routingAlternativeList = []
  3994. }
  3995. })
  3996. },
  3997. selectionBomAlternative (val) {
  3998. this.bomAlternativeSelections = val
  3999. },
  4000. selectionRoutingAlternative (val) {
  4001. this.routingAlternativeSelections = val
  4002. },
  4003. /**
  4004. * 选择代理商
  4005. */
  4006. getAgentList () {
  4007. // // 先清空缓存选中
  4008. // this.$nextTick(() => this.$refs.agentTable.clearSelection())
  4009. // // 拿到选中的代理商id
  4010. // let tempDataList = this.modalData.agentId.split(';')
  4011. // 查询所有代理商
  4012. getAgentListBy(this.agentData).then(({data}) => {
  4013. if (data && data.code === 0) {
  4014. this.agentList1 = data.rows
  4015. // this.agentList.forEach(val => {
  4016. // // 回显选中的代理商
  4017. // if (tempDataList.includes(val.agentId)) {
  4018. // this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
  4019. // }
  4020. // })
  4021. // this.agentModelFlag = true
  4022. } else {
  4023. this.$alert(data.msg, '错误', {
  4024. confirmButtonText: '确定'
  4025. })
  4026. }
  4027. })
  4028. },
  4029. /**
  4030. * 代理商多选
  4031. * @param row
  4032. */
  4033. agentClickRow (row) {
  4034. this.$refs.agentTable.toggleRowSelection(row);
  4035. },
  4036. /**
  4037. * 获得选中的代理商
  4038. * @param val
  4039. */
  4040. selectionAgent (val) {
  4041. this.agentSelections = val
  4042. },
  4043. /**
  4044. * 返回列表唯一值
  4045. * @param row
  4046. * @returns {string|[{trigger: string, message: string, required: boolean}]|*}
  4047. */
  4048. getRowKeys (row) {
  4049. // 唯一值,一般都为id
  4050. return row.agentId
  4051. },
  4052. /**
  4053. * 确认多选代理商
  4054. * @returns {boolean}
  4055. */
  4056. confirmAgent () {
  4057. this.modalData.agentId = ''
  4058. this.modalData.agentName = ''
  4059. for (let i = 0; i < this.agentSelections.length; i++) {
  4060. this.modalData.agentId = this.modalData.agentId + ";" + this.agentSelections[i].agentId
  4061. this.modalData.agentName = this.modalData.agentName + ";" + this.agentSelections[i].agentName
  4062. }
  4063. this.modalData.agentId = this.modalData.agentId.substring(1)
  4064. this.modalData.agentName = this.modalData.agentName.substring(1)
  4065. this.agentModelFlag = false
  4066. },
  4067. savePartAgent () {
  4068. this.agentSelections1 = null
  4069. this.agentSelections2 = null
  4070. getAgentList(this.partCurrentRow).then(({data}) => {
  4071. this.agentList1 = data.row1
  4072. this.agentList2 = data.row2
  4073. })
  4074. this.agentData = {
  4075. site: this.$store.state.user.site,
  4076. agentId: '',
  4077. agentName: '',
  4078. }
  4079. this.agentModelFlag = true
  4080. },
  4081. // 可选代理商
  4082. agentClickRow1 (row) {
  4083. this.$refs.agentTable1.toggleRowSelection(row)
  4084. },
  4085. // 已有代理商
  4086. agentClickRow2 (row) {
  4087. this.$refs.agentTable2.toggleRowSelection(row)
  4088. },
  4089. selectionAgent1 (val) {
  4090. this.agentSelections1 = val
  4091. },
  4092. selectionAgent2 (val) {
  4093. this.agentSelections2 = val
  4094. },
  4095. // 添加代理商
  4096. addAgent () {
  4097. if (this.agentSelections1 == null || this.agentSelections1.length === 0) {
  4098. this.$message.warning('请选择可选代理商!')
  4099. return
  4100. }
  4101. let inData = {
  4102. site: this.$store.state.user.site,
  4103. partNo: this.partCurrentRow.partNo,
  4104. agentList: this.agentSelections1
  4105. }
  4106. addPartAgent(inData).then(({data}) => {
  4107. if (data && data.code === 0) {
  4108. getAgentList(this.partCurrentRow).then(({data}) => {
  4109. this.agentList1 = data.row1
  4110. this.agentList2 = data.row2
  4111. })
  4112. this.agentSelections1 = []
  4113. } else {
  4114. this.$alert(data.msg, '错误', {
  4115. confirmButtonText: '确定'
  4116. })
  4117. }
  4118. })
  4119. },
  4120. // 删除物料代理商
  4121. deleteAgent () {
  4122. if(this.agentSelections2 == null || this.agentSelections2.length === 0){
  4123. this.$message.warning('请选择已有代理商!')
  4124. return
  4125. }
  4126. let inData = {
  4127. site: this.$store.state.user.site,
  4128. partNo: this.partCurrentRow.partNo,
  4129. agentList: this.agentSelections2
  4130. }
  4131. deletePartAgent(inData).then(({data}) => {
  4132. if (data && data.code === 0) {
  4133. getAgentList(this.partCurrentRow).then(({data}) => {
  4134. this.agentList1 = data.row1
  4135. this.agentList2 = data.row2
  4136. })
  4137. this.agentSelections2 = []
  4138. } else {
  4139. this.$alert(data.msg, '错误', {
  4140. confirmButtonText: '确定'
  4141. })
  4142. }
  4143. })
  4144. },
  4145. // 单删
  4146. deleteAgent2 (row) {
  4147. this.$confirm(`是否删除该代理商?`, '提示', {
  4148. confirmButtonText: '确定',
  4149. cancelButtonText: '取消',
  4150. type: 'warning'
  4151. }).then(() => {
  4152. deleteAgent(row).then(({data}) => {
  4153. if (data && data.code === 0) {
  4154. this.getPartAgent()
  4155. this.$message({
  4156. message: '操作成功',
  4157. type: 'success',
  4158. duration: 1500,
  4159. onClose: () => {}
  4160. })
  4161. } else {
  4162. this.$alert(data.msg, '错误', {
  4163. confirmButtonText: '确定'
  4164. })
  4165. }
  4166. })
  4167. }).catch(() => {
  4168. })
  4169. },
  4170. /**
  4171. * 选择制造商
  4172. */
  4173. getManufacturerList () {
  4174. // // 先清空缓存选中
  4175. // this.$nextTick(() => this.$refs.agentTable.clearSelection())
  4176. // // 拿到选中的代理商id
  4177. // let tempDataList = this.modalData.agentId.split(';')
  4178. // 查询所有代理商
  4179. getManufacturerListBy(this.manufacturerData).then(({data}) => {
  4180. if (data && data.code === 0) {
  4181. this.manufacturerList1 = data.rows
  4182. // this.agentList.forEach(val => {
  4183. // // 回显选中的代理商
  4184. // if (tempDataList.includes(val.agentId)) {
  4185. // this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
  4186. // }
  4187. // })
  4188. // this.agentModelFlag = true
  4189. } else {
  4190. this.$alert(data.msg, '错误', {
  4191. confirmButtonText: '确定'
  4192. })
  4193. }
  4194. })
  4195. },
  4196. /**
  4197. * 选择默认库位
  4198. */
  4199. getLocationList () {
  4200. // 查询所有库位
  4201. getLocationListBy(this.locationData).then(({data}) => {
  4202. if (data && data.code === 0) {
  4203. this.locationList1 = data.rows
  4204. } else {
  4205. this.$alert(data.msg, '错误', {
  4206. confirmButtonText: '确定'
  4207. })
  4208. }
  4209. })
  4210. },
  4211. /**
  4212. * 制造商多选
  4213. * @param row
  4214. */
  4215. manufacturerClickRow (row) {
  4216. this.$refs.manufacturerTable.toggleRowSelection(row);
  4217. },
  4218. /**
  4219. * 获得选中的制造商
  4220. * @param val
  4221. */
  4222. selectionManufacturer (val) {
  4223. this.manufacturerSelections = val
  4224. },
  4225. /**
  4226. * 返回列表唯一值
  4227. * @param row
  4228. * @returns {string|[{trigger: string, message: string, required: boolean}]|*}
  4229. */
  4230. getRowKeys2 (row) {
  4231. // 唯一值,一般都为id
  4232. return row.manufacturerId
  4233. },
  4234. /**
  4235. * 确认多选制造商
  4236. * @returns {boolean}
  4237. */
  4238. confirmManufacturer () {
  4239. this.modalData.manufacturerId = ''
  4240. this.modalData.manufacturerName = ''
  4241. for (let i = 0; i < this.manufacturerSelections.length; i++) {
  4242. this.modalData.manufacturerId = this.modalData.manufacturerId + ";" + this.manufacturerSelections[i].manufacturerId
  4243. this.modalData.manufacturerName = this.modalData.manufacturerName + ";" + this.agentSelections[i].manufacturerName
  4244. }
  4245. this.modalData.manufacturerId = this.modalData.manufacturerId.substring(1)
  4246. this.modalData.manufacturerName = this.modalData.manufacturerName.substring(1)
  4247. this.manufacturerModelFlag = false
  4248. },
  4249. savePartManufacturer () {
  4250. this.manufacturerSelections1 = null
  4251. this.manufacturerSelections2 = null
  4252. getManufacturerList(this.partCurrentRow).then(({data}) => {
  4253. this.manufacturerList1 = data.row1
  4254. this.manufacturerList2 = data.row2
  4255. })
  4256. this.manufacturerData = {
  4257. site: this.$store.state.user.site,
  4258. manufacturerId: '',
  4259. manufacturerName: '',
  4260. }
  4261. this.manufacturerModelFlag = true
  4262. },
  4263. // 可选制造商
  4264. manufacturerClickRow1 (row) {
  4265. this.$refs.manufacturerTable1.toggleRowSelection(row)
  4266. },
  4267. // 已有制造商
  4268. manufacturerClickRow2 (row) {
  4269. this.$refs.manufacturerTable2.toggleRowSelection(row)
  4270. },
  4271. selectionManufacturer1 (val) {
  4272. this.manufacturerSelections1 = val
  4273. },
  4274. selectionManufacturer2 (val) {
  4275. this.manufacturerSelections2 = val
  4276. },
  4277. // 添加制造商
  4278. addManufacturer () {
  4279. if (this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0) {
  4280. this.$message.warning('请选择可选制造商!')
  4281. return
  4282. }
  4283. let inData = {
  4284. site: this.$store.state.user.site,
  4285. partNo: this.partCurrentRow.partNo,
  4286. manufacturerList: this.manufacturerSelections1
  4287. }
  4288. addPartManufacturer(inData).then(({data}) => {
  4289. if (data && data.code === 0) {
  4290. getManufacturerList(this.partCurrentRow).then(({data}) => {
  4291. this.manufacturerList1 = data.row1
  4292. this.manufacturerList2 = data.row2
  4293. })
  4294. this.manufacturerSelections1 = []
  4295. } else {
  4296. this.$alert(data.msg, '错误', {
  4297. confirmButtonText: '确定'
  4298. })
  4299. }
  4300. })
  4301. },
  4302. // 删除物料制造商
  4303. deleteManufacturer () {
  4304. if (this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0) {
  4305. this.$message.warning('请选择已有制造商!')
  4306. return
  4307. }
  4308. let inData = {
  4309. site: this.$store.state.user.site,
  4310. partNo: this.partCurrentRow.partNo,
  4311. manufacturerList: this.manufacturerSelections2
  4312. }
  4313. deletePartManufacturer(inData).then(({data}) => {
  4314. if (data && data.code === 0) {
  4315. getManufacturerList(this.partCurrentRow).then(({data}) => {
  4316. this.manufacturerList1 = data.row1
  4317. this.manufacturerList2 = data.row2
  4318. })
  4319. this.manufacturerSelections2 = []
  4320. } else {
  4321. this.$alert(data.msg, '错误', {
  4322. confirmButtonText: '确定'
  4323. })
  4324. }
  4325. })
  4326. },
  4327. // 单删
  4328. deleteManufacturer2 (row) {
  4329. this.$confirm(`是否删除该制造商?`, '提示', {
  4330. confirmButtonText: '确定',
  4331. cancelButtonText: '取消',
  4332. type: 'warning'
  4333. }).then(() => {
  4334. deleteManufacturer(row).then(({data}) => {
  4335. if (data && data.code === 0) {
  4336. this.getPartManufacturer()
  4337. this.$message({
  4338. message: '操作成功',
  4339. type: 'success',
  4340. duration: 1500,
  4341. onClose: () => {}
  4342. })
  4343. } else {
  4344. this.$alert(data.msg, '错误', {
  4345. confirmButtonText: '确定'
  4346. })
  4347. }
  4348. })
  4349. }).catch(() => {
  4350. })
  4351. },
  4352. saveDefaultLocation () {
  4353. this.locationSelections1 = null
  4354. this.locationSelections2 = null
  4355. getLocationList(this.partCurrentRow).then(({data}) => {
  4356. this.locationList1 = data.row1
  4357. this.locationList2 = data.row2
  4358. })
  4359. this.locationData = {
  4360. site: this.$store.state.user.site,
  4361. locationId: '',
  4362. locationName: '',
  4363. }
  4364. this.locationModelFlag = true
  4365. },
  4366. // 可选库位
  4367. locationClickRow1 (row) {
  4368. this.$refs.locationTable1.toggleRowSelection(row)
  4369. },
  4370. // 已有库位
  4371. locationClickRow2 (row) {
  4372. this.$refs.locationTable2.toggleRowSelection(row)
  4373. },
  4374. selectionLocation1 (val) {
  4375. this.locationSelections1 = val
  4376. },
  4377. selectionLocation2 (val) {
  4378. this.locationSelections2 = val
  4379. },
  4380. // 添加库位
  4381. addLocation () {
  4382. if (this.locationSelections1 == null || this.locationSelections1.length === 0) {
  4383. this.$message.warning('请选择可选库位!')
  4384. return
  4385. }
  4386. let inData = {
  4387. site: this.$store.state.user.site,
  4388. partNo: this.partCurrentRow.partNo,
  4389. locationList: this.locationSelections1
  4390. }
  4391. addDefaultLocation(inData).then(({data}) => {
  4392. if (data && data.code === 0) {
  4393. getLocationList(this.partCurrentRow).then(({data}) => {
  4394. this.locationList1 = data.row1
  4395. this.locationList2 = data.row2
  4396. })
  4397. this.locationSelections1 = []
  4398. } else {
  4399. this.$alert(data.msg, '错误', {
  4400. confirmButtonText: '确定'
  4401. })
  4402. }
  4403. })
  4404. },
  4405. // 删除库位
  4406. deleteLocation () {
  4407. if (this.locationSelections2 == null || this.locationSelections2.length === 0) {
  4408. this.$message.warning('请选择已有库位!')
  4409. return
  4410. }
  4411. let inData = {
  4412. site: this.$store.state.user.site,
  4413. partNo: this.partCurrentRow.partNo,
  4414. locationList: this.locationSelections2
  4415. }
  4416. deleteDefaultLocation(inData).then(({data}) => {
  4417. if (data && data.code === 0) {
  4418. getLocationList(this.partCurrentRow).then(({data}) => {
  4419. this.locationList1 = data.row1
  4420. this.locationList2 = data.row2
  4421. })
  4422. this.locationSelections2 = []
  4423. } else {
  4424. this.$alert(data.msg, '错误', {
  4425. confirmButtonText: '确定'
  4426. })
  4427. }
  4428. })
  4429. },
  4430. // 单删
  4431. deleteLocation2 (row) {
  4432. this.$confirm(`是否删除该库位?`, '提示', {
  4433. confirmButtonText: '确定',
  4434. cancelButtonText: '取消',
  4435. type: 'warning'
  4436. }).then(() => {
  4437. deleteLocation(row).then(({data}) => {
  4438. if (data && data.code === 0) {
  4439. this.getDefaultLocation()
  4440. this.$message({
  4441. message: '操作成功',
  4442. type: 'success',
  4443. duration: 1500,
  4444. onClose: () => {}
  4445. })
  4446. } else {
  4447. this.$alert(data.msg, '错误', {
  4448. confirmButtonText: '确定'
  4449. })
  4450. }
  4451. })
  4452. }).catch(() => {
  4453. })
  4454. },
  4455. // 关闭后刷新列表
  4456. refreshDetailList () {
  4457. this.getPartAgent()
  4458. this.getPartManufacturer()
  4459. this.getDefaultLocation()
  4460. },
  4461. // ======== 新增/编辑/删除方法 ========
  4462. /**
  4463. * 物料信息新增/编辑
  4464. */
  4465. saveData () {
  4466. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  4467. this.$message.warning('请填写物料编码!')
  4468. return
  4469. }
  4470. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  4471. this.$message.warning('请填写物料描述!')
  4472. return
  4473. }
  4474. if (this.modalData.partType === '' || this.modalData.partType == null) {
  4475. this.$message.warning('请选择零件类型!')
  4476. return
  4477. }
  4478. if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) {
  4479. this.$message.warning('请选择计划人!')
  4480. return
  4481. }
  4482. if (this.modalData.umId === '' || this.modalData.umId == null) {
  4483. this.$message.warning('请选择计量单位!')
  4484. return
  4485. }
  4486. if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
  4487. this.$message.warning('请选择属性模板!')
  4488. return
  4489. }
  4490. if (this.modalData.flag === '3' && (this.modalData.planningMethod == null || this.modalData.planningMethod === '')) {
  4491. this.$message.warning('请选择计划方法!')
  4492. return
  4493. }
  4494. if (this.modalData.flag === '1') {
  4495. this.saveLoading = true
  4496. partInformationSave(this.modalData).then(({data}) => {
  4497. if (data && data.code === 0) {
  4498. this.getDataList()
  4499. this.modalFlag = false
  4500. this.$message({
  4501. message: '操作成功',
  4502. type: 'success',
  4503. duration: 1500,
  4504. onClose: () => {}
  4505. })
  4506. } else {
  4507. this.$alert(data.msg, '错误', {
  4508. confirmButtonText: '确定'
  4509. })
  4510. }
  4511. this.saveLoading = false
  4512. }).catch(()=>{
  4513. this.saveLoading = false
  4514. })
  4515. } else if (this.modalData.flag === '3') { // 转正式物料
  4516. if (this.modalData.ifsPartNo === '' || this.modalData.ifsPartNo == null) {
  4517. this.$message.warning('请填写IFS物料编码!')
  4518. return
  4519. }
  4520. if (this.modalData.partNo === this.modalData.ifsPartNo) {
  4521. this.$message.warning('IFS物料编码不能等于PLM物料编码!')
  4522. return
  4523. }
  4524. this.saveLoading = true
  4525. this.modalData.bomAlternativeList = this.bomAlternativeSelections
  4526. this.modalData.routingAlternativeList = this.routingAlternativeSelections
  4527. partInformationToOfficial(this.modalData).then(({data}) => {
  4528. if (data && data.code === 0) {
  4529. this.getDataList()
  4530. this.modalFlag = false
  4531. this.$message({
  4532. message: '操作成功',
  4533. type: 'success',
  4534. duration: 1500,
  4535. onClose: () => {}
  4536. })
  4537. } else {
  4538. this.$alert(data.msg, '错误', {
  4539. confirmButtonText: '确定'
  4540. })
  4541. }
  4542. this.saveLoading = false
  4543. }).catch(()=>{
  4544. this.saveLoading = false
  4545. })
  4546. } else {
  4547. this.saveLoading = true
  4548. partInformationEdit(this.modalData).then(({data}) => {
  4549. if (data && data.code === 0) {
  4550. this.getDataList()
  4551. this.modalFlag = false
  4552. this.$message({
  4553. message: '操作成功',
  4554. type: 'success',
  4555. duration: 1500,
  4556. onClose: () => {}
  4557. })
  4558. } else {
  4559. this.$alert(data.msg, '错误', {
  4560. confirmButtonText: '确定'
  4561. })
  4562. }
  4563. this.saveLoading = false
  4564. }).catch(()=>{
  4565. this.saveLoading = false
  4566. })
  4567. }
  4568. },
  4569. /**
  4570. * 物料信息删除
  4571. */
  4572. delModal () {
  4573. if (this.partSelections.length === 0) {
  4574. this.$message.warning('请勾选要删除的物料信息!')
  4575. return
  4576. }
  4577. this.$confirm(`是否删除这 `+ this.partSelections.length +` 条物料信息?`, '提示', {
  4578. confirmButtonText: '确定',
  4579. cancelButtonText: '取消',
  4580. type: 'warning'
  4581. }).then(() => {
  4582. let tempData = {
  4583. informationList: this.partSelections
  4584. }
  4585. partInformationDelete(tempData).then(({data}) => {
  4586. if (data && data.code === 0) {
  4587. this.getDataList()
  4588. this.partSelections = []
  4589. this.$message({
  4590. message: '操作成功',
  4591. type: 'success',
  4592. duration: 1500,
  4593. onClose: () => {}
  4594. })
  4595. } else {
  4596. this.$alert(data.msg, '错误', {
  4597. confirmButtonText: '确定'
  4598. })
  4599. }
  4600. })
  4601. }).catch(() => {
  4602. })
  4603. },
  4604. // 复制物料的模态框
  4605. toCopyPartModal () {
  4606. this.copyPartData = {
  4607. site: this.modalData.site,
  4608. partNo: this.modalData.partNo,
  4609. partDesc: this.modalData.partDesc,
  4610. copyGeneral: 'Y',
  4611. copyCosts: '',
  4612. copyPlanningData: '',
  4613. copyManufacturing: '',
  4614. copyDefaultLocation: '',
  4615. copyRevision: '',
  4616. previousVersion: this.modalData,
  4617. createBy: this.$store.state.user.name
  4618. }
  4619. this.copyPartModelFlag = true
  4620. },
  4621. // 复制物料的方法
  4622. copyPart () {
  4623. if (this.copyPartData.partNo === '' || this.copyPartData.partNo == null) {
  4624. this.$message.warning('请输入物料编码!')
  4625. return
  4626. }
  4627. if (this.copyPartData.partDesc === '' || this.copyPartData.partDesc == null) {
  4628. this.$message.warning('请输入物料名称!')
  4629. return
  4630. }
  4631. if (this.copyPartData.copyGeneral === '' || this.copyPartData.copyGeneral == null) {
  4632. this.$message.warning('General信息必选!')
  4633. return
  4634. }
  4635. copyPart(this.copyPartData).then(({data}) => {
  4636. if (data && data.code === 0) {
  4637. this.getDataList()
  4638. this.copyPartModelFlag = false
  4639. this.$message({
  4640. message: '操作成功',
  4641. type: 'success',
  4642. duration: 1500,
  4643. onClose: () => {}
  4644. })
  4645. } else {
  4646. this.$alert(data.msg, '错误', {
  4647. confirmButtonText: '确定'
  4648. })
  4649. }
  4650. })
  4651. },
  4652. // 安全代码输入校验
  4653. hazardCodeBlur (tagNo) {
  4654. if (this.modalData.hazardCode != null && this.modalData.hazardCode !== '') {
  4655. let tempData = {
  4656. tagno: tagNo,
  4657. conditionSql: " and hazard_code = '" + this.modalData.hazardCode + "'" + " and site = '" + this.modalData.site + "'"
  4658. }
  4659. verifyData(tempData).then(({data}) => {
  4660. if (data && data.code === 0) {
  4661. if (data.baseListData.length > 0) {
  4662. this.modalData.hazardCode = data.baseListData[0].hazard_code
  4663. this.modalData.hazardDesc = data.baseListData[0].hazard_desc
  4664. return
  4665. }
  4666. }
  4667. })
  4668. }
  4669. this.modalData.hazardDesc = ''
  4670. },
  4671. // 计划人输入校验
  4672. productGroupId4Blur (tagNo) {
  4673. if (this.modalData.productGroupId4 != null && this.modalData.productGroupId4 !== '') {
  4674. let tempData = {
  4675. tagno: tagNo,
  4676. conditionSql: " and product_group_id = '" + this.modalData.productGroupId4 + "'" + " and site = '" + this.modalData.site + "'"
  4677. }
  4678. verifyData(tempData).then(({data}) => {
  4679. if (data && data.code === 0) {
  4680. if (data.baseListData.length > 0) {
  4681. this.modalData.productGroupId4 = data.baseListData[0].product_group_id
  4682. this.modalData.productGroupName4 = data.baseListData[0].product_group_name
  4683. return
  4684. }
  4685. }
  4686. })
  4687. }
  4688. this.modalData.productGroupName4 = ''
  4689. },
  4690. // 会计组输入校验
  4691. productGroupId3Blur (tagNo) {
  4692. if (this.modalData.productGroupId3 != null && this.modalData.productGroupId3 !== '') {
  4693. let tempData = {
  4694. tagno: tagNo,
  4695. conditionSql: " and product_group_id = '" + this.modalData.productGroupId3 + "'" + " and site = '" + this.modalData.site + "'"
  4696. }
  4697. verifyData(tempData).then(({data}) => {
  4698. if (data && data.code === 0) {
  4699. if (data.baseListData.length > 0) {
  4700. this.modalData.productGroupId3 = data.baseListData[0].product_group_id
  4701. this.modalData.productGroupName3 = data.baseListData[0].product_group_name
  4702. return
  4703. }
  4704. }
  4705. })
  4706. }
  4707. this.modalData.productGroupName3 = ''
  4708. },
  4709. // 计量单位输入校验
  4710. umIdBlur (tagNo) {
  4711. if (this.modalData.umId != null && this.modalData.umId !== '') {
  4712. let tempData = {
  4713. tagno: tagNo,
  4714. conditionSql: " and um_id = '" + this.modalData.umId + "'"
  4715. }
  4716. verifyData(tempData).then(({data}) => {
  4717. if (data && data.code === 0) {
  4718. if (data.baseListData.length > 0) {
  4719. this.modalData.umId = data.baseListData[0].um_id
  4720. this.modalData.umName = data.baseListData[0].um_name
  4721. return
  4722. }
  4723. }
  4724. })
  4725. }
  4726. this.modalData.umName = ''
  4727. },
  4728. // 产品代码输入校验
  4729. groupIdBlur (tagNo) {
  4730. if (this.modalData.groupId != null && this.modalData.groupId !== '') {
  4731. let tempData = {
  4732. tagno: tagNo,
  4733. conditionSql: " and group_id = '" + this.modalData.groupId + "'" + " and site = '" + this.modalData.site + "'"
  4734. }
  4735. verifyData(tempData).then(({data}) => {
  4736. if (data && data.code === 0) {
  4737. if (data.baseListData.length > 0) {
  4738. this.modalData.groupId = data.baseListData[0].group_id
  4739. this.modalData.groupName = data.baseListData[0].group_name
  4740. return
  4741. }
  4742. }
  4743. })
  4744. }
  4745. this.modalData.groupName = ''
  4746. },
  4747. // 商品组1输入校验
  4748. productGroupId1Blur (tagNo) {
  4749. if (this.modalData.productGroupId1 != null && this.modalData.productGroupId1 !== '') {
  4750. let tempData = {
  4751. tagno: tagNo,
  4752. conditionSql: " and product_group_id = '" + this.modalData.productGroupId1 + "'" + " and site = '" + this.modalData.site + "'"
  4753. }
  4754. verifyData(tempData).then(({data}) => {
  4755. if (data && data.code === 0) {
  4756. if (data.baseListData.length > 0) {
  4757. this.modalData.productGroupId1 = data.baseListData[0].product_group_id
  4758. this.modalData.productGroupName1 = data.baseListData[0].product_group_name
  4759. return
  4760. }
  4761. }
  4762. })
  4763. }
  4764. this.modalData.productGroupName1 = ''
  4765. },
  4766. // 产品大类输入校验
  4767. familyIdBlur (tagNo) {
  4768. if (this.modalData.familyId != null && this.modalData.familyId !== '') {
  4769. let tempData = {
  4770. tagno: tagNo,
  4771. conditionSql: " and family_id = '" + this.modalData.familyId + "'" + " and site = '" + this.modalData.site + "'"
  4772. }
  4773. verifyData(tempData).then(({data}) => {
  4774. if (data && data.code === 0) {
  4775. if (data.baseListData.length > 0) {
  4776. this.modalData.familyId = data.baseListData[0].family_id
  4777. this.modalData.familyName = data.baseListData[0].family_name
  4778. return
  4779. }
  4780. }
  4781. })
  4782. }
  4783. this.modalData.familyName = ''
  4784. },
  4785. // 商品组2输入校验
  4786. productGroupId2Blur (tagNo) {
  4787. if (this.modalData.productGroupId2 != null && this.modalData.productGroupId2 !== '') {
  4788. let tempData = {
  4789. tagno: tagNo,
  4790. conditionSql: " and product_group_id = '" + this.modalData.productGroupId2 + "'" + " and site = '" + this.modalData.site + "'"
  4791. }
  4792. verifyData(tempData).then(({data}) => {
  4793. if (data && data.code === 0) {
  4794. if (data.baseListData.length > 0) {
  4795. this.modalData.productGroupId2 = data.baseListData[0].product_group_id
  4796. this.modalData.productGroupName2 = data.baseListData[0].product_group_name
  4797. return
  4798. }
  4799. }
  4800. })
  4801. }
  4802. this.modalData.productGroupName2 = ''
  4803. },
  4804. // 资产等级输入校验
  4805. assetClassBlur (tagNo) {
  4806. if (this.modalData.assetClass != null && this.modalData.assetClass !== '') {
  4807. let tempData = {
  4808. tagno: tagNo,
  4809. conditionSql: " and asset_class = '" + this.modalData.assetClass + "'" + " and site = '" + this.modalData.site + "'"
  4810. }
  4811. verifyData(tempData).then(({data}) => {
  4812. if (data && data.code === 0) {
  4813. if (data.baseListData.length > 0) {
  4814. this.modalData.assetClass = data.baseListData[0].asset_class
  4815. this.modalData.assetClassDesc = data.baseListData[0].asset_class_desc
  4816. return
  4817. }
  4818. }
  4819. })
  4820. }
  4821. this.modalData.assetClassDesc = ''
  4822. },
  4823. // 零件状态输入校验
  4824. partStatusBlur (tagNo) {
  4825. if (this.modalData.partStatus != null && this.modalData.partStatus !== '') {
  4826. let tempData = {
  4827. tagno: tagNo,
  4828. conditionSql: " and part_status = '" + this.modalData.partStatus + "'" + " and site = '" + this.modalData.site + "'"
  4829. }
  4830. verifyData(tempData).then(({data}) => {
  4831. if (data && data.code === 0) {
  4832. if (data.baseListData.length > 0) {
  4833. this.modalData.partStatus = data.baseListData[0].part_status
  4834. this.modalData.partStatusDesc = data.baseListData[0].part_status_desc
  4835. return
  4836. }
  4837. }
  4838. })
  4839. }
  4840. this.modalData.partStatusDesc = ''
  4841. },
  4842. // abc类输入校验
  4843. abcClassBlur (tagNo) {
  4844. if (this.modalData.abcClass != null && this.modalData.abcClass !== '') {
  4845. let tempData = {
  4846. tagno: tagNo,
  4847. conditionSql: " and abc_class = '" + this.modalData.abcClass + "'" + " and site = '" + this.modalData.site + "'"
  4848. }
  4849. verifyData(tempData).then(({data}) => {
  4850. if (data && data.code === 0) {
  4851. if (data.baseListData.length > 0) {
  4852. this.modalData.abcClass = data.baseListData[0].abc_class
  4853. this.modalData.abcClassDesc = data.baseListData[0].abc_class_desc
  4854. return
  4855. }
  4856. }
  4857. })
  4858. }
  4859. this.modalData.abcClassDesc = ''
  4860. },
  4861. // 属性模板输入校验
  4862. codeNoBlur (tagNo) {
  4863. if (this.modalData.codeNo != null && this.modalData.codeNo !== '') {
  4864. let tempData = {
  4865. tagno: tagNo,
  4866. conditionSql: " and Code_no = '" + this.modalData.codeNo + "'" + " and site = '" + this.modalData.site + "'"
  4867. }
  4868. verifyData(tempData).then(({data}) => {
  4869. if (data && data.code === 0) {
  4870. if (data.baseListData.length > 0) {
  4871. this.modalData.codeNo = data.baseListData[0].Code_no
  4872. this.modalData.codeDesc = data.baseListData[0].Code_desc
  4873. return
  4874. }
  4875. }
  4876. })
  4877. }
  4878. this.modalData.codeDesc = ''
  4879. },
  4880. // 来源国家输入校验
  4881. countryOfOriginBlur (tagNo) {
  4882. if (this.modalData.countryOfOrigin != null && this.modalData.countryOfOrigin !== '') {
  4883. let tempData = {
  4884. tagno: tagNo,
  4885. conditionSql: " and country_of_origin = '" + this.modalData.countryOfOrigin + "'" + " and site = '" + this.modalData.site + "'"
  4886. }
  4887. verifyData(tempData).then(({data}) => {
  4888. if (data && data.code === 0) {
  4889. if (data.baseListData.length > 0) {
  4890. this.modalData.countryOfOrigin = data.baseListData[0].country_of_origin
  4891. this.modalData.countryOfOriginDesc = data.baseListData[0].country_of_origin_desc
  4892. return
  4893. }
  4894. }
  4895. })
  4896. }
  4897. this.modalData.countryOfOriginDesc = ''
  4898. },
  4899. // 区域代码输入校验
  4900. regionOfOriginBlur (tagNo) {
  4901. if (this.modalData.regionOfOrigin != null && this.modalData.regionOfOrigin !== '') {
  4902. let tempData = {
  4903. tagno: tagNo,
  4904. conditionSql: " and region_of_origin = '" + this.modalData.regionOfOrigin + "'" + " and site = '" + this.modalData.site + "'"
  4905. }
  4906. verifyData(tempData).then(({data}) => {
  4907. if (data && data.code === 0) {
  4908. if (data.baseListData.length > 0) {
  4909. this.modalData.regionOfOrigin = data.baseListData[0].region_of_origin
  4910. this.modalData.regionOfOriginDesc = data.baseListData[0].region_of_origin_desc
  4911. return
  4912. }
  4913. }
  4914. })
  4915. }
  4916. this.modalData.regionOfOriginDesc = ''
  4917. },
  4918. // 海关统计序号输入校验
  4919. customsStatNoBlur (tagNo) {
  4920. if (this.modalData.customsStatNo != null && this.modalData.customsStatNo !== '') {
  4921. let tempData = {
  4922. tagno: tagNo,
  4923. conditionSql: " and customs_stat_no = '" + this.modalData.customsStatNo + "'" + " and site = '" + this.modalData.site + "'"
  4924. }
  4925. verifyData(tempData).then(({data}) => {
  4926. if (data && data.code === 0) {
  4927. if (data.baseListData.length > 0) {
  4928. this.modalData.customsStatNo = data.baseListData[0].customs_stat_no
  4929. this.modalData.customsStatDesc = data.baseListData[0].customs_stat_desc
  4930. return
  4931. }
  4932. }
  4933. })
  4934. }
  4935. this.modalData.customsStatDesc = ''
  4936. },
  4937. // 零件成本组输入校验
  4938. partCostGroupIdBlur (tagNo) {
  4939. if (this.modalData.partCostGroupId != null && this.modalData.partCostGroupId !== '') {
  4940. let tempData = {
  4941. tagno: tagNo,
  4942. conditionSql: " and part_cost_group_id = '" + this.modalData.partCostGroupId + "'" + " and site = '" + this.modalData.site + "'"
  4943. }
  4944. verifyData(tempData).then(({data}) => {
  4945. if (data && data.code === 0) {
  4946. if (data.baseListData.length > 0) {
  4947. this.modalData.partCostGroupId = data.baseListData[0].part_cost_group_id
  4948. this.modalData.partCostGroupDesc = data.baseListData[0].part_cost_group_desc
  4949. return
  4950. }
  4951. }
  4952. })
  4953. }
  4954. this.modalData.partCostGroupDesc = ''
  4955. },
  4956. // 计划方法
  4957. planningMethodBlur (tagNo) {
  4958. if (this.modalData.planningMethod != null && this.modalData.planningMethod !== '') {
  4959. let tempData = {
  4960. tagno: tagNo,
  4961. conditionSql: " and planning_method = '" + this.modalData.planningMethod + "'" + " and site = '" + this.modalData.site + "'"
  4962. }
  4963. verifyData(tempData).then(({data}) => {
  4964. if (data && data.code === 0) {
  4965. if (data.baseListData.length > 0) {
  4966. this.modalData.planningMethod = data.baseListData[0].planning_method
  4967. this.modalData.planningMethodDesc = data.baseListData[0].planning_method_desc
  4968. return
  4969. }
  4970. }
  4971. })
  4972. }
  4973. this.modalData.planningMethodDesc = ''
  4974. },
  4975. // ======== 列表操作方法 ========
  4976. /**
  4977. * 单机选中物料信息
  4978. * @param row
  4979. */
  4980. partClickRow (row,column) {
  4981. // if (column.label === '操作'){
  4982. // return
  4983. // }
  4984. // this.$refs.partTable.toggleRowSelection(row)
  4985. this.partCurrentRow = JSON.parse(JSON.stringify(row))
  4986. },
  4987. /**
  4988. * 复选物料信息
  4989. * @param val
  4990. */
  4991. selectionPart (val) {
  4992. this.partSelections = val
  4993. this.$refs.selectDiv.setLengthselected(this.partSelections.length)
  4994. },
  4995. // 下一个物料编码
  4996. nextPartNo () {
  4997. if (this.modalData.ifsPartNo.length !== 3) {
  4998. this.$message.warning('IFS Part No的前缀必须是3位!')
  4999. return
  5000. }
  5001. getNextPartNo(this.modalData).then(({data}) => {
  5002. if (data && data.code === 0) {
  5003. this.modalData.ifsPartNo = data.rows
  5004. }
  5005. })
  5006. },
  5007. // ======== 属性页签相关方法 ========
  5008. // /**
  5009. // * 编辑属性值方法
  5010. // * @returns {boolean}
  5011. // */
  5012. // itemSaveData () {
  5013. // if(this.itemData.partNo === '' || this.itemData.partNo == null){
  5014. // this.$message.warning('未选择物料!')
  5015. // return false
  5016. // }
  5017. // if(this.itemData.propertiesItemNo === ''|| this.itemData.propertiesItemNo == null){
  5018. // this.$message.warning('未选择属性!')
  5019. // return false
  5020. // }
  5021. // savePartItemValue(this.itemData).then(({data}) => {
  5022. // if (data && data.code === 0) {
  5023. // this.itemModalFlag = false
  5024. // this.getPartItem()
  5025. // this.$message({
  5026. // message: '操作成功',
  5027. // type: 'success',
  5028. // duration: 1500,
  5029. // onClose: () => {}
  5030. // })
  5031. // } else {
  5032. // this.$alert(data.msg, '错误', {
  5033. // confirmButtonText: '确定'
  5034. // })
  5035. // }
  5036. // })
  5037. // },
  5038. // ======== 附件的相关方法 ========
  5039. /**
  5040. * 获取物料附件列表
  5041. */
  5042. getFileContentData () {
  5043. let currentData = {
  5044. orderRef1: this.$store.state.user.site,
  5045. orderRef2: this.partCurrentRow.partNo
  5046. }
  5047. getFileContentList(currentData).then(({data}) => {
  5048. if (data && data.code === 0) {
  5049. this.fileContentList = data.rows
  5050. } else {
  5051. this.fileContentList = []
  5052. }
  5053. })
  5054. },
  5055. /**
  5056. * 上传文件
  5057. */
  5058. uploadFile () {
  5059. let currentData = {
  5060. titleCon: '物料附件上传',
  5061. site: this.$store.state.user.site,
  5062. createBy: this.$store.state.user.name,
  5063. partNo: this.partCurrentRow.partNo
  5064. }
  5065. this.uploadDialog = true
  5066. //打开组件 去做新增业务
  5067. // this.$nextTick(() => {
  5068. // this.$refs.partUploadFile.init(currentData);
  5069. // })
  5070. },
  5071. /**
  5072. * 文件删除
  5073. * @param row
  5074. */
  5075. deleteFile (row) {
  5076. this.$confirm('确定要删除此文件?', '提示', {
  5077. confirmButtonText: '确定',
  5078. cancelButtonText: '取消',
  5079. type: 'warning'
  5080. }).then(() => {
  5081. deleteQuotationFile(row).then(({data}) => {
  5082. if (data && data.code === 0) {
  5083. this.getFileContentData()
  5084. this.$message({
  5085. message: '操作成功',
  5086. type: 'success',
  5087. duration: 1500,
  5088. onClose: () => {}
  5089. })
  5090. } else {
  5091. this.$alert(data.msg, '错误', {
  5092. confirmButtonText: '确定'
  5093. })
  5094. }
  5095. })
  5096. }).catch(() => {
  5097. })
  5098. },
  5099. /**
  5100. * 文件下载
  5101. * @param row
  5102. */
  5103. downloadFile (row) {
  5104. downLoadQuotationFile(row).then(({data}) => {
  5105. // 不限制文件下载类型
  5106. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  5107. // 下载文件名称
  5108. const fileName = row.fileName
  5109. // a标签下载
  5110. const linkNode = document.createElement('a')
  5111. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  5112. linkNode.style.display = 'none'
  5113. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  5114. document.body.appendChild(linkNode)
  5115. linkNode.click() // 模拟在按钮上的一次鼠标单击
  5116. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  5117. document.body.removeChild(linkNode)
  5118. })
  5119. },
  5120. // 预览
  5121. previewFile (row) {
  5122. // 预览文件
  5123. let image = ['jpg', 'jpeg', 'png', 'gif', 'bmp']
  5124. let type = ''
  5125. if (image.includes(row.fileType.toLowerCase())) {
  5126. type = 'image/' + row.fileType
  5127. }
  5128. let video = ['mp4', 'avi', 'mov', 'wmv', 'flv']
  5129. if (video.includes(row.fileType.toLowerCase())) {
  5130. type = 'video/' + row.fileType
  5131. }
  5132. let txt = ['txt']
  5133. if (txt.includes(row.fileType.toLowerCase())) {
  5134. type = 'text/plain'
  5135. }
  5136. let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx']
  5137. if (office.includes(row.fileType.toLowerCase())) {
  5138. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  5139. return
  5140. }
  5141. let pdf = ['pdf']
  5142. if (pdf.includes(row.fileType.toLowerCase())) {
  5143. type = 'application/pdf'
  5144. }
  5145. if (type === ''){
  5146. this.$message.warning(`暂不支持预览${row.fileType.toLowerCase()}文件`)
  5147. return;
  5148. }
  5149. downLoadQuotationFile(row).then(({data}) => {
  5150. const blob = new Blob([data], { type: type });
  5151. // 创建URL来生成预览
  5152. const fileURL = URL.createObjectURL(blob);
  5153. // 在新标签页中打开文件预览
  5154. const newTab = window.open(fileURL, '_blank')
  5155. })
  5156. },
  5157. // ======== chooseList相关方法 ========
  5158. /**
  5159. * 获取基础数据列表S
  5160. * @param val
  5161. * @param type
  5162. */
  5163. getBaseList (val, type) {
  5164. this.tagNo = val
  5165. this.tempCodeNo = this.modalData.codeNo
  5166. this.$nextTick(() => {
  5167. let strVal = ''
  5168. if (val === 1007) {
  5169. strVal = this.modalData.umId
  5170. } else if (val === 108) {
  5171. strVal = this.modalData.familyId
  5172. } else if (val === 109) {
  5173. strVal = this.modalData.groupId
  5174. } else if (val === 110) {
  5175. strVal = this.modalData.productGroupId1
  5176. } else if (val === 111) {
  5177. strVal = this.modalData.productGroupId2
  5178. } else if (val === 112) {
  5179. strVal = this.modalData.productGroupId3
  5180. } else if (val === 113) {
  5181. strVal = this.modalData.productGroupId4
  5182. } else if (val === 114) {
  5183. strVal = this.modalData.manufacturerId
  5184. } else if (val === 20) {
  5185. strVal = this.modalData.codeNo
  5186. } else if (val === 123) {
  5187. strVal = this.modalData.hazardCode
  5188. } else if (val === 124) {
  5189. strVal = this.modalData.assetClass
  5190. } else if (val === 125) {
  5191. strVal = this.modalData.partStatus
  5192. } else if (val === 126) {
  5193. strVal = this.modalData.abcClass
  5194. } else if (val === 127) {
  5195. strVal = this.modalData.countryOfOrigin
  5196. } else if (val === 128) {
  5197. strVal = this.modalData.regionOfOrigin
  5198. } else if (val === 129) {
  5199. strVal = this.modalData.customsStatNo
  5200. } else if (val === 131) {
  5201. strVal = this.modalData.partCostGroupId
  5202. } else if (val === 132) {
  5203. strVal = this.modalData.planningMethod
  5204. }
  5205. this.$refs.baseList.init(val, strVal)
  5206. })
  5207. },
  5208. /**
  5209. * 列表方法的回调
  5210. * @param val
  5211. */
  5212. getBaseData (val) {
  5213. if (this.tagNo === 1007) {
  5214. this.modalData.umId = val.um_id
  5215. this.modalData.umName = val.um_name
  5216. } else if (this.tagNo === 108) {
  5217. this.modalData.familyId = val.family_id
  5218. this.modalData.familyName = val.family_name
  5219. } else if (this.tagNo === 109) {
  5220. this.modalData.groupId = val.group_id
  5221. this.modalData.groupName = val.group_name
  5222. } else if (this.tagNo === 110) {
  5223. this.modalData.productGroupId1 = val.product_group_id
  5224. this.modalData.productGroupName1 = val.product_group_name
  5225. } else if (this.tagNo === 111) {
  5226. this.modalData.productGroupId2 = val.product_group_id
  5227. this.modalData.productGroupName2 = val.product_group_name
  5228. } else if (this.tagNo === 112) {
  5229. this.modalData.productGroupId3 = val.product_group_id
  5230. this.modalData.productGroupName3 = val.product_group_name
  5231. } else if (this.tagNo === 113) {
  5232. this.modalData.productGroupId4 = val.product_group_id
  5233. this.modalData.productGroupName4 = val.product_group_name
  5234. } else if (this.tagNo === 114) {
  5235. this.modalData.manufacturerId = val.manufacturer_id
  5236. this.modalData.manufacturerName = val.manufacturer_name
  5237. } else if (this.tagNo === 20) {
  5238. if (this.modalData.flag === '2') {
  5239. if (val.Code_no != this.tempCodeNo) {
  5240. this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', {
  5241. confirmButtonText: '确定',
  5242. cancelButtonText: '取消',
  5243. type: 'warning'
  5244. }).then(() => {
  5245. this.modalData.codeNo = val.Code_no
  5246. this.$set(this.modalData, 'codeDesc', val.Code_desc)
  5247. }).catch(() => {
  5248. })
  5249. }
  5250. } else {
  5251. this.modalData.codeNo = val.Code_no
  5252. this.$set(this.modalData, 'codeDesc', val.Code_desc)
  5253. }
  5254. } else if (this.tagNo === 123) {
  5255. this.modalData.hazardCode = val.hazard_code
  5256. this.modalData.hazardDesc = val.hazard_desc
  5257. } else if (this.tagNo === 124) {
  5258. this.modalData.assetClass = val.asset_class
  5259. this.modalData.assetClassDesc = val.asset_class_desc
  5260. } else if (this.tagNo === 125) {
  5261. this.modalData.partStatus = val.part_status
  5262. this.modalData.partStatusDesc = val.part_status_desc
  5263. } else if (this.tagNo === 126) {
  5264. this.modalData.abcClass = val.abc_class
  5265. this.modalData.abcClassDesc = val.abc_class_desc
  5266. } else if (this.tagNo === 127) {
  5267. this.modalData.countryOfOrigin = val.country_of_origin
  5268. this.modalData.countryOfOriginDesc = val.country_of_origin_desc
  5269. } else if (this.tagNo === 128) {
  5270. this.modalData.regionOfOrigin = val.region_of_origin
  5271. this.modalData.regionOfOriginDesc = val.region_of_origin_desc
  5272. } else if (this.tagNo === 129) {
  5273. this.modalData.customsStatNo = val.customs_stat_no
  5274. this.modalData.customsStatDesc = val.customs_stat_desc
  5275. } else if (this.tagNo === 131) {
  5276. this.modalData.partCostGroupId = val.part_cost_group_id
  5277. this.modalData.partCostGroupDesc = val.part_cost_group_desc
  5278. } else if (this.tagNo === 132) {
  5279. this.modalData.planningMethod = val.planning_method
  5280. this.modalData.planningMethodDesc = val.planning_method_desc
  5281. }
  5282. },
  5283. // ======== 导出相关方法 ========
  5284. /**
  5285. * 导出excel
  5286. */
  5287. async createExportData () {
  5288. this.searchData.limit = -1
  5289. this.searchData.page = 1
  5290. await partInformationSearch(this.searchData).then(({data}) => {
  5291. this.resultList = data.page.list
  5292. })
  5293. return this.resultList
  5294. },
  5295. startDownload () {},
  5296. finishDownload () {},
  5297. fields () {
  5298. let json = '{'
  5299. this.columnList.forEach((item, index) => {
  5300. if (index == this.columnList.length - 1) {
  5301. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  5302. } else {
  5303. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  5304. }
  5305. })
  5306. json += '}'
  5307. let s = eval('(' + json + ')')
  5308. return s
  5309. },
  5310. toMenu(type,row){
  5311. let path = '';
  5312. if (type === 'Routing'){
  5313. path = 'routing'
  5314. }else if (type === 'BOM'){
  5315. path = 'bom'
  5316. }
  5317. if (this.$router.resolve(`/part-${path}Management`).resolved.name === '404'){
  5318. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
  5319. }else {
  5320. this.$router.push({name:`part-${path}Management`,params:{partNo:row.partNo},})
  5321. }
  5322. },
  5323. rowStyle ({row}) {
  5324. if (this.partCurrentRow.partNo === row.partNo) {
  5325. return { 'background-color': '#E8F7F6', cursor: 'pointer' };
  5326. }
  5327. },
  5328. }
  5329. }
  5330. </script>
  5331. <style scoped lang="scss">
  5332. /deep/ .customer-tab .el-tabs__content {
  5333. padding: 0px !important;
  5334. height: 459px;
  5335. }
  5336. /deep/ .customer-tab .el-tabs__content {
  5337. height: 294px;
  5338. }
  5339. .numInput /deep/ .el-input__inner{
  5340. text-align: right;
  5341. }
  5342. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  5343. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  5344. -webkit-appearance: none;
  5345. }
  5346. /deep/ .inlineNumber input[type="number"]{
  5347. -moz-appearance: textfield;
  5348. padding-right: 5px !important;
  5349. }
  5350. </style>