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.

5633 lines
209 KiB

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