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.

5545 lines
205 KiB

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