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.

5627 lines
209 KiB

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