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.

6329 lines
237 KiB

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