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.

5619 lines
208 KiB

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