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.

5634 lines
208 KiB

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