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.

6015 lines
224 KiB

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