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.

5817 lines
214 KiB

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