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.

5816 lines
214 KiB

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