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.

5940 lines
221 KiB

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