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.

4023 lines
146 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="mod-config">
  3. <!-- 查询条件 -->
  4. <el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
  5. <el-form-item :label="'物料编码'">
  6. <el-input v-model="searchData.partNo" clearable style="width: 120px"></el-input>
  7. </el-form-item>
  8. <el-form-item :label="'物料描述'">
  9. <el-input v-model="searchData.partDesc" clearable style="width: 210px"></el-input>
  10. </el-form-item>
  11. <el-form-item :label="'物料规格型号'">
  12. <el-input v-model="searchData.spec" clearable style="width: 120px"></el-input>
  13. </el-form-item>
  14. <!-- <el-form-item :label="'ERP物料编码'">-->
  15. <!-- <el-input v-model="searchData.erpPartNo" clearable style="width: 120px"></el-input>-->
  16. <!-- </el-form-item>-->
  17. <el-form-item :label="'录入时间'">
  18. <el-date-picker
  19. style="width: 120px"
  20. v-model="searchData.startDate"
  21. type="date"
  22. value-format="yyyy-MM-dd"
  23. placeholder="选择日期">
  24. </el-date-picker>
  25. </el-form-item>
  26. <el-form-item style="margin-top: 23px;">
  27. <label style="margin-left: 0px;font-size: 19px">&#10142</label>
  28. </el-form-item>
  29. <el-form-item :label="' '">
  30. <el-date-picker
  31. style="width: 120px"
  32. v-model="searchData.endDate"
  33. type="date"
  34. value-format="yyyy-MM-dd"
  35. placeholder="选择日期">
  36. </el-date-picker>
  37. </el-form-item>
  38. <el-form-item :label="' '">
  39. <el-button @click="getDataList()">查询</el-button>
  40. <el-button type="primary" @click="addModal()">新增</el-button>
  41. <!-- <el-button type="primary" @click="delModal()">删除</el-button>-->
  42. <download-excel
  43. :fields="fields()"
  44. :data="exportData"
  45. type="xls"
  46. :name="exportName"
  47. :header="exportHeader"
  48. :footer="exportFooter"
  49. :fetch="createExportData"
  50. :before-generate="startDownload"
  51. :before-finish="finishDownload"
  52. worksheet="导出信息"
  53. class="el-button el-button--primary el-button--medium">
  54. {{ "导出" }}
  55. </download-excel>
  56. </el-form-item>
  57. </el-form>
  58. <!-- 物料列表 -->
  59. <el-table
  60. :height="height"
  61. :data="dataList"
  62. border
  63. ref="partTable"
  64. @row-click="partClickRow"
  65. @selection-change="selectionPart"
  66. @current-change="changeCurrentRow"
  67. v-loading="dataListLoading"
  68. style="width: 100%;">
  69. <el-table-column
  70. type="selection"
  71. header-align="center"
  72. align="center"
  73. :selectable="selectFlag"
  74. width="50">
  75. </el-table-column>
  76. <el-table-column
  77. v-for="(item,index) in columnList" :key="index"
  78. :sortable="item.columnSortable"
  79. :prop="item.columnProp"
  80. :header-align="item.headerAlign"
  81. :show-overflow-tooltip="item.showOverflowTooltip"
  82. :align="item.align"
  83. :fixed="item.fixed === ''?false:item.fixed"
  84. :min-width="item.columnWidth"
  85. :label="item.columnLabel">
  86. <template slot-scope="scope">
  87. <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
  88. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. fixed="right"
  93. header-align="center"
  94. align="center"
  95. width="100"
  96. label="操作">
  97. <template slot-scope="scope">
  98. <a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
  99. </template>
  100. </el-table-column>
  101. </el-table>
  102. <selectDiv ref="selectDiv"></selectDiv>
  103. <!-- 分页插件 -->
  104. <el-pagination style="margin-top: 0px"
  105. @size-change="sizeChangeHandle"
  106. @current-change="currentChangeHandle"
  107. :current-page="pageIndex"
  108. :page-sizes="[20, 50, 100, 200, 500]"
  109. :page-size="pageSize"
  110. :total="totalPage"
  111. layout="total, sizes, prev, pager, next, jumper">
  112. </el-pagination>
  113. <!-- 物料新增/编辑模态框 -->
  114. <el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="1000px">
  115. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  116. <el-form-item label="物料编码" prop="partNo" :rules="rules.partNo">
  117. <el-input v-model="modalData.partNo" clearable style="width: 128px" @blur="queryMasterField" :disabled="modalDisableFlag"></el-input>
  118. </el-form-item>
  119. <el-form-item label="物料描述" prop="partDesc" :rules="rules.partDesc" style="margin-left: -10px">
  120. <el-input v-model="modalData.partDesc" clearable style="width: 330px"></el-input>
  121. </el-form-item>
  122. <el-tabs style="width: 100%;height: 465px" type="border-card">
  123. <el-tab-pane label="General">
  124. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  125. <el-form-item label="零件类型 / Part Type" prop="partType" :rules="rules.partType">
  126. <el-select v-model="modalData.partType" style="width: 461px">
  127. <el-option label="Manufactured" value="Manufactured"></el-option>
  128. <el-option label="Manufactured recipe" value="Manufactured recipe"></el-option>
  129. <el-option label="Purchase raw" value="Purchase raw"></el-option>
  130. <el-option label="Purchased" value="Purchased"></el-option>
  131. </el-select>
  132. </el-form-item>
  133. <el-form-item>
  134. <span slot="label" @click="getBaseList(123)"><a herf="#">安全代码 / Safety Code</a></span>
  135. <el-input v-model="modalData.hazardCode" style="width: 128px"></el-input>
  136. <el-input v-model="modalData.hazardDesc" disabled style="width: 330px"></el-input>
  137. </el-form-item>
  138. </el-form>
  139. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  140. <el-form-item prop="productGroupId4" :rules="rules.productGroupId4">
  141. <span slot="label" @click="getBaseList(113)"><a herf="#">计划人 / Planner</a></span>
  142. <el-input v-model="modalData.productGroupId4" style="width: 128px"></el-input>
  143. <el-input v-model="modalData.productGroupName4" disabled style="width: 330px"></el-input>
  144. </el-form-item>
  145. <el-form-item>
  146. <span slot="label" @click="getBaseList(112)"><a herf="#">会计组 / Accounting Group</a></span>
  147. <el-input v-model="modalData.productGroupId3" style="width: 128px"></el-input>
  148. <el-input v-model="modalData.productGroupName3" disabled style="width: 330px"></el-input>
  149. </el-form-item>
  150. </el-form>
  151. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  152. <el-form-item prop="umName" :rules="rules.umName">
  153. <span slot="label" @click="getBaseList(1007)"><a herf="#">库存计量单位 / Inventory UoM</a></span>
  154. <el-input v-model="modalData.umId" style="width: 128px"></el-input>
  155. <el-input v-model="modalData.umName" disabled style="width: 330px"></el-input>
  156. </el-form-item>
  157. <el-form-item>
  158. <span slot="label" @click="getBaseList(109)"><a herf="#">产品代码 / Product Code</a></span>
  159. <el-input v-model="modalData.groupId" style="width: 128px"></el-input>
  160. <el-input v-model="modalData.groupName" disabled style="width: 330px"></el-input>
  161. </el-form-item>
  162. </el-form>
  163. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  164. <el-form-item>
  165. <span slot="label" @click="getBaseList(110)"><a herf="#">商品组1 / Comm Group 1</a></span>
  166. <el-input v-model="modalData.productGroupId1" style="width: 128px"></el-input>
  167. <el-input v-model="modalData.productGroupName1" disabled style="width: 330px"></el-input>
  168. </el-form-item>
  169. <el-form-item>
  170. <span slot="label" @click="getBaseList(108)"><a herf="#">产品大类 / Product Family</a></span>
  171. <el-input v-model="modalData.familyId" style="width: 128px"></el-input>
  172. <el-input v-model="modalData.familyName" disabled style="width: 330px"></el-input>
  173. </el-form-item>
  174. </el-form>
  175. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  176. <el-form-item>
  177. <span slot="label" @click="getBaseList(111)"><a herf="#">商品组2 / Comm Group 2</a></span>
  178. <el-input v-model="modalData.productGroupId2" style="width: 128px"></el-input>
  179. <el-input v-model="modalData.productGroupName2" disabled style="width: 330px"></el-input>
  180. </el-form-item>
  181. <el-form-item label="类型指定 / Type Designation">
  182. <el-input v-model="modalData.typeDesignation" clearable style="width: 461px"></el-input>
  183. </el-form-item>
  184. </el-form>
  185. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  186. <el-form-item>
  187. <span slot="label" @click="getBaseList(124)"><a herf="#">资产等级 / Asset Class</a></span>
  188. <el-input v-model="modalData.assetClass" style="width: 128px"></el-input>
  189. <el-input v-model="modalData.assetClassDesc" disabled style="width: 330px"></el-input>
  190. </el-form-item>
  191. <el-form-item label="尺寸/材质 / Dimension/Quality">
  192. <el-input v-model="modalData.dimQuality" clearable style="width: 461px"></el-input>
  193. </el-form-item>
  194. </el-form>
  195. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  196. <el-form-item>
  197. <span slot="label" @click="getBaseList(125)"><a herf="#">零件状态 / Part Status</a></span>
  198. <el-input v-model="modalData.partStatus" style="width: 128px"></el-input>
  199. <el-input v-model="modalData.partStatusDesc" disabled style="width: 330px"></el-input>
  200. </el-form-item>
  201. <el-form-item label="净重">
  202. <el-input class="inlineNumber numInput" v-model="modalData.weightNet" readonly type="number" style="width: 223px"></el-input>
  203. </el-form-item>
  204. <el-form-item label="净重单位">
  205. <!-- <dict-data-select v-if="modalFlag" v-model="modalData.uomForWeightNet" style="width: 224px" :use-default-value="false" dict-type="part_uom_for_weight_net"></dict-data-select>-->
  206. <el-input v-model="modalData.uomForWeightNet" readonly style="width: 224px"></el-input>
  207. </el-form-item>
  208. </el-form>
  209. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  210. <el-form-item>
  211. <span slot="label" v-if="!modalDisableFlag"><a herf="#">ABC类 / ABC Class</a></span>
  212. <span slot="label" v-else @click="getBaseList(126)"><a herf="#">ABC类 / ABC Class</a></span>
  213. <el-input v-model="modalData.abcClass" :readonly="!modalDisableFlag" style="width: 128px"></el-input>
  214. <el-input v-model="modalData.abcClassDesc" disabled style="width: 330px"></el-input>
  215. </el-form-item>
  216. <el-form-item label="净数量">
  217. <el-input class="inlineNumber numInput" v-model="modalData.volumeNet" readonly type="number" style="width: 223px"></el-input>
  218. </el-form-item>
  219. <el-form-item label="数量单位">
  220. <!-- <dict-data-select v-if="modalFlag" v-model="modalData.uomForVolumeNet" style="width: 224px" dict-type="part_uom_for_volume_net"></dict-data-select>-->
  221. <el-input v-model="modalData.uomForVolumeNet" readonly style="width: 224px"></el-input>
  222. </el-form-item>
  223. </el-form>
  224. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  225. <el-form-item prop="codeDesc" :rules="rules.codeDesc">
  226. <span slot="label" @click="getBaseList(20)"><a herf="#">属性模板</a></span>
  227. <el-input v-model="modalData.codeNo" style="width: 128px"></el-input>
  228. <el-input v-model="modalData.codeDesc" disabled style="width: 330px"></el-input>
  229. </el-form-item>
  230. <el-form-item label="频率级别 / Frequency Class">
  231. <el-input v-model="modalData.frequencyClass" readonly style="width: 223px"></el-input>
  232. </el-form-item>
  233. <el-form-item label="生命周期阶段 / Lifecycle Stage">
  234. <el-input v-model="modalData.lifecycleStage" readonly style="width: 224px"></el-input>
  235. </el-form-item>
  236. </el-form>
  237. </el-tab-pane>
  238. <el-tab-pane label="Acquisition">
  239. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  240. <el-form-item label="制造备货期 / Manufacturing Lead Time">
  241. <el-input :disabled="!(modalData.partType === 'Manufactured' || modalData.partType === 'Manufactured recipe')" class="inlineNumber numInput" v-model="modalData.manufacturingLeadTime" @change="changeExpectedLeadTime" type="number" style="width: 223px"></el-input>
  242. </el-form-item>
  243. <el-form-item label="周数 / Weeks">
  244. <el-input class="inlineNumber numInput" v-model="modalData.durabilityWeek" readonly type="number" style="width: 223px"></el-input>
  245. </el-form-item>
  246. <el-form-item>
  247. <span slot="label" @click="getBaseList(127)"><a herf="#">来源国家 / Country of Origin</a></span>
  248. <el-input v-model="modalData.isoCountry" style="width: 128px"></el-input>
  249. <el-input v-model="modalData.isoCountryDesc" disabled style="width: 330px"></el-input>
  250. </el-form-item>
  251. </el-form>
  252. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  253. <el-form-item label="预期提前期 / Expected Lead Time">
  254. <el-input class="inlineNumber numInput" v-model="modalData.expectedLeadTime" type="number" style="width: 223px"></el-input>
  255. </el-form-item>
  256. <el-form-item label="天数 / Days">
  257. <el-input class="inlineNumber numInput" v-model="modalData.durabilityDay" @change="changeDurabilityWeek" type="number" style="width: 223px"></el-input>
  258. </el-form-item>
  259. <el-form-item>
  260. <span slot="label" @click="getBaseList(128)"><a herf="#">区域代码 / Region Code</a></span>
  261. <el-input v-model="modalData.regionOfOrigin" style="width: 128px"></el-input>
  262. <el-input v-model="modalData.regionOfOriginDesc" disabled style="width: 330px"></el-input>
  263. </el-form-item>
  264. </el-form>
  265. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  266. <el-form-item label="州内转换因子 / Intrastat Conv Factor">
  267. <el-input class="inlineNumber numInput" v-model="modalData.intrastatConvFactor" type="number" style="width: 128px"></el-input>
  268. <el-input v-model="modalData.umDesc" disabled style="width: 330px"></el-input>
  269. </el-form-item>
  270. <el-form-item>
  271. <span slot="label" @click="getBaseList(129)"><a herf="#">海关统计序号 / Customs Star No</a></span>
  272. <el-input v-model="modalData.customsStarNo" style="width: 128px"></el-input>
  273. <el-input v-model="modalData.customsStarDesc" 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="备注" style="height: 80px">
  278. <el-input type="textarea" v-model="modalData.remark" :rows="3" resize='none' show-word-limit style="width: 937px"></el-input>
  279. </el-form-item>
  280. </el-form>
  281. </el-tab-pane>
  282. <el-tab-pane label="Costs">
  283. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  284. <el-form-item label="配置标识 / Configuration ID">
  285. <el-select v-model="modalData.configurationId" style="width: 461px">
  286. <el-option label="*" value="*"></el-option>
  287. </el-select>
  288. </el-form-item>
  289. </el-form>
  290. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  291. <el-form-item label="估计物料成本 / Estimated Material Cost">
  292. <el-input class="inlineNumber numInput" v-model="modalData.estimatedMaterialCost" @input="handleInput(modalData.estimatedMaterialCost,1)" type="number" style="width: 461px"></el-input>
  293. </el-form-item>
  294. </el-form>
  295. </el-tab-pane>
  296. <el-tab-pane label="Misc Part Info">
  297. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  298. <el-form-item label="库存估价方法 / Inventory Valuation Method">
  299. <el-select v-model="modalData.inventoryValuationMethod" style="width: 461px">
  300. <el-option label="Weighted Average" value="Weighted Average"></el-option>
  301. <el-option label="Standard Cost" value="Standard Cost"></el-option>
  302. <el-option label="First In First Out" value="First In First Out"></el-option>
  303. <el-option label="Last In First Out" value="Last In First Out"></el-option>
  304. </el-select>
  305. </el-form-item>
  306. <el-form-item>
  307. <span slot="label" @click="getBaseList(131)"><a herf="#">零件成本组 / Part Cost Group</a></span>
  308. <el-input v-model="modalData.partCostGroupId" style="width: 128px"></el-input>
  309. <el-input v-model="modalData.partCostGroupDesc" disabled style="width: 330px"></el-input>
  310. </el-form-item>
  311. </el-form>
  312. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  313. <el-form-item label="库存件成本层 / Inventory Part Cost Level">
  314. <el-select v-model="modalData.inventoryPartCostLevel" style="width: 461px">
  315. <el-option label="Cost Per Part" value="Cost Per Part"></el-option>
  316. <el-option label="Cost Per Configuration" value="Cost Per Configuration"></el-option>
  317. <el-option label="Cost Per Condition" value="Cost Per Condition"></el-option>
  318. <el-option label="Cost Per Lot Batch" value="Cost Per Lot Batch"></el-option>
  319. <el-option label="Cost Per Serial" value="Cost Per Serial"></el-option>
  320. </el-select>
  321. </el-form-item>
  322. </el-form>
  323. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  324. <el-form-item label="供应商发票事项 / Supplier Invoice Consideration">
  325. <el-select v-model="modalData.invoiceConsideration" style="width: 461px">
  326. <el-option label="Ignore Invoice Price" value="Ignore Invoice Price"></el-option>
  327. <el-option label="Periodic Weighted Average" value="Periodic Weighted Average"></el-option>
  328. <el-option label="Transaction Based" value="Transaction Based"></el-option>
  329. </el-select>
  330. </el-form-item>
  331. </el-form>
  332. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  333. <el-form-item label="零成本 / Zero Cost">
  334. <el-select v-model="modalData.zeroCostFlag" style="width: 461px">
  335. <el-option label="Zero Cost Allowed" value="Zero Cost Allowed"></el-option>
  336. <el-option label="Zero Cost Forbidden" value="Zero Cost Forbidden"></el-option>
  337. <el-option label="Zero Cost Only" value="Zero Cost Only"></el-option>
  338. </el-select>
  339. </el-form-item>
  340. </el-form>
  341. </el-tab-pane>
  342. <el-tab-pane label="Planning Data">
  343. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  344. <el-form-item>
  345. <span slot="label" @click="getBaseList(132)"><a herf="#">计划方法 / Planning Method</a></span>
  346. <el-input v-model="modalData.planningMethod" style="width: 170px"></el-input>
  347. </el-form-item>
  348. <el-form-item label=" ">
  349. <el-input v-model="modalData.planningMethodDesc" disabled style="width: 510px"></el-input>
  350. </el-form-item>
  351. </el-form>
  352. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  353. <el-form-item label="安全库存 / Safety Stock">
  354. <el-input class="inlineNumber numInput" v-model="modalData.safetyStock" @input="handleInput(modalData.safetyStock,2)" type="number" style="width: 170px"></el-input>
  355. </el-form-item>
  356. <el-form-item label="最小批量 / Min Lot Size">
  357. <el-input class="inlineNumber numInput" v-model="modalData.minOrderQty" @input="handleInput(modalData.minOrderQty,3)" type="number" style="width: 170px"></el-input>
  358. </el-form-item>
  359. <el-form-item label="最大批量 / Max Lot Size">
  360. <el-input class="inlineNumber numInput" v-model="modalData.maxOrderQty" @input="handleInput(modalData.maxOrderQty,4)" type="number" style="width: 155px"></el-input>
  361. </el-form-item>
  362. <el-form-item label="多种批量大小 / Multiple Lot Size">
  363. <el-input class="inlineNumber numInput" v-model="modalData.mulOrderQty" @input="handleInput(modalData.mulOrderQty,5)" type="number" style="width: 155px"></el-input>
  364. </el-form-item>
  365. </el-form>
  366. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  367. <el-form-item label="安全提前期 / Safety Lead Time">
  368. <el-input class="inlineNumber numInput" v-model="modalData.safetyLeadTime" @input="handleInput(modalData.safetyLeadTime,6)" type="number" style="width: 170px"></el-input>
  369. </el-form-item>
  370. <el-form-item label="报废因子(%) / Scrap Factor(%)">
  371. <el-input class="inlineNumber numInput" v-model="modalData.shrinkageFac" @input="handleInput(modalData.shrinkageFac,7)" type="number" style="width: 170px"></el-input>
  372. </el-form-item>
  373. <el-form-item label="标准批量大小 / Std Lot Size">
  374. <el-input class="inlineNumber numInput" v-model="modalData.stdOrderQty" @input="handleInput(modalData.stdOrderQty,8)" type="number" style="width: 155px"></el-input>
  375. </el-form-item>
  376. </el-form>
  377. </el-tab-pane>
  378. <el-tab-pane label="Manufacturing">
  379. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-top: -5px;">
  380. <el-form-item label="累计提前期 / Cum Lead Time">
  381. <el-input class="inlineNumber numInput" v-model="modalData.cumLeadTime" @input="handleInput(modalData.cumLeadTime,9)" type="number" style="width: 296px"></el-input>
  382. </el-form-item>
  383. <el-form-item label="预留/下发来源 / Reserve/Issue from">
  384. <el-select v-model="modalData.backFlushPart" style="width: 250px">
  385. <el-option label="All Locations" value="All Locations"></el-option>
  386. <el-option label="Only Floor Stock" value="Only Floor Stock"></el-option>
  387. <el-option label="Only Specified Location" value="Only Specified Location"></el-option>
  388. </el-select>
  389. </el-form-item>
  390. <el-form-item style="margin-top: 23px">
  391. <el-checkbox v-model="modalData.byProdAsSupplyInMrpDb" true-label="Y">将副产品用作MRP中的供应 / Use By-Product as Supply in MRP</el-checkbox>
  392. </el-form-item>
  393. </el-form>
  394. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  395. <el-form-item label="未受保护提前期 / Unprotected Lead Time">
  396. <el-input class="inlineNumber numInput" v-model="modalData.unprotectedLeadTime" @input="handleInput(modalData.unprotectedLeadTime,10)" type="number" style="width: 296px"></el-input>
  397. </el-form-item>
  398. <el-form-item label="预留/下发方法 / Reserve/Issue Method">
  399. <el-select v-model="modalData.issueType" style="width: 250px">
  400. <el-option label="Reserve" value="Reserve"></el-option>
  401. <el-option label="Backflush" value="Backflush"></el-option>
  402. <el-option label="Reserve And Backflush" value="Reserve And Backflush"></el-option>
  403. <el-option label="Manual" value="Manual"></el-option>
  404. </el-select>
  405. </el-form-item>
  406. <el-form-item style="margin-top: 23px">
  407. <el-checkbox v-model="modalData.mrpControlFlagDb" true-label="Y">MRP控制 / MRP Control</el-checkbox>
  408. </el-form-item>
  409. </el-form>
  410. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  411. <el-form-item label="按日固定提前期 / Fixed Lead Time by Day">
  412. <el-input class="inlineNumber numInput" v-model="modalData.fixedLeadTimeDay" @input="handleInput(modalData.fixedLeadTimeDay,11)" type="number" style="width: 296px"></el-input>
  413. </el-form-item>
  414. <el-form-item label="过度报告 / Over Reporting">
  415. <el-select v-model="modalData.overReporting" style="width: 250px">
  416. <el-option label="Allowed" value="Allowed"></el-option>
  417. <el-option label="Allowed with Warning" value="Allowed with Warning"></el-option>
  418. <el-option label="Not Allowed" value="Not Allowed"></el-option>
  419. </el-select>
  420. </el-form-item>
  421. <el-form-item style="margin-top: 23px">
  422. <el-checkbox v-model="modalData.useTheoreticalDensityDb" true-label="Y">使用理论 / Use Theoretical</el-checkbox>
  423. </el-form-item>
  424. </el-form>
  425. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  426. <el-form-item label="按天的可变化提前期 / Variable Lead Time by Day">
  427. <el-input class="inlineNumber numInput" v-model="modalData.variableLeadTimeDay" @input="handleInput(modalData.variableLeadTimeDay,12)" type="number" style="width: 296px"></el-input>
  428. </el-form-item>
  429. <el-form-item label="报告公差过大 / Over Report Tolerance">
  430. <el-input class="inlineNumber numInput" v-model="modalData.overReportTolerance" @input="handleInput(modalData.overReportTolerance,13)" type="number" style="width: 250px"></el-input>
  431. </el-form-item>
  432. </el-form>
  433. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  434. <el-form-item label="按小时的固定提前期 / Fixed Lead Time by Hour">
  435. <el-input class="inlineNumber numInput" v-model="modalData.fixedLeadTimeHour" @input="handleInput(modalData.fixedLeadTimeHour,14)" type="number" style="width: 296px"></el-input>
  436. </el-form-item>
  437. <el-form-item label="密度 / Density">
  438. <el-input class="inlineNumber numInput" v-model="modalData.density" @input="handleInput(modalData.density,15)" type="number" style="width: 250px"></el-input>
  439. </el-form-item>
  440. </el-form>
  441. <el-form :inline="true" label-position="top" :model="modalData" :rules="rules">
  442. <el-form-item label="按小时计算的可变提前期 / Variable Lead Time by Hour">
  443. <el-input class="inlineNumber numInput" v-model="modalData.variableLeadTimeHour" @input="handleInput(modalData.variableLeadTimeHour,16)" type="number" style="width: 296px"></el-input>
  444. </el-form-item>
  445. </el-form>
  446. </el-tab-pane>
  447. <el-tab-pane label="Revisions"></el-tab-pane>
  448. </el-tabs>
  449. </el-form>
  450. <el-footer style="height:35px;margin-top: 20px;text-align:center">
  451. <el-button type="primary" @click="saveData()">保存</el-button>
  452. <el-button type="primary" @click="modalFlag = false">关闭</el-button>
  453. </el-footer>
  454. </el-dialog>
  455. <!-- 页签 -->
  456. <el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab">
  457. <!-- 物料属性页签 -->
  458. <el-tab-pane label="物料属性" name="part_item">
  459. <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
  460. <el-button type="primary" @click="addOrDelItem">新增/删除</el-button>
  461. <el-button type="primary" @click="updateItemValue">编辑</el-button>
  462. </el-form>
  463. <el-table
  464. :data="partItemList"
  465. :height="secondHeight - 60"
  466. border
  467. v-loading="dataListLoading"
  468. style="width: 100%;">
  469. <el-table-column
  470. v-for="(item,index) in columnItemList" :key="index"
  471. :sortable="item.columnSortable"
  472. :prop="item.columnProp"
  473. :header-align="item.headerAlign"
  474. :show-overflow-tooltip="item.showOverflowTooltip"
  475. :align="item.align"
  476. :fixed="item.fixed==''?false:item.fixed"
  477. :min-width="item.columnWidth"
  478. :label="item.columnLabel">
  479. <template slot-scope="scope">
  480. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  481. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  482. </template>
  483. </el-table-column>
  484. <!-- <el-table-column-->
  485. <!-- header-align="center"-->
  486. <!-- align="center"-->
  487. <!-- width="150"-->
  488. <!-- fixed="right"-->
  489. <!-- label="操作">-->
  490. <!-- <template slot-scope="scope">-->
  491. <!-- <a type="text" size="small" @click="deleteItemModal(scope.row)">删除</a>-->
  492. <!-- </template>-->
  493. <!-- </el-table-column>-->
  494. </el-table>
  495. </el-tab-pane>
  496. <!-- 代理商页签 -->
  497. <el-tab-pane label="代理商" name="part_agent">
  498. <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
  499. <el-button type="primary" @click="savePartAgent()">新增</el-button>
  500. </el-form>
  501. <el-table
  502. :data="partAgentList"
  503. :height="secondHeight - 60"
  504. border
  505. style="width: 100%;">
  506. <el-table-column
  507. v-for="(item,index) in columnAgentList" :key="index"
  508. :sortable="item.columnSortable"
  509. :prop="item.columnProp"
  510. :header-align="item.headerAlign"
  511. :show-overflow-tooltip="item.showOverflowTooltip"
  512. :align="item.align"
  513. :fixed="item.fixed==''?false:item.fixed"
  514. :min-width="item.columnWidth"
  515. :label="item.columnLabel">
  516. <template slot-scope="scope">
  517. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  518. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  519. </template>
  520. </el-table-column>
  521. <el-table-column
  522. header-align="center"
  523. align="center"
  524. width="150"
  525. fixed="right"
  526. label="操作">
  527. <template slot-scope="scope">
  528. <a type="text" size="small" @click="deleteAgent2(scope.row)">删除</a>
  529. </template>
  530. </el-table-column>
  531. </el-table>
  532. </el-tab-pane>
  533. <!-- 制造商页签 -->
  534. <el-tab-pane label="制造商" name="part_manufacturer">
  535. <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
  536. <el-button type="primary" @click="savePartManufacturer()">新增</el-button>
  537. </el-form>
  538. <el-table
  539. :data="partManufacturerList"
  540. :height="secondHeight - 60"
  541. border
  542. style="width: 100%;">
  543. <el-table-column
  544. v-for="(item,index) in columnManufacturerList" :key="index"
  545. :sortable="item.columnSortable"
  546. :prop="item.columnProp"
  547. :header-align="item.headerAlign"
  548. :show-overflow-tooltip="item.showOverflowTooltip"
  549. :align="item.align"
  550. :fixed="item.fixed==''?false:item.fixed"
  551. :min-width="item.columnWidth"
  552. :label="item.columnLabel">
  553. <template slot-scope="scope">
  554. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  555. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  556. </template>
  557. </el-table-column>
  558. <el-table-column
  559. header-align="center"
  560. align="center"
  561. width="150"
  562. fixed="right"
  563. label="操作">
  564. <template slot-scope="scope">
  565. <a type="text" size="small" @click="deleteManufacturer2(scope.row)">删除</a>
  566. </template>
  567. </el-table-column>
  568. </el-table>
  569. </el-tab-pane>
  570. <!-- 默认库位页签 -->
  571. <el-tab-pane label="默认库位" name="default_locations">
  572. <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
  573. <el-button type="primary" @click="saveDefaultLocation()">新增</el-button>
  574. </el-form>
  575. <el-table
  576. :data="defaultLocationList"
  577. :height="secondHeight - 60"
  578. border
  579. style="width: 100%;">
  580. <el-table-column
  581. v-for="(item,index) in columnLocationList" :key="index"
  582. :sortable="item.columnSortable"
  583. :prop="item.columnProp"
  584. :header-align="item.headerAlign"
  585. :show-overflow-tooltip="item.showOverflowTooltip"
  586. :align="item.align"
  587. :fixed="item.fixed==''?false:item.fixed"
  588. :min-width="item.columnWidth"
  589. :label="item.columnLabel">
  590. <template slot-scope="scope">
  591. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  592. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  593. </template>
  594. </el-table-column>
  595. <el-table-column
  596. header-align="center"
  597. align="center"
  598. width="150"
  599. fixed="right"
  600. label="操作">
  601. <template slot-scope="scope">
  602. <a type="text" size="small" @click="deleteLocation2(scope.row)">删除</a>
  603. </template>
  604. </el-table-column>
  605. </el-table>
  606. </el-tab-pane>
  607. <!-- 文档页签 -->
  608. <el-tab-pane label="文档" name="part_file">
  609. <el-form label-position="top" style="margin-top: 2px; margin-left: 2px;">
  610. <el-button type="primary" @click="uploadFile()">上传文件</el-button>
  611. </el-form>
  612. <el-table
  613. :data="fileContentList"
  614. :height="secondHeight - 60"
  615. border
  616. v-loading="dataListLoading"
  617. style="width: 100%; ">
  618. <el-table-column
  619. v-for="(item,index) in columnFileList" :key="index"
  620. :sortable="item.columnSortable"
  621. :prop="item.columnProp"
  622. :header-align="item.headerAlign"
  623. :show-overflow-tooltip="item.showOverflowTooltip"
  624. :align="item.align"
  625. :fixed="item.fixed==''?false:item.fixed"
  626. :min-width="item.columnWidth"
  627. :label="item.columnLabel">
  628. <template slot-scope="scope">
  629. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  630. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  631. </template>
  632. </el-table-column>
  633. <el-table-column
  634. fixed="right"
  635. header-align="center"
  636. align="center"
  637. width="100"
  638. label="操作">
  639. <template slot-scope="scope">
  640. <a @click="downloadFile(scope.row)">下载</a>
  641. <a type="text" size="small" @click="deleteFile(scope.row)">删除</a>
  642. </template>
  643. </el-table-column>
  644. </el-table>
  645. </el-tab-pane>
  646. </el-tabs>
  647. <!-- 物料属性值编辑模态框 -->
  648. <el-dialog title="物料属性" :close-on-click-modal="false" v-drag :visible.sync="updateItemModelFlag" width="1000px">
  649. <div class="rq ">
  650. <el-table
  651. :data="updatePartItemList"
  652. height="350px"
  653. border
  654. style="width: 100%;">
  655. <el-table-column
  656. v-for="(item,index) in updateColumnItemList" :key="index"
  657. :sortable="item.columnSortable"
  658. :prop="item.columnProp"
  659. :header-align="item.headerAlign"
  660. :show-overflow-tooltip="item.showOverflowTooltip"
  661. :align="item.align"
  662. :fixed="item.fixed==''?false:item.fixed"
  663. :min-width="item.columnWidth"
  664. :label="item.columnLabel">
  665. <template slot-scope="scope">
  666. <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
  667. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  668. </template>
  669. </el-table-column>
  670. <el-table-column
  671. prop="textValue"
  672. header-align="center"
  673. align="right"
  674. min-width="80"
  675. label="文本值">
  676. <template slot-scope="scope">
  677. <el-input v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  678. <el-select v-if="scope.row.valueTypeDb === 'T' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" style="width: 180px" placeholder="请选择">
  679. <el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option>
  680. </el-select>
  681. <el-input v-if="scope.row.valueTypeDb !== 'T'" v-model="scope.row.textValue" disabled style="height: 11px;padding: 0px " allow-create>;width:98%"></el-input>
  682. </template>
  683. </el-table-column>
  684. <el-table-column
  685. prop="numValue"
  686. header-align="center"
  687. align="right"
  688. min-width="80"
  689. label="数字值">
  690. <template slot-scope="scope">
  691. <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>
  692. <el-select v-if="scope.row.valueTypeDb === 'N' && scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" style="width: 180px" placeholder="请选择">
  693. <el-option v-for="item in scope.row.availableValueList" :key="index" :label="item.availableValue" :value="item.availableValue"></el-option>
  694. </el-select>
  695. <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>
  696. </template>
  697. </el-table-column>
  698. </el-table>
  699. </div>
  700. <span slot="footer" class="dialog-footer">
  701. <el-button type="primary" @click="commitItemValue()">保存</el-button>
  702. <el-button type="primary" @click="updateItemModelFlag=false">关闭</el-button>
  703. </span>
  704. </el-dialog>
  705. <!-- 物料属性-> 快速新增 -->
  706. <el-dialog title="新增" :close-on-click-modal="false" v-drag :visible.sync="fastAddFlag" width="1000px">
  707. <div style="font-size: 12px">
  708. <el-form :inline="true" label-position="top" :model="itemData">
  709. <el-form-item :label="'属性编码'">
  710. <el-input v-model="itemData.propertiesItemNo" clearable style="width: 120px"></el-input>
  711. </el-form-item>
  712. <el-form-item :label="'属性名称'">
  713. <el-input v-model="itemData.itemDesc" clearable style="width: 150px"></el-input>
  714. </el-form-item>
  715. <el-form-item :label="' '">
  716. <el-button type="primary" @click="queryPartItem()">查询</el-button>
  717. </el-form-item>
  718. </el-form>
  719. </div>
  720. <el-container style="margin-top: 0px;">
  721. <el-main style="width: 350px;padding: 1px">
  722. <span style="font-size: 12px" >可选属性</span>
  723. <el-table
  724. height="400px"
  725. :data="itemList1"
  726. border
  727. ref="itemTable1"
  728. @row-click="itemClickRow1"
  729. @selection-change="selectionItem1"
  730. highlight-current-row
  731. style="width: 100%">
  732. <el-table-column
  733. type="selection"
  734. header-align="center"
  735. align="center"
  736. :selectable="selectFlag"
  737. width="50">
  738. </el-table-column>
  739. <el-table-column
  740. prop="itNo"
  741. header-align="center"
  742. align="center"
  743. min-width="80"
  744. label="属性编码">
  745. </el-table-column>
  746. <el-table-column
  747. prop="itemDesc"
  748. header-align="center"
  749. align="center"
  750. min-width="200"
  751. label="属性名称">
  752. </el-table-column>
  753. </el-table>
  754. </el-main>
  755. <el-main style="width: 10px;padding: 1px">
  756. <div style="margin-top: 200px;margin-left: 18px">
  757. <el-button type="primary" @click="addItem()">添加>></el-button>
  758. </div>
  759. <div style="margin-top: 15px;margin-left: 18px">
  760. <el-button type="primary" @click="deleteItem()">删除<<</el-button>
  761. </div>
  762. </el-main>
  763. <el-main style="width: 350px;padding: 1px">
  764. <span style="font-size: 12px" >已有属性</span>
  765. <el-table
  766. height="400px"
  767. :data="itemList2"
  768. border
  769. ref="itemTable2"
  770. @row-click="itemClickRow2"
  771. @selection-change="selectionItem2"
  772. highlight-current-row
  773. style="width: 100%">
  774. <el-table-column
  775. type="selection"
  776. header-align="center"
  777. align="center"
  778. :selectable="selectFlag"
  779. width="50">
  780. </el-table-column>
  781. <el-table-column
  782. prop="itNo"
  783. header-align="center"
  784. align="center"
  785. min-width="80"
  786. label="属性编码">
  787. </el-table-column>
  788. <el-table-column
  789. prop="itemDesc"
  790. header-align="center"
  791. align="center"
  792. min-width="200"
  793. label="属性名称">
  794. </el-table-column>
  795. </el-table>
  796. </el-main>
  797. </el-container>
  798. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  799. <el-button type="primary" @click="fastAddFlag = false">关闭</el-button>
  800. </el-footer>
  801. </el-dialog>
  802. <!-- 代理商-> 快速新增 -->
  803. <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="agentModelFlag" width="900px">
  804. <div style="font-size: 12px">
  805. <el-form :inline="true" label-position="top" :model="agentData">
  806. <el-form-item :label="'代理商编码'">
  807. <el-input v-model="agentData.agentId" clearable style="width: 120px"></el-input>
  808. </el-form-item>
  809. <el-form-item :label="'代理商名称'">
  810. <el-input v-model="agentData.agentName" clearable style="width: 120px"></el-input>
  811. </el-form-item>
  812. <el-form-item :label="' '">
  813. <el-button type="primary" @click="getAgentList()">查询</el-button>
  814. </el-form-item>
  815. </el-form>
  816. </div>
  817. <el-container style="margin-top: 0px;">
  818. <el-main style="width: 350px; padding: 1px">
  819. <span style="font-size: 12px" >可选代理商:</span>
  820. <el-table
  821. height="400px"
  822. :data="agentList1"
  823. border
  824. ref="agentTable1"
  825. @row-click="agentClickRow1"
  826. @selection-change="selectionAgent1"
  827. highlight-current-row
  828. style="width: 100%">
  829. <el-table-column
  830. type="selection"
  831. header-align="center"
  832. align="center"
  833. :selectable="selectFlag"
  834. width="50">
  835. </el-table-column>
  836. <el-table-column
  837. prop="agentId"
  838. header-align="center"
  839. align="center"
  840. min-width="80"
  841. label="代理商编码">
  842. </el-table-column>
  843. <el-table-column
  844. prop="agentName"
  845. header-align="center"
  846. align="center"
  847. min-width="120"
  848. label="代理商名称">
  849. </el-table-column>
  850. </el-table>
  851. </el-main>
  852. <el-main style="width: 111px;padding: -1px">
  853. <div style="margin-top: 182px;margin-left: 18px">
  854. <el-button type="primary" @click="addAgent()">添加>></el-button>
  855. </div>
  856. <div style="margin-top: 15px;margin-left: 18px">
  857. <el-button type="primary" @click="deleteAgent()">删除<<</el-button>
  858. </div>
  859. </el-main>
  860. <el-main style="width: 350px;padding: 1px">
  861. <span style="font-size: 12px" >已有代理商:</span>
  862. <el-table
  863. height="400px"
  864. :data="agentList2"
  865. border
  866. ref="agentTable2"
  867. @row-click="agentClickRow2"
  868. @selection-change="selectionAgent2"
  869. highlight-current-row
  870. style="width: 100%">
  871. <el-table-column
  872. type="selection"
  873. header-align="center"
  874. align="center"
  875. :selectable="selectFlag"
  876. width="50">
  877. </el-table-column>
  878. <el-table-column
  879. prop="agentId"
  880. header-align="center"
  881. align="center"
  882. min-width="80"
  883. label="代理商编码">
  884. </el-table-column>
  885. <el-table-column
  886. prop="agentName"
  887. header-align="center"
  888. align="center"
  889. min-width="120"
  890. label="代理商名称">
  891. </el-table-column>
  892. </el-table>
  893. </el-main>
  894. </el-container>
  895. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  896. <el-button type="primary" @click="agentModelFlag = false">关闭</el-button>
  897. </el-footer>
  898. </el-dialog>
  899. <!-- 制造商-> 快速新增 -->
  900. <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="manufacturerModelFlag" width="900px">
  901. <div style="font-size: 12px">
  902. <el-form :inline="true" label-position="top" :model="manufacturerData">
  903. <el-form-item :label="'制造商编码'">
  904. <el-input v-model="manufacturerData.manufacturerId" clearable style="width: 120px"></el-input>
  905. </el-form-item>
  906. <el-form-item :label="'制造商名称'">
  907. <el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input>
  908. </el-form-item>
  909. <el-form-item :label="' '">
  910. <el-button type="primary" @click="getManufacturerList()">查询</el-button>
  911. </el-form-item>
  912. </el-form>
  913. </div>
  914. <el-container style="margin-top: 0px;">
  915. <el-main style="width: 350px; padding: 1px">
  916. <span style="font-size: 12px" >可选制造商:</span>
  917. <el-table
  918. height="400px"
  919. :data="manufacturerList1"
  920. border
  921. ref="manufacturerTable1"
  922. @row-click="manufacturerClickRow1"
  923. @selection-change="selectionManufacturer1"
  924. highlight-current-row
  925. style="width: 100%">
  926. <el-table-column
  927. type="selection"
  928. header-align="center"
  929. align="center"
  930. :selectable="selectFlag"
  931. width="50">
  932. </el-table-column>
  933. <el-table-column
  934. prop="manufacturerId"
  935. header-align="center"
  936. align="center"
  937. min-width="80"
  938. label="制造商编码">
  939. </el-table-column>
  940. <el-table-column
  941. prop="manufacturerName"
  942. header-align="center"
  943. align="center"
  944. min-width="120"
  945. label="制造商名称">
  946. </el-table-column>
  947. </el-table>
  948. </el-main>
  949. <el-main style="width: 111px;padding: -1px">
  950. <div style="margin-top: 182px;margin-left: 18px">
  951. <el-button type="primary" @click="addManufacturer()">添加>></el-button>
  952. </div>
  953. <div style="margin-top: 15px;margin-left: 18px">
  954. <el-button type="primary" @click="deleteManufacturer()">删除<<</el-button>
  955. </div>
  956. </el-main>
  957. <el-main style="width: 350px;padding: 1px">
  958. <span style="font-size: 12px" >已有制造商:</span>
  959. <el-table
  960. height="400px"
  961. :data="manufacturerList2"
  962. border
  963. ref="manufacturerTable2"
  964. @row-click="manufacturerClickRow2"
  965. @selection-change="selectionManufacturer2"
  966. highlight-current-row
  967. style="width: 100%">
  968. <el-table-column
  969. type="selection"
  970. header-align="center"
  971. align="center"
  972. :selectable="selectFlag"
  973. width="50">
  974. </el-table-column>
  975. <el-table-column
  976. prop="manufacturerId"
  977. header-align="center"
  978. align="center"
  979. min-width="80"
  980. label="制造商编码">
  981. </el-table-column>
  982. <el-table-column
  983. prop="manufacturerName"
  984. header-align="center"
  985. align="center"
  986. min-width="120"
  987. label="制造商名称">
  988. </el-table-column>
  989. </el-table>
  990. </el-main>
  991. </el-container>
  992. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  993. <el-button type="primary" @click="manufacturerModelFlag = false">关闭</el-button>
  994. </el-footer>
  995. </el-dialog>
  996. <!-- 默认库位-> 快速新增 -->
  997. <el-dialog title="新增" @close="refreshDetailList" :close-on-click-modal="false" v-drag :visible.sync="locationModelFlag" width="900px">
  998. <div style="font-size: 12px">
  999. <el-form :inline="true" label-position="top" :model="locationData">
  1000. <el-form-item :label="'库位编码'">
  1001. <el-input v-model="locationData.locationId" clearable style="width: 120px"></el-input>
  1002. </el-form-item>
  1003. <el-form-item :label="'库位名称'">
  1004. <el-input v-model="locationData.locationName" clearable style="width: 120px"></el-input>
  1005. </el-form-item>
  1006. <el-form-item :label="' '">
  1007. <el-button type="primary" @click="getLocationList()">查询</el-button>
  1008. </el-form-item>
  1009. </el-form>
  1010. </div>
  1011. <el-container style="margin-top: 0px;">
  1012. <el-main style="width: 350px; padding: 1px">
  1013. <span style="font-size: 12px" >可选库位:</span>
  1014. <el-table
  1015. height="400px"
  1016. :data="locationList1"
  1017. border
  1018. ref="locationTable1"
  1019. @row-click="locationClickRow1"
  1020. @selection-change="selectionLocation1"
  1021. highlight-current-row
  1022. style="width: 100%">
  1023. <el-table-column
  1024. type="selection"
  1025. header-align="center"
  1026. align="center"
  1027. :selectable="selectFlag"
  1028. width="50">
  1029. </el-table-column>
  1030. <el-table-column
  1031. prop="locationId"
  1032. header-align="center"
  1033. align="center"
  1034. min-width="80"
  1035. label="库位编码">
  1036. </el-table-column>
  1037. <el-table-column
  1038. prop="locationName"
  1039. header-align="center"
  1040. align="center"
  1041. min-width="120"
  1042. label="库位名称">
  1043. </el-table-column>
  1044. </el-table>
  1045. </el-main>
  1046. <el-main style="width: 111px;padding: -1px">
  1047. <div style="margin-top: 182px;margin-left: 18px">
  1048. <el-button type="primary" @click="addLocation()">添加>></el-button>
  1049. </div>
  1050. <div style="margin-top: 15px;margin-left: 18px">
  1051. <el-button type="primary" @click="deleteLocation()">删除<<</el-button>
  1052. </div>
  1053. </el-main>
  1054. <el-main style="width: 350px;padding: 1px">
  1055. <span style="font-size: 12px" >已有库位:</span>
  1056. <el-table
  1057. height="400px"
  1058. :data="locationList2"
  1059. border
  1060. ref="locationTable2"
  1061. @row-click="locationClickRow2"
  1062. @selection-change="selectionLocation2"
  1063. highlight-current-row
  1064. style="width: 100%">
  1065. <el-table-column
  1066. type="selection"
  1067. header-align="center"
  1068. align="center"
  1069. :selectable="selectFlag"
  1070. width="50">
  1071. </el-table-column>
  1072. <el-table-column
  1073. prop="locationId"
  1074. header-align="center"
  1075. align="center"
  1076. min-width="80"
  1077. label="库位编码">
  1078. </el-table-column>
  1079. <el-table-column
  1080. prop="locationName"
  1081. header-align="center"
  1082. align="center"
  1083. min-width="120"
  1084. label="库位名称">
  1085. </el-table-column>
  1086. </el-table>
  1087. </el-main>
  1088. </el-container>
  1089. <el-footer style="height:40px;margin-top: 20px;text-align:center">
  1090. <el-button type="primary" @click="locationModelFlag = false">关闭</el-button>
  1091. </el-footer>
  1092. </el-dialog>
  1093. <!-- chooseList模态框 -->
  1094. <Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
  1095. <!-- 上传文件的modal -->
  1096. <partUploadFile ref="partUploadFile" @refreshPageTables="getFileContentData()" v-drag></partUploadFile>
  1097. </div>
  1098. </template>
  1099. <script>
  1100. import {
  1101. partInformationSearch, // 物料信息列表查询
  1102. partInformationSave, // 物料信息新增
  1103. partInformationEdit, // 物料信息编辑
  1104. partInformationDelete, // 物料信息删除
  1105. getPartItem, // 查询物料属性
  1106. savePartItemValue, // 编辑属性值
  1107. getAgentList, // 获取代理商列表
  1108. getPartAgent, // 获取物料代理商
  1109. getAgentListBy, // 根据条件查询可选代理商
  1110. addPartAgent, // 新增物料代理商
  1111. deletePartAgent, // 删除物料代理商
  1112. deleteAgent, // 删除物料代理商(单删)
  1113. getManufacturerList, // 获取制造商列表
  1114. getPartManufacturer, // 获取物料制造商
  1115. getManufacturerListBy, // 根据条件查询可选制造商
  1116. addPartManufacturer, // 新增物料制造商
  1117. deletePartManufacturer, // 删除物料制造商
  1118. deleteManufacturer, // 删除物料制造商(单删)
  1119. getLocationList, // 获取库位列表
  1120. getDefaultLocation, // 获取物料库位
  1121. getLocationListBy, // 根据条件查询可选库位
  1122. addDefaultLocation, // 新增物料库位
  1123. deleteDefaultLocation, // 删除物料库位
  1124. deleteLocation, // 删除物料库位(单删)
  1125. commitItemValue, // 修改物料属性值
  1126. deleteItem, // 删除模板属性,
  1127. getItemLists, // 获取模板属性
  1128. addPartItem, // 新增物料属性
  1129. deletePartItem, // 删除物料属性
  1130. queryPartItem,
  1131. queryMasterField, // 根据物料编码查 masterPart 属性
  1132. } from '@/api/part/partInformation.js'
  1133. import {
  1134. getFileContentList, // 获取物料单附件列表
  1135. deleteQuotationFile, // 文件删除
  1136. downLoadQuotationFile // 文件下载
  1137. } from '@/api/quotation/quotationInformation.js'
  1138. import Chooselist from '@/views/modules/common/Chooselist'
  1139. import partUploadFile from "./part_upload_file"
  1140. import DictDataSelect from '../sys/dict-data-select.vue'
  1141. export default {
  1142. components: {
  1143. DictDataSelect,
  1144. Chooselist,
  1145. partUploadFile
  1146. },
  1147. watch: {
  1148. searchData: {
  1149. deep: true,
  1150. handler: function (newV, oldV) {
  1151. this.searchData.partNo = this.searchData.partNo.toUpperCase()
  1152. }
  1153. },
  1154. modalData: {
  1155. deep: true,
  1156. handler: function (newV, oldV) {
  1157. this.modalData.partNo = this.modalData.partNo.toUpperCase()
  1158. }
  1159. }
  1160. },
  1161. data () {
  1162. return {
  1163. // 导出
  1164. exportData: [],
  1165. exportName: '物料档案管理' + this.dayjs().format('YYYYMMDDHHmmss'),
  1166. exportHeader: ['物料档案管理'],
  1167. exportFooter: [],
  1168. resultList: [],
  1169. // ======== 行高 ========
  1170. height: 200,
  1171. secondHeight: 200,
  1172. // ======== 分页 ========
  1173. pageIndex: 1,
  1174. pageSize: 50,
  1175. totalPage: 0,
  1176. selectedDataNum: 0,
  1177. tempCodeNo: '',
  1178. // 条件查询
  1179. searchData: {
  1180. site: this.$store.state.user.site,
  1181. partNo: '',
  1182. erpPartNo: '',
  1183. startDate: '',
  1184. endDate: '',
  1185. partDesc: '',
  1186. spec: '',
  1187. page: 1,
  1188. limit: 10
  1189. },
  1190. // 其它
  1191. dataListLoading: false,
  1192. // 初始页签
  1193. activeTable: 'part_item',
  1194. // ======== 数据对象 ========
  1195. modalData: {
  1196. flag: '',
  1197. title: '',
  1198. site: this.$store.state.user.site,
  1199. partNo: '',
  1200. partDesc: '',
  1201. spec: '',
  1202. partTypeDb: '',
  1203. partType: '',
  1204. familyId: '',
  1205. familyName: '',
  1206. groupId: '',
  1207. groupName: '',
  1208. umId: '',
  1209. umName: '',
  1210. weightNet: '',
  1211. uomForWeightNet: '',
  1212. volumeNet: '',
  1213. uomForVolumeNet: '',
  1214. lotTrackingCode: '',
  1215. active: '',
  1216. remark: '',
  1217. supplierId: '',
  1218. supplierName: '',
  1219. productGroupId1: '',
  1220. productGroupName1: '',
  1221. productGroupId2: '',
  1222. productGroupName2: '',
  1223. productGroupId3: '',
  1224. productGroupName3: '',
  1225. productGroupId4: '',
  1226. productGroupName4: '',
  1227. erpPartNo: '',
  1228. codeNo: '',
  1229. codeDesc: '',
  1230. manufacturerId: '',
  1231. manufacturerName: '',
  1232. createDate: '',
  1233. createBy: '',
  1234. updateDate: '',
  1235. updateBy: '',
  1236. agentId: '',
  1237. agentName: '',
  1238. typeDesignation: '',
  1239. hazardCode: '',
  1240. hazardDesc: '',
  1241. assetClass: '',
  1242. assetClassDesc: '',
  1243. dimQuality: '',
  1244. abcClass: '',
  1245. abcClassDesc: '',
  1246. frequencyClass: '',
  1247. lifecycleStage: '',
  1248. isoCountry: '',
  1249. isoCountryDesc: '',
  1250. manufacturingLeadTime: '',
  1251. expectedLeadTime: '',
  1252. regionOfOrigin: '',
  1253. regionOfOriginDesc: '',
  1254. durabilityWeek: '',
  1255. customsStarNo: '',
  1256. customsStarDesc: '',
  1257. durabilityDay: '',
  1258. intrastatConvFactor: '',
  1259. umDesc: '',
  1260. status: '',
  1261. partStatus: '',
  1262. partStatusDesc: '',
  1263. configurationId: '',
  1264. estimatedMaterialCost: '',
  1265. inventoryValuationMethod: '',
  1266. partCostGroupId: '',
  1267. partCostGroupDesc: '',
  1268. inventoryPartCostLevel: '',
  1269. invoiceConsideration: '',
  1270. zeroCostFlag: '',
  1271. planningMethod: '',
  1272. planningMethodDesc: '',
  1273. safetyStock: '',
  1274. minOrderQty: '',
  1275. maxOrderQty: '',
  1276. mulOrderQty: '',
  1277. safetyLeadTime: '',
  1278. shrinkageFac: '',
  1279. stdOrderQty: '',
  1280. cumLeadTime: '',
  1281. backFlushPart: '',
  1282. byProdAsSupplyInMrpDb: '',
  1283. unprotectedLeadTime: '',
  1284. issueType: '',
  1285. mrpControlFlagDb: '',
  1286. fixedLeadTimeDay: '',
  1287. overReporting: '',
  1288. useTheoreticalDensityDb: '',
  1289. variableLeadTimeDay: '',
  1290. overReportTolerance: '',
  1291. fixedLeadTimeHour: '',
  1292. density: '',
  1293. variableLeadTimeHour: ''
  1294. },
  1295. itemData: {
  1296. site: this.$store.state.user.site,
  1297. partNo: '',
  1298. propertiesItemNo: '',
  1299. codeNo: '',
  1300. itemDesc: '',
  1301. textValue: '',
  1302. numValue: '',
  1303. recordType: 'IP'
  1304. },
  1305. agentData: {
  1306. site: this.$store.state.user.site,
  1307. agentId: '',
  1308. agentName: '',
  1309. },
  1310. manufacturerData: {
  1311. site: this.$store.state.user.site,
  1312. manufacturerId: '',
  1313. manufacturerName: '',
  1314. },
  1315. locationData: {
  1316. site: this.$store.state.user.site,
  1317. locationId: '',
  1318. locationName: '',
  1319. },
  1320. // ======== 数据列表 ========
  1321. dataList: [],
  1322. partItemList: [],
  1323. updatePartItemList: [],
  1324. partAgentList: [],
  1325. partManufacturerList: [],
  1326. defaultLocationList: [],
  1327. fileContentList: [],
  1328. availableValueList:[],
  1329. agentList: [],
  1330. agentSelections: [],
  1331. agentSelections1: [],
  1332. agentSelections2: [],
  1333. agentList1: [],
  1334. agentList2: [],
  1335. manufacturerList: [],
  1336. manufacturerSelections: [],
  1337. manufacturerSelections1: [],
  1338. manufacturerSelections2: [],
  1339. manufacturerList1: [],
  1340. manufacturerList2: [],
  1341. locationList: [],
  1342. locationSelections: [],
  1343. locationSelections1: [],
  1344. locationSelections2: [],
  1345. locationList1: [],
  1346. locationList2: [],
  1347. itemSelections1: [],
  1348. itemSelections2: [],
  1349. itemList1:[],
  1350. itemList2:[],
  1351. // ======== 列表表头 ========
  1352. columnList: [
  1353. {
  1354. userId: this.$store.state.user.name,
  1355. functionId: 104001,
  1356. serialNumber: '104001Table1PartNo',
  1357. tableId: '104001Table1',
  1358. tableName: '物料信息表',
  1359. columnProp: 'partNo',
  1360. headerAlign: 'center',
  1361. align: 'center',
  1362. columnLabel: '物料编码',
  1363. columnHidden: false,
  1364. columnImage: false,
  1365. columnSortable: false,
  1366. sortLv: 0,
  1367. status: true,
  1368. fixed: '',
  1369. columnWidth: 120
  1370. },
  1371. {
  1372. userId: this.$store.state.user.name,
  1373. functionId: 104001,
  1374. serialNumber: '104001Table1PartDesc',
  1375. tableId: '104001Table1',
  1376. tableName: '物料信息表',
  1377. columnProp: 'partDesc',
  1378. headerAlign: 'center',
  1379. align: 'left',
  1380. columnLabel: '物料描述',
  1381. columnHidden: false,
  1382. columnImage: false,
  1383. columnSortable: false,
  1384. sortLv: 0,
  1385. status: true,
  1386. fixed: '',
  1387. columnWidth: 120
  1388. },
  1389. {
  1390. userId: this.$store.state.user.name,
  1391. functionId: 104001,
  1392. serialNumber: '104001Table1Status',
  1393. tableId: '104001Table1',
  1394. tableName: '物料信息表',
  1395. columnProp: 'status',
  1396. headerAlign: 'center',
  1397. align: 'center',
  1398. columnLabel: '是否为正式物料',
  1399. columnHidden: false,
  1400. columnImage: false,
  1401. columnSortable: false,
  1402. sortLv: 0,
  1403. status: true,
  1404. fixed: '',
  1405. columnWidth: 100
  1406. },
  1407. {
  1408. userId: this.$store.state.user.name,
  1409. functionId: 104001,
  1410. serialNumber: '104001Table1Spec',
  1411. tableId: '104001Table1',
  1412. tableName: '物料信息表',
  1413. columnProp: 'spec',
  1414. headerAlign: 'center',
  1415. align: 'center',
  1416. columnLabel: '规格型号',
  1417. columnHidden: false,
  1418. columnImage: false,
  1419. columnSortable: false,
  1420. sortLv: 0,
  1421. status: true,
  1422. fixed: '',
  1423. columnWidth: 120
  1424. },
  1425. {
  1426. userId: this.$store.state.user.name,
  1427. functionId: 104001,
  1428. serialNumber: '104001Table1UmId',
  1429. tableId: '104001Table1',
  1430. tableName: '物料信息表',
  1431. columnProp: 'umName',
  1432. headerAlign: 'center',
  1433. align: 'center',
  1434. columnLabel: '库存计量单位',
  1435. columnHidden: false,
  1436. columnImage: false,
  1437. columnSortable: false,
  1438. sortLv: 0,
  1439. status: true,
  1440. fixed: '',
  1441. columnWidth: 60
  1442. },
  1443. {
  1444. userId: this.$store.state.user.name,
  1445. functionId: 104001,
  1446. serialNumber: '104001Table1WeightNet',
  1447. tableId: '104001Table1',
  1448. tableName: '物料信息表',
  1449. columnProp: 'weightNet',
  1450. headerAlign: 'center',
  1451. align: 'right',
  1452. columnLabel: '净重',
  1453. columnHidden: false,
  1454. columnImage: false,
  1455. columnSortable: false,
  1456. sortLv: 0,
  1457. status: true,
  1458. fixed: '',
  1459. columnWidth: 60
  1460. },
  1461. {
  1462. userId: this.$store.state.user.name,
  1463. functionId: 104001,
  1464. serialNumber: '104001Table1UomForWeightNet',
  1465. tableId: '104001Table1',
  1466. tableName: '物料信息表',
  1467. columnProp: 'uomForWeightNet',
  1468. headerAlign: 'center',
  1469. align: 'center',
  1470. columnLabel: '净重单位',
  1471. columnHidden: false,
  1472. columnImage: false,
  1473. columnSortable: false,
  1474. sortLv: 0,
  1475. status: true,
  1476. fixed: '',
  1477. columnWidth: 60
  1478. },
  1479. {
  1480. userId: this.$store.state.user.name,
  1481. functionId: 104001,
  1482. serialNumber: '104001Table1VolumeNet',
  1483. tableId: '104001Table1',
  1484. tableName: '物料信息表',
  1485. columnProp: 'volumeNet',
  1486. headerAlign: 'center',
  1487. align: 'right',
  1488. columnLabel: '净数量',
  1489. columnHidden: false,
  1490. columnImage: false,
  1491. columnSortable: false,
  1492. sortLv: 0,
  1493. status: true,
  1494. fixed: '',
  1495. columnWidth: 60
  1496. },
  1497. {
  1498. userId: this.$store.state.user.name,
  1499. functionId: 104001,
  1500. serialNumber: '104001Table1UomForVolumeNet',
  1501. tableId: '104001Table1',
  1502. tableName: '物料信息表',
  1503. columnProp: 'uomForVolumeNet',
  1504. headerAlign: 'center',
  1505. align: 'center',
  1506. columnLabel: '数量单位',
  1507. columnHidden: false,
  1508. columnImage: false,
  1509. columnSortable: false,
  1510. sortLv: 0,
  1511. status: true,
  1512. fixed: '',
  1513. columnWidth: 60
  1514. },
  1515. {
  1516. userId: this.$store.state.user.name,
  1517. functionId: 104001,
  1518. serialNumber: '104001Table1LotTrackingCode',
  1519. tableId: '104001Table1',
  1520. tableName: '物料信息表',
  1521. columnProp: 'lotTrackingCode',
  1522. headerAlign: 'center',
  1523. align: 'left',
  1524. columnLabel: '批号跟踪',
  1525. columnHidden: false,
  1526. columnImage: false,
  1527. columnSortable: false,
  1528. sortLv: 0,
  1529. status: true,
  1530. fixed: '',
  1531. columnWidth: 60
  1532. },
  1533. {
  1534. userId: this.$store.state.user.name,
  1535. functionId: 104001,
  1536. serialNumber: '104001Table1PartType',
  1537. tableId: '104001Table1',
  1538. tableName: '物料信息表',
  1539. columnProp: 'partType',
  1540. headerAlign: 'center',
  1541. align: 'center',
  1542. columnLabel: '零件类型',
  1543. columnHidden: false,
  1544. columnImage: false,
  1545. columnSortable: false,
  1546. sortLv: 0,
  1547. status: true,
  1548. fixed: '',
  1549. columnWidth: 80
  1550. },
  1551. {
  1552. userId: this.$store.state.user.name,
  1553. functionId: 104001,
  1554. serialNumber: '104001Table1FamilyName',
  1555. tableId: '104001Table1',
  1556. tableName: '物料信息表',
  1557. columnProp: 'familyName',
  1558. headerAlign: 'center',
  1559. align: 'center',
  1560. columnLabel: '产品大类',
  1561. columnHidden: false,
  1562. columnImage: false,
  1563. columnSortable: false,
  1564. sortLv: 0,
  1565. status: true,
  1566. fixed: '',
  1567. columnWidth: 80
  1568. },
  1569. {
  1570. userId: this.$store.state.user.name,
  1571. functionId: 104001,
  1572. serialNumber: '104001Table1GroupName',
  1573. tableId: '104001Table1',
  1574. tableName: '物料信息表',
  1575. columnProp: 'groupName',
  1576. headerAlign: 'center',
  1577. align: 'center',
  1578. columnLabel: '产品代码',
  1579. columnHidden: false,
  1580. columnImage: false,
  1581. columnSortable: false,
  1582. sortLv: 0,
  1583. status: true,
  1584. fixed: '',
  1585. columnWidth: 80
  1586. },
  1587. {
  1588. userId: this.$store.state.user.name,
  1589. functionId: 104001,
  1590. serialNumber: '104001Table1OtherGroup1',
  1591. tableId: '104001Table1',
  1592. tableName: '物料信息表',
  1593. columnProp: 'productGroupName1',
  1594. headerAlign: 'center',
  1595. align: 'center',
  1596. columnLabel: '商品组1',
  1597. columnHidden: false,
  1598. columnImage: false,
  1599. columnSortable: false,
  1600. sortLv: 0,
  1601. status: true,
  1602. fixed: '',
  1603. columnWidth: 80
  1604. },
  1605. {
  1606. userId: this.$store.state.user.name,
  1607. functionId: 104001,
  1608. serialNumber: '104001Table1OtherGroup2',
  1609. tableId: '104001Table1',
  1610. tableName: '物料信息表',
  1611. columnProp: 'productGroupName2',
  1612. headerAlign: 'center',
  1613. align: 'center',
  1614. columnLabel: '商品组2',
  1615. columnHidden: false,
  1616. columnImage: false,
  1617. columnSortable: false,
  1618. sortLv: 0,
  1619. status: true,
  1620. fixed: '',
  1621. columnWidth: 80
  1622. },
  1623. {
  1624. userId: this.$store.state.user.name,
  1625. functionId: 104001,
  1626. serialNumber: '104001Table1OtherGroup3',
  1627. tableId: '104001Table1',
  1628. tableName: '物料信息表',
  1629. columnProp: 'productGroupName3',
  1630. headerAlign: 'center',
  1631. align: 'center',
  1632. columnLabel: '会计组',
  1633. columnHidden: false,
  1634. columnImage: false,
  1635. columnSortable: false,
  1636. sortLv: 0,
  1637. status: true,
  1638. fixed: '',
  1639. columnWidth: 80
  1640. },
  1641. {
  1642. userId: this.$store.state.user.name,
  1643. functionId: 104001,
  1644. serialNumber: '104001Table1OtherGroup4',
  1645. tableId: '104001Table1',
  1646. tableName: '物料信息表',
  1647. columnProp: 'productGroupName4',
  1648. headerAlign: 'center',
  1649. align: 'center',
  1650. columnLabel: '计划人',
  1651. columnHidden: false,
  1652. columnImage: false,
  1653. columnSortable: false,
  1654. sortLv: 0,
  1655. status: true,
  1656. fixed: '',
  1657. columnWidth: 80
  1658. },
  1659. {
  1660. userId: this.$store.state.user.name,
  1661. functionId: 104001,
  1662. serialNumber: '104001Table1ItemNo',
  1663. tableId: '104001Table1',
  1664. tableName: '物料信息表',
  1665. columnProp: 'codeDesc',
  1666. headerAlign: 'center',
  1667. align: 'center',
  1668. columnLabel: '属性模板',
  1669. columnHidden: false,
  1670. columnImage: false,
  1671. columnSortable: false,
  1672. sortLv: 0,
  1673. status: true,
  1674. fixed: '',
  1675. columnWidth: 100
  1676. },
  1677. {
  1678. userId: this.$store.state.user.name,
  1679. functionId: 104001,
  1680. serialNumber: '104001Table1Remark',
  1681. tableId: '104001Table1',
  1682. tableName: '物料信息表',
  1683. columnProp: 'remark',
  1684. headerAlign: 'center',
  1685. align: 'left',
  1686. columnLabel: '备注',
  1687. columnHidden: false,
  1688. columnImage: false,
  1689. columnSortable: false,
  1690. sortLv: 0,
  1691. status: true,
  1692. fixed: '',
  1693. columnWidth: 160
  1694. },
  1695. {
  1696. userId: this.$store.state.user.name,
  1697. functionId: 104001,
  1698. serialNumber: '104001Table1Active',
  1699. tableId: '104001Table1',
  1700. tableName: '物料信息表',
  1701. columnProp: 'active',
  1702. headerAlign: 'center',
  1703. align: 'center',
  1704. columnLabel: '是否在用',
  1705. columnHidden: false,
  1706. columnImage: false,
  1707. columnSortable: false,
  1708. sortLv: 0,
  1709. status: true,
  1710. fixed: '',
  1711. columnWidth: 60
  1712. },
  1713. {
  1714. userId: this.$store.state.user.name,
  1715. functionId: 104001,
  1716. serialNumber: '104001Table1CreateDate',
  1717. tableId: '104001Table1',
  1718. tableName: '物料信息表',
  1719. columnProp: 'createDate',
  1720. headerAlign: 'center',
  1721. align: 'center',
  1722. columnLabel: '创建时间',
  1723. columnHidden: false,
  1724. columnImage: false,
  1725. columnSortable: false,
  1726. sortLv: 0,
  1727. status: true,
  1728. fixed: '',
  1729. columnWidth: 160
  1730. },
  1731. {
  1732. userId: this.$store.state.user.name,
  1733. functionId: 104001,
  1734. serialNumber: '104001Table1CreateBy',
  1735. tableId: '104001Table1',
  1736. tableName: '物料信息表',
  1737. columnProp: 'createBy',
  1738. headerAlign: 'center',
  1739. align: 'center',
  1740. columnLabel: '创建人',
  1741. columnHidden: false,
  1742. columnImage: false,
  1743. columnSortable: false,
  1744. sortLv: 0,
  1745. status: true,
  1746. fixed: '',
  1747. columnWidth: 80
  1748. },
  1749. {
  1750. userId: this.$store.state.user.name,
  1751. functionId: 104001,
  1752. serialNumber: '104001Table1UpdateDate',
  1753. tableId: '104001Table1',
  1754. tableName: '物料信息表',
  1755. columnProp: 'updateDate',
  1756. headerAlign: 'center',
  1757. align: 'center',
  1758. columnLabel: '更新时间',
  1759. columnHidden: false,
  1760. columnImage: false,
  1761. columnSortable: false,
  1762. sortLv: 0,
  1763. status: true,
  1764. fixed: '',
  1765. columnWidth: 160
  1766. },
  1767. {
  1768. userId: this.$store.state.user.name,
  1769. functionId: 104001,
  1770. serialNumber: '104001Table1UpdateBy',
  1771. tableId: '104001Table1',
  1772. tableName: '物料信息表',
  1773. columnProp: 'updateBy',
  1774. headerAlign: 'center',
  1775. align: 'center',
  1776. columnLabel: '更新人',
  1777. columnHidden: false,
  1778. columnImage: false,
  1779. columnSortable: false,
  1780. sortLv: 0,
  1781. status: true,
  1782. fixed: '',
  1783. columnWidth: 80
  1784. }
  1785. ],
  1786. columnItemList: [
  1787. {
  1788. userId: this.$store.state.user.name,
  1789. functionId: 104001,
  1790. serialNumber: '104001Table2PropertiesItemID',
  1791. tableId: "104001Table2",
  1792. tableName: "物料属性表",
  1793. columnProp: 'propertiesItemNo',
  1794. headerAlign: "center",
  1795. align: "center",
  1796. columnLabel: '属性编码',
  1797. columnHidden: false,
  1798. columnImage: false,
  1799. columnSortable: true,
  1800. sortLv: 0,
  1801. status: true,
  1802. fixed: '',
  1803. columnWidth: 90,
  1804. },
  1805. {
  1806. userId: this.$store.state.user.name,
  1807. functionId: 104001,
  1808. serialNumber: '104001Table2PropertiesItemDesc',
  1809. tableId: "104001Table2",
  1810. tableName: "物料属性表",
  1811. columnProp: 'itemDesc',
  1812. headerAlign: "center",
  1813. align: "center",
  1814. columnLabel: '属性名称',
  1815. columnHidden: false,
  1816. columnImage: false,
  1817. columnSortable: true,
  1818. sortLv: 0,
  1819. status: true,
  1820. fixed: '',
  1821. columnWidth: 90,
  1822. },
  1823. {
  1824. userId: this.$store.state.user.name,
  1825. functionId: 104001,
  1826. serialNumber: '104001Table2ValueType',
  1827. tableId: "104001Table2",
  1828. tableName: "物料属性表",
  1829. columnProp: 'valueType',
  1830. headerAlign: "center",
  1831. align: "center",
  1832. columnLabel: '属性类型',
  1833. columnHidden: false,
  1834. columnImage: false,
  1835. columnSortable: true,
  1836. sortLv: 0,
  1837. status: true,
  1838. fixed: '',
  1839. columnWidth: 70,
  1840. },
  1841. {
  1842. userId: this.$store.state.user.name,
  1843. functionId: 104001,
  1844. serialNumber: '104001Table2ValueChooseFlag',
  1845. tableId: "104001Table2",
  1846. tableName: "物料属性表",
  1847. columnProp: 'textValue',
  1848. headerAlign: "center",
  1849. align: "center",
  1850. columnLabel: '文本值',
  1851. columnHidden: false,
  1852. columnImage: false,
  1853. columnSortable: true,
  1854. sortLv: 0,
  1855. status: true,
  1856. fixed: '',
  1857. columnWidth: 70,
  1858. },
  1859. {
  1860. userId: this.$store.state.user.name,
  1861. functionId: 104001,
  1862. serialNumber: '104001Table2ValueChooseFlag',
  1863. tableId: "104001Table2",
  1864. tableName: "物料属性表",
  1865. columnProp: 'numValue',
  1866. headerAlign: "center",
  1867. align: "center",
  1868. columnLabel: '数字值',
  1869. columnHidden: false,
  1870. columnImage: false,
  1871. columnSortable: true,
  1872. sortLv: 0,
  1873. status: true,
  1874. fixed: '',
  1875. columnWidth: 70,
  1876. },
  1877. ],
  1878. updateColumnItemList: [
  1879. {
  1880. userId: this.$store.state.user.name,
  1881. functionId: 104001,
  1882. serialNumber: '104001Table6PropertiesItemID',
  1883. tableId: "104001Table6",
  1884. tableName: "物料属性表",
  1885. columnProp: 'propertiesItemNo',
  1886. headerAlign: "center",
  1887. align: "center",
  1888. columnLabel: '属性编码',
  1889. columnHidden: false,
  1890. columnImage: false,
  1891. columnSortable: true,
  1892. sortLv: 0,
  1893. status: true,
  1894. fixed: '',
  1895. columnWidth: 90,
  1896. },
  1897. {
  1898. userId: this.$store.state.user.name,
  1899. functionId: 104001,
  1900. serialNumber: '104001Table6PropertiesItemDesc',
  1901. tableId: "104001Table6",
  1902. tableName: "物料属性表",
  1903. columnProp: 'itemDesc',
  1904. headerAlign: "center",
  1905. align: "center",
  1906. columnLabel: '属性名称',
  1907. columnHidden: false,
  1908. columnImage: false,
  1909. columnSortable: true,
  1910. sortLv: 0,
  1911. status: true,
  1912. fixed: '',
  1913. columnWidth: 90,
  1914. },
  1915. {
  1916. userId: this.$store.state.user.name,
  1917. functionId: 104001,
  1918. serialNumber: '104001Table6ValueType',
  1919. tableId: "104001Table6",
  1920. tableName: "物料属性表",
  1921. columnProp: 'valueType',
  1922. headerAlign: "center",
  1923. align: "center",
  1924. columnLabel: '属性类型',
  1925. columnHidden: false,
  1926. columnImage: false,
  1927. columnSortable: true,
  1928. sortLv: 0,
  1929. status: true,
  1930. fixed: '',
  1931. columnWidth: 70,
  1932. },
  1933. ],
  1934. columnAgentList: [
  1935. {
  1936. userId: this.$store.state.user.name,
  1937. functionId: 104001,
  1938. serialNumber: '104001Table3AgentId',
  1939. tableId: "104001Table3",
  1940. tableName: "物料代理商表",
  1941. columnProp: 'agentId',
  1942. headerAlign: "center",
  1943. align: "center",
  1944. columnLabel: '代理商编码',
  1945. columnHidden: false,
  1946. columnImage: false,
  1947. columnSortable: true,
  1948. sortLv: 0,
  1949. status: true,
  1950. fixed: '',
  1951. },
  1952. {
  1953. userId: this.$store.state.user.name,
  1954. functionId: 104001,
  1955. serialNumber: '104001Table3AgentName',
  1956. tableId: "104001Table3",
  1957. tableName: "物料代理商表",
  1958. columnProp: 'agentName',
  1959. headerAlign: "center",
  1960. align: "center",
  1961. columnLabel: '代理商名称',
  1962. columnHidden: false,
  1963. columnImage: false,
  1964. columnSortable: true,
  1965. sortLv: 0,
  1966. status: true,
  1967. fixed: '',
  1968. },
  1969. {
  1970. userId: this.$store.state.user.name,
  1971. functionId: 104001,
  1972. serialNumber: '104001Table3Active',
  1973. tableId: '104001Table3',
  1974. tableName: '物料代理商表',
  1975. columnProp: 'active',
  1976. headerAlign: 'center',
  1977. align: 'center',
  1978. columnLabel: '是否在用',
  1979. columnHidden: false,
  1980. columnImage: false,
  1981. columnSortable: false,
  1982. sortLv: 0,
  1983. status: true,
  1984. fixed: '',
  1985. },
  1986. {
  1987. userId: this.$store.state.user.name,
  1988. functionId: 104001,
  1989. serialNumber: '104001Table3CreateDate',
  1990. tableId: '104001Table3',
  1991. tableName: '物料代理商表',
  1992. columnProp: 'createDate',
  1993. headerAlign: 'center',
  1994. align: 'center',
  1995. columnLabel: '创建时间',
  1996. columnHidden: false,
  1997. columnImage: false,
  1998. columnSortable: false,
  1999. sortLv: 0,
  2000. status: true,
  2001. fixed: '',
  2002. },
  2003. {
  2004. userId: this.$store.state.user.name,
  2005. functionId: 104001,
  2006. serialNumber: '104001Table3CreateBy',
  2007. tableId: '104001Table3',
  2008. tableName: '物料代理商表',
  2009. columnProp: 'createBy',
  2010. headerAlign: 'center',
  2011. align: 'center',
  2012. columnLabel: '创建人',
  2013. columnHidden: false,
  2014. columnImage: false,
  2015. columnSortable: false,
  2016. sortLv: 0,
  2017. status: true,
  2018. fixed: '',
  2019. },
  2020. {
  2021. userId: this.$store.state.user.name,
  2022. functionId: 104001,
  2023. serialNumber: '104001Table3UpdateDate',
  2024. tableId: '104001Table3',
  2025. tableName: '物料代理商表',
  2026. columnProp: 'updateDate',
  2027. headerAlign: 'center',
  2028. align: 'center',
  2029. columnLabel: '更新时间',
  2030. columnHidden: false,
  2031. columnImage: false,
  2032. columnSortable: false,
  2033. sortLv: 0,
  2034. status: true,
  2035. fixed: '',
  2036. },
  2037. {
  2038. userId: this.$store.state.user.name,
  2039. functionId: 104001,
  2040. serialNumber: '104001Table3UpdateBy',
  2041. tableId: '104001Table3',
  2042. tableName: '物料代理商表',
  2043. columnProp: 'updateBy',
  2044. headerAlign: 'center',
  2045. align: 'center',
  2046. columnLabel: '更新人',
  2047. columnHidden: false,
  2048. columnImage: false,
  2049. columnSortable: false,
  2050. sortLv: 0,
  2051. status: true,
  2052. fixed: '',
  2053. }
  2054. ],
  2055. columnManufacturerList: [
  2056. {
  2057. userId: this.$store.state.user.name,
  2058. functionId: 104001,
  2059. serialNumber: '104001Table5ManufacturerId',
  2060. tableId: "104001Table5",
  2061. tableName: "物料制造商表",
  2062. columnProp: 'manufacturerId',
  2063. headerAlign: "center",
  2064. align: "center",
  2065. columnLabel: '制造商编码',
  2066. columnHidden: false,
  2067. columnImage: false,
  2068. columnSortable: true,
  2069. sortLv: 0,
  2070. status: true,
  2071. fixed: '',
  2072. },
  2073. {
  2074. userId: this.$store.state.user.name,
  2075. functionId: 104001,
  2076. serialNumber: '104001Table5ManufacturerName',
  2077. tableId: "104001Table5",
  2078. tableName: "物料制造商表",
  2079. columnProp: 'manufacturerName',
  2080. headerAlign: "center",
  2081. align: "center",
  2082. columnLabel: '制造商名称',
  2083. columnHidden: false,
  2084. columnImage: false,
  2085. columnSortable: true,
  2086. sortLv: 0,
  2087. status: true,
  2088. fixed: '',
  2089. },
  2090. {
  2091. userId: this.$store.state.user.name,
  2092. functionId: 104001,
  2093. serialNumber: '104001Table5Active',
  2094. tableId: '104001Table5',
  2095. tableName: '物料制造商表',
  2096. columnProp: 'active',
  2097. headerAlign: 'center',
  2098. align: 'center',
  2099. columnLabel: '是否在用',
  2100. columnHidden: false,
  2101. columnImage: false,
  2102. columnSortable: false,
  2103. sortLv: 0,
  2104. status: true,
  2105. fixed: '',
  2106. },
  2107. {
  2108. userId: this.$store.state.user.name,
  2109. functionId: 104001,
  2110. serialNumber: '104001Table5CreateDate',
  2111. tableId: '104001Table5',
  2112. tableName: '物料制造商表',
  2113. columnProp: 'createDate',
  2114. headerAlign: 'center',
  2115. align: 'center',
  2116. columnLabel: '创建时间',
  2117. columnHidden: false,
  2118. columnImage: false,
  2119. columnSortable: false,
  2120. sortLv: 0,
  2121. status: true,
  2122. fixed: '',
  2123. },
  2124. {
  2125. userId: this.$store.state.user.name,
  2126. functionId: 104001,
  2127. serialNumber: '104001Table5CreateBy',
  2128. tableId: '104001Table5',
  2129. tableName: '物料制造商表',
  2130. columnProp: 'createBy',
  2131. headerAlign: 'center',
  2132. align: 'center',
  2133. columnLabel: '创建人',
  2134. columnHidden: false,
  2135. columnImage: false,
  2136. columnSortable: false,
  2137. sortLv: 0,
  2138. status: true,
  2139. fixed: '',
  2140. },
  2141. {
  2142. userId: this.$store.state.user.name,
  2143. functionId: 104001,
  2144. serialNumber: '104001Table5UpdateDate',
  2145. tableId: '104001Table5',
  2146. tableName: '物料制造商表',
  2147. columnProp: 'updateDate',
  2148. headerAlign: 'center',
  2149. align: 'center',
  2150. columnLabel: '更新时间',
  2151. columnHidden: false,
  2152. columnImage: false,
  2153. columnSortable: false,
  2154. sortLv: 0,
  2155. status: true,
  2156. fixed: '',
  2157. },
  2158. {
  2159. userId: this.$store.state.user.name,
  2160. functionId: 104001,
  2161. serialNumber: '104001Table5UpdateBy',
  2162. tableId: '104001Table5',
  2163. tableName: '物料制造商表',
  2164. columnProp: 'updateBy',
  2165. headerAlign: 'center',
  2166. align: 'center',
  2167. columnLabel: '更新人',
  2168. columnHidden: false,
  2169. columnImage: false,
  2170. columnSortable: false,
  2171. sortLv: 0,
  2172. status: true,
  2173. fixed: '',
  2174. }
  2175. ],
  2176. columnLocationList: [
  2177. {
  2178. userId: this.$store.state.user.name,
  2179. functionId: 104001,
  2180. serialNumber: '104001Table7LocationId',
  2181. tableId: "104001Table7",
  2182. tableName: "物料库位表",
  2183. columnProp: 'locationId',
  2184. headerAlign: "center",
  2185. align: "center",
  2186. columnLabel: '库位编码',
  2187. columnHidden: false,
  2188. columnImage: false,
  2189. columnSortable: true,
  2190. sortLv: 0,
  2191. status: true,
  2192. fixed: '',
  2193. },
  2194. {
  2195. userId: this.$store.state.user.name,
  2196. functionId: 104001,
  2197. serialNumber: '104001Table7LocationName',
  2198. tableId: "104001Table7",
  2199. tableName: "物料库位表",
  2200. columnProp: 'locationName',
  2201. headerAlign: "center",
  2202. align: "center",
  2203. columnLabel: '库位名称',
  2204. columnHidden: false,
  2205. columnImage: false,
  2206. columnSortable: true,
  2207. sortLv: 0,
  2208. status: true,
  2209. fixed: '',
  2210. },
  2211. {
  2212. userId: this.$store.state.user.name,
  2213. functionId: 104001,
  2214. serialNumber: '104001Table7warehouseId',
  2215. tableId: "104001Table7",
  2216. tableName: "物料库位表",
  2217. columnProp: 'warehouseId',
  2218. headerAlign: "center",
  2219. align: "center",
  2220. columnLabel: '仓库编码',
  2221. columnHidden: false,
  2222. columnImage: false,
  2223. columnSortable: true,
  2224. sortLv: 0,
  2225. status: true,
  2226. fixed: '',
  2227. },
  2228. {
  2229. userId: this.$store.state.user.name,
  2230. functionId: 104001,
  2231. serialNumber: '104001Table7Active',
  2232. tableId: '104001Table7',
  2233. tableName: '物料库位表',
  2234. columnProp: 'active',
  2235. headerAlign: 'center',
  2236. align: 'center',
  2237. columnLabel: '是否在用',
  2238. columnHidden: false,
  2239. columnImage: false,
  2240. columnSortable: false,
  2241. sortLv: 0,
  2242. status: true,
  2243. fixed: '',
  2244. },
  2245. {
  2246. userId: this.$store.state.user.name,
  2247. functionId: 104001,
  2248. serialNumber: '104001Table7CreateDate',
  2249. tableId: '104001Table7',
  2250. tableName: '物料库位表',
  2251. columnProp: 'createDate',
  2252. headerAlign: 'center',
  2253. align: 'center',
  2254. columnLabel: '创建时间',
  2255. columnHidden: false,
  2256. columnImage: false,
  2257. columnSortable: false,
  2258. sortLv: 0,
  2259. status: true,
  2260. fixed: '',
  2261. },
  2262. {
  2263. userId: this.$store.state.user.name,
  2264. functionId: 104001,
  2265. serialNumber: '104001Table7CreateBy',
  2266. tableId: '104001Table7',
  2267. tableName: '物料库位表',
  2268. columnProp: 'createBy',
  2269. headerAlign: 'center',
  2270. align: 'center',
  2271. columnLabel: '创建人',
  2272. columnHidden: false,
  2273. columnImage: false,
  2274. columnSortable: false,
  2275. sortLv: 0,
  2276. status: true,
  2277. fixed: '',
  2278. },
  2279. {
  2280. userId: this.$store.state.user.name,
  2281. functionId: 104001,
  2282. serialNumber: '104001Table7UpdateDate',
  2283. tableId: '104001Table7',
  2284. tableName: '物料库位表',
  2285. columnProp: 'updateDate',
  2286. headerAlign: 'center',
  2287. align: 'center',
  2288. columnLabel: '更新时间',
  2289. columnHidden: false,
  2290. columnImage: false,
  2291. columnSortable: false,
  2292. sortLv: 0,
  2293. status: true,
  2294. fixed: '',
  2295. },
  2296. {
  2297. userId: this.$store.state.user.name,
  2298. functionId: 104001,
  2299. serialNumber: '104001Table7UpdateBy',
  2300. tableId: '104001Table7',
  2301. tableName: '物料库位表',
  2302. columnProp: 'updateBy',
  2303. headerAlign: 'center',
  2304. align: 'center',
  2305. columnLabel: '更新人',
  2306. columnHidden: false,
  2307. columnImage: false,
  2308. columnSortable: false,
  2309. sortLv: 0,
  2310. status: true,
  2311. fixed: '',
  2312. }
  2313. ],
  2314. columnFileList: [
  2315. {
  2316. userId: this.$store.state.user.name,
  2317. functionId: 104001,
  2318. serialNumber: '104001Table4FileName',
  2319. tableId: '104001Table4',
  2320. tableName: '文件信息表',
  2321. columnProp: 'fileName',
  2322. headerAlign: 'center',
  2323. align: 'center',
  2324. columnLabel: '文件名称',
  2325. columnHidden: false,
  2326. columnImage: false,
  2327. columnSortable: false,
  2328. sortLv: 0,
  2329. status: true,
  2330. fixed: '',
  2331. },
  2332. {
  2333. userId: this.$store.state.user.name,
  2334. functionId: 104001,
  2335. serialNumber: '104001Table4FileRemark',
  2336. tableId: '104001Table4',
  2337. tableName: '文件信息表',
  2338. columnProp: 'fileRemark',
  2339. headerAlign: 'center',
  2340. align: 'center',
  2341. columnLabel: '备注',
  2342. columnHidden: false,
  2343. columnImage: false,
  2344. columnSortable: false,
  2345. sortLv: 0,
  2346. status: true,
  2347. fixed: '',
  2348. },
  2349. {
  2350. userId: this.$store.state.user.name,
  2351. functionId: 104001,
  2352. serialNumber: '104001Table4CreateDate',
  2353. tableId: '104001Table4',
  2354. tableName: '文件信息表',
  2355. columnProp: 'createDate',
  2356. headerAlign: 'center',
  2357. align: 'center',
  2358. columnLabel: '上传时间',
  2359. columnHidden: false,
  2360. columnImage: false,
  2361. columnSortable: false,
  2362. sortLv: 0,
  2363. status: true,
  2364. fixed: '',
  2365. },
  2366. {
  2367. userId: this.$store.state.user.name,
  2368. functionId: 104001,
  2369. serialNumber: '104001Table4CreatedBy',
  2370. tableId: '104001Table4',
  2371. tableName: '文件信息表',
  2372. columnProp: 'createdBy',
  2373. headerAlign: 'center',
  2374. align: 'center',
  2375. columnLabel: '上传人',
  2376. columnHidden: false,
  2377. columnImage: false,
  2378. columnSortable: false,
  2379. sortLv: 0,
  2380. status: true,
  2381. fixed: '',
  2382. }
  2383. ],
  2384. agentColumnList: [
  2385. {
  2386. columnProp: 'agentId',
  2387. headerAlign: "center",
  2388. align: "center",
  2389. columnLabel: '代理商编码',
  2390. columnHidden: false,
  2391. columnImage: false,
  2392. columnSortable: false,
  2393. sortLv: 0,
  2394. status: true,
  2395. fixed: '',
  2396. },
  2397. {
  2398. columnProp: 'agentName',
  2399. headerAlign: "center",
  2400. align: "center",
  2401. columnLabel: '代理商名称',
  2402. columnHidden: false,
  2403. columnImage: false,
  2404. columnSortable: false,
  2405. sortLv: 0,
  2406. status: true,
  2407. fixed: '',
  2408. },
  2409. ],
  2410. // ======== 必填规则 ========
  2411. rules: {
  2412. partNo: [
  2413. {
  2414. required: true,
  2415. message: ' ',
  2416. trigger: 'change'
  2417. }
  2418. ],
  2419. partDesc: [
  2420. {
  2421. required: true,
  2422. message: ' ',
  2423. trigger: 'change'
  2424. }
  2425. ],
  2426. umName: [
  2427. {
  2428. required: true,
  2429. message: ' ',
  2430. trigger: 'change'
  2431. }
  2432. ],
  2433. codeDesc: [
  2434. {
  2435. required: true,
  2436. message: ' ',
  2437. trigger: 'change'
  2438. }
  2439. ],
  2440. manufacturerName: [
  2441. {
  2442. required: true,
  2443. message: ' ',
  2444. trigger: 'change'
  2445. }
  2446. ],
  2447. active: [
  2448. {
  2449. required: true,
  2450. message: ' ',
  2451. trigger: 'change'
  2452. }
  2453. ],
  2454. agentName: [
  2455. {
  2456. required: true,
  2457. message: ' ',
  2458. trigger: 'change'
  2459. }
  2460. ],
  2461. partType: [
  2462. {
  2463. required: true,
  2464. message: ' ',
  2465. trigger: 'change'
  2466. }
  2467. ],
  2468. productGroupId4: [
  2469. {
  2470. required: true,
  2471. message: ' ',
  2472. trigger: 'change'
  2473. }
  2474. ],
  2475. lotTrackingCode: [
  2476. {
  2477. required: true,
  2478. message: ' ',
  2479. trigger: 'change'
  2480. }
  2481. ],
  2482. },
  2483. // ======== 复选数据集 ========
  2484. partSelections: [],
  2485. // ======== 选中的当前行数据 ========
  2486. partCurrentRow: {},
  2487. // ======== 模态框开关控制 ========
  2488. modalFlag: false,
  2489. modalDisableFlag: false,
  2490. itemChooseFlag: false,
  2491. itemTextDisableFlag: false,
  2492. itemNumberDisableFlag: false,
  2493. itemModalDisableFlag: false,
  2494. itemModalFlag: false,
  2495. agentModelFlag: false,
  2496. manufacturerModelFlag: false,
  2497. updateItemModelFlag: false,
  2498. fastAddFlag: false,
  2499. locationModelFlag: false
  2500. }
  2501. },
  2502. mounted () {
  2503. this.$nextTick(() => {
  2504. this.height = window.innerHeight / 2 - 30
  2505. /*第二个表格高度的动态调整*/
  2506. this.secondHeight = window.innerHeight - this.height - 180
  2507. })
  2508. },
  2509. created () {
  2510. this.getDataList()
  2511. },
  2512. methods: {
  2513. // 物料编码失去焦点事件
  2514. queryMasterField () {
  2515. // 根据物料编码查 masterPart 属性
  2516. queryMasterField(this.modalData).then(({data}) => {
  2517. if (data && data.code === 0) {
  2518. if (data.data != null) {
  2519. this.modalData.partDesc = data.data.partDesc
  2520. this.modalData.umId = data.data.umId
  2521. this.modalData.umName = data.data.umName
  2522. this.modalData.weightNet = data.data.weightNet
  2523. this.modalData.uomForWeightNet = data.data.uomForWeightNet
  2524. this.modalData.volumeNet = data.data.volumeNet
  2525. this.modalData.uomForVolumeNet = data.data.uomForVolumeNet
  2526. }
  2527. }
  2528. })
  2529. },
  2530. // 制造提前期内容改变事件
  2531. changeExpectedLeadTime () {
  2532. this.modalData.expectedLeadTime = this.modalData.manufacturingLeadTime
  2533. },
  2534. // 天数内容改变事件
  2535. changeDurabilityWeek () {
  2536. this.modalData.durabilityWeek = this.modalData.durabilityDay / 7
  2537. },
  2538. focusNextInput (index, type) {
  2539. let aaa = ''
  2540. if (this.updatePartItemList.length - 1 === index) {
  2541. aaa = `${type}0`
  2542. } else {
  2543. aaa = `${type}${index + 1}`
  2544. }
  2545. this.$nextTick(() => {
  2546. this.$refs[aaa].focus()
  2547. })
  2548. },
  2549. /**
  2550. * 编辑物料属性
  2551. */
  2552. updateItemValue () {
  2553. let tempData = {
  2554. site: this.$store.state.user.site,
  2555. partNo: this.partCurrentRow.partNo,
  2556. codeNo: this.partCurrentRow.codeNo,
  2557. recordType: 'IP'
  2558. }
  2559. getPartItem(tempData).then(({data}) => {
  2560. if (data && data.code === 0) {
  2561. this.updatePartItemList = data.rows
  2562. this.updateItemModelFlag = true
  2563. } else {
  2564. this.updatePartItemList = []
  2565. }
  2566. })
  2567. },
  2568. /**
  2569. * 新增/删除物料属性
  2570. */
  2571. addOrDelItem () {
  2572. this.itemSelections1 = null
  2573. this.itemSelections2 = null
  2574. this.itemData.propertiesItemNo = ''
  2575. this.itemData.itemDesc = ''
  2576. let tempData = {
  2577. site: this.partCurrentRow.site,
  2578. partNo: this.partCurrentRow.partNo,
  2579. codeNo: this.partCurrentRow.codeNo,
  2580. recordType: 'IP'
  2581. }
  2582. getItemLists(tempData).then(({data}) => {
  2583. this.itemList1 = data.row1
  2584. this.itemList2 = data.row2
  2585. })
  2586. this.fastAddFlag = true
  2587. },
  2588. // 可选属性
  2589. itemClickRow1 (row) {
  2590. this.$refs.itemTable1.toggleRowSelection(row)
  2591. },
  2592. // 已有属性
  2593. itemClickRow2 (row) {
  2594. this.$refs.itemTable2.toggleRowSelection(row)
  2595. },
  2596. selectionItem1 (val) {
  2597. this.itemSelections1 = val
  2598. },
  2599. selectionItem2 (val) {
  2600. this.itemSelections2 = val
  2601. },
  2602. // 物料项目新增
  2603. addItem () {
  2604. if (this.itemSelections1 == null || this.itemSelections1.length === 0) {
  2605. this.$message.warning('请选择可选属性!')
  2606. return
  2607. }
  2608. let inData = {
  2609. site: this.$store.state.user.site,
  2610. partNo: this.partCurrentRow.partNo,
  2611. codeNo: this.partCurrentRow.codeNo,
  2612. codeDesc: this.partCurrentRow.codeDesc,
  2613. recordType: 'IP',
  2614. itemList: this.itemSelections1
  2615. }
  2616. addPartItem(inData).then(({data}) => {
  2617. if (data && data.code === 0) {
  2618. getItemLists(inData).then(({data}) => {
  2619. this.itemList1 = data.row1
  2620. this.itemList2 = data.row2
  2621. })
  2622. this.getPartItem()
  2623. this.itemSelections1 = []
  2624. } else {
  2625. this.$alert(data.msg, '错误', {
  2626. confirmButtonText: '确定'
  2627. })
  2628. }
  2629. })
  2630. },
  2631. // 物料项目删除
  2632. deleteItem () {
  2633. if (this.itemSelections2 == null || this.itemSelections2.length === 0) {
  2634. this.$alert("请选择已有属性!", '提示', {
  2635. confirmButtonText: '确定'
  2636. })
  2637. return false
  2638. }
  2639. let inData = {
  2640. site: this.$store.state.user.site,
  2641. partNo: this.partCurrentRow.partNo,
  2642. codeNo: this.partCurrentRow.codeNo,
  2643. codeDesc: this.partCurrentRow.codeDesc,
  2644. recordType: 'IP',
  2645. itemList: this.itemSelections2
  2646. }
  2647. deletePartItem(inData).then(({data}) => {
  2648. if (data && data.code === 0) {
  2649. getItemLists(inData).then(({data}) => {
  2650. this.itemList1 = data.row1
  2651. this.itemList2 = data.row2
  2652. })
  2653. this.getPartItem()
  2654. this.itemSelections2 = []
  2655. } else {
  2656. this.$alert(data.msg, '错误', {
  2657. confirmButtonText: '确定'
  2658. })
  2659. }
  2660. })
  2661. },
  2662. // 查询物料项目
  2663. queryPartItem () {
  2664. this.itemData.partNo = this.partCurrentRow.partNo
  2665. this.itemData.codeNo = this.partCurrentRow.codeNo
  2666. this.itemData.partNo = this.partCurrentRow.partNo
  2667. queryPartItem(this.itemData).then(({data}) => {
  2668. if (data && data.code === 0) {
  2669. this.itemList1 = data.rows
  2670. } else {
  2671. this.itemList1 = []
  2672. }
  2673. })
  2674. },
  2675. // 确认修改物料属性
  2676. commitItemValue () {
  2677. let tempData = {
  2678. itemList: JSON.parse(JSON.stringify(this.updatePartItemList))
  2679. }
  2680. commitItemValue(tempData).then(({data}) => {
  2681. if (data && data.code === 0) {
  2682. this.getPartItem()
  2683. this.updateItemModelFlag = false
  2684. this.$message({
  2685. message: '操作成功',
  2686. type: 'success',
  2687. duration: 1500,
  2688. onClose: () => {}
  2689. })
  2690. } else {
  2691. this.$alert(data.msg, '错误', {
  2692. confirmButtonText: '确定'
  2693. })
  2694. }
  2695. })
  2696. },
  2697. // ======= 正则校验 =======
  2698. handleInput (value, type) {
  2699. // 大于等于0,且只能输入4位小数
  2700. let val = value.replace(/^\D*([0-9]\d*\.?\d{0,4})?.*$/,'$1')
  2701. if (val === null || val === undefined || val === '') {
  2702. val = 0
  2703. }
  2704. if (type === 1) {
  2705. this.modalData.estimatedMaterialCost = val
  2706. } else if (type === 2) {
  2707. this.modalData.safetyStock = val
  2708. } else if (type === 3) {
  2709. this.modalData.minOrderQty = val
  2710. } else if (type === 4) {
  2711. this.modalData.maxOrderQty = val
  2712. } else if (type === 5) {
  2713. this.modalData.mulOrderQty = val
  2714. } else if (type === 6) {
  2715. this.modalData.safetyLeadTime = val
  2716. } else if (type === 7) {
  2717. this.modalData.shrinkageFac = val
  2718. } else if (type === 8) {
  2719. this.modalData.stdOrderQty = val
  2720. } else if (type === 9) {
  2721. this.modalData.cumLeadTime = val
  2722. } else if (type === 10) {
  2723. this.modalData.unprotectedLeadTime = val
  2724. } else if (type === 11) {
  2725. this.modalData.fixedLeadTimeDay = val
  2726. } else if (type === 12) {
  2727. this.modalData.variableLeadTimeDay = val
  2728. } else if (type === 13) {
  2729. this.modalData.overReportTolerance = val
  2730. } else if (type === 14) {
  2731. this.modalData.fixedLeadTimeHour = val
  2732. } else if (type === 15) {
  2733. this.modalData.density = val
  2734. } else if (type === 16) {
  2735. this.modalData.variableLeadTimeHour = val
  2736. }
  2737. },
  2738. // ======== 分页相关方法 ========
  2739. /**
  2740. * 每页数
  2741. * @param val
  2742. */
  2743. sizeChangeHandle (val) {
  2744. this.pageSize = val
  2745. this.pageIndex = 1
  2746. this.getDataList()
  2747. },
  2748. /**
  2749. * 当前页
  2750. * @param val
  2751. */
  2752. currentChangeHandle (val) {
  2753. this.pageIndex = val
  2754. this.getDataList()
  2755. },
  2756. // ======== 页签切换相关方法 ========
  2757. /**
  2758. * 未知
  2759. * @returns {boolean}
  2760. */
  2761. selectFlag () {
  2762. return true
  2763. },
  2764. /**
  2765. * 列表表格选择替换
  2766. * @param tab
  2767. * @param event
  2768. */
  2769. tabClick (tab, event) {
  2770. // 刷新列表数据
  2771. this.refreshCurrentTabTable()
  2772. },
  2773. /**
  2774. * 当前值发生变化的时候修改
  2775. * @param row
  2776. * @param oldRow
  2777. */
  2778. changeCurrentRow (row, oldRow) {
  2779. // 判断是否是获取焦点的事件
  2780. if (row) {
  2781. this.partCurrentRow = JSON.parse(JSON.stringify(row))
  2782. //刷新当前页表
  2783. this.refreshCurrentTabTable()
  2784. }
  2785. },
  2786. /**
  2787. * 刷新页签的table数据
  2788. */
  2789. refreshCurrentTabTable () {
  2790. if (this.activeTable === 'part_item') {
  2791. this.getPartItem()
  2792. } else if (this.activeTable === 'part_agent') {
  2793. this.getPartAgent()
  2794. } else if (this.activeTable === 'part_file') {
  2795. this.getFileContentData()
  2796. } else if (this.activeTable === 'part_manufacturer') {
  2797. this.getPartManufacturer()
  2798. } else if (this.activeTable === 'default_locations') {
  2799. this.getDefaultLocation()
  2800. }
  2801. },
  2802. // ======== 列表数据刷新方法 ========
  2803. /**
  2804. * 查询物料属性
  2805. */
  2806. getPartItem () {
  2807. let tempData = {
  2808. site: this.$store.state.user.site,
  2809. partNo: this.partCurrentRow.partNo,
  2810. codeNo: this.partCurrentRow.codeNo,
  2811. recordType: 'IP'
  2812. }
  2813. getPartItem(tempData).then(({data}) => {
  2814. if (data && data.code === 0) {
  2815. this.partItemList = data.rows
  2816. } else {
  2817. this.partItemList = []
  2818. }
  2819. })
  2820. },
  2821. /**
  2822. * 查询物料代理商
  2823. */
  2824. getPartAgent () {
  2825. let tempData = {
  2826. site: this.$store.state.user.site,
  2827. partNo: this.partCurrentRow.partNo,
  2828. //agentId: this.partCurrentRow.agentId
  2829. }
  2830. getPartAgent(tempData).then(({data}) => {
  2831. if (data && data.code === 0) {
  2832. this.partAgentList = data.rows
  2833. } else {
  2834. this.partAgentList = []
  2835. }
  2836. })
  2837. },
  2838. /**
  2839. * 查询物料制造商
  2840. */
  2841. getPartManufacturer () {
  2842. let tempData = {
  2843. site: this.$store.state.user.site,
  2844. partNo: this.partCurrentRow.partNo,
  2845. //agentId: this.partCurrentRow.agentId
  2846. }
  2847. getPartManufacturer(tempData).then(({data}) => {
  2848. if (data && data.code === 0) {
  2849. this.partManufacturerList = data.rows
  2850. } else {
  2851. this.partManufacturerList = []
  2852. }
  2853. })
  2854. },
  2855. /**
  2856. * 查询物料库位
  2857. */
  2858. getDefaultLocation () {
  2859. let tempData = {
  2860. site: this.$store.state.user.site,
  2861. partNo: this.partCurrentRow.partNo,
  2862. }
  2863. getDefaultLocation(tempData).then(({data}) => {
  2864. if (data && data.code === 0) {
  2865. this.defaultLocationList = data.rows
  2866. } else {
  2867. this.defaultLocationList = []
  2868. }
  2869. })
  2870. },
  2871. // ======== 列表数据刷新方法 ========
  2872. /**
  2873. * 获取数据列表
  2874. */
  2875. getDataList () {
  2876. this.searchData.limit = this.pageSize
  2877. this.searchData.page = this.pageIndex
  2878. partInformationSearch(this.searchData).then(({data}) => {
  2879. if (data.code === 0) {
  2880. this.dataList = data.page.list
  2881. this.pageIndex = data.page.currPage
  2882. this.pageSize = data.page.pageSize
  2883. this.totalPage = data.page.totalCount
  2884. this.$refs.selectDiv.setLengthAll( this.dataList.length)
  2885. // 判断是否全部存在数据
  2886. if (this.totalPage > 0) {
  2887. // 设置选中行
  2888. this.$refs.partTable.setCurrentRow(this.dataList[0])
  2889. // 加载当前的页签的table
  2890. this.refreshCurrentTabTable()
  2891. this.partClickRow(this.dataList[0])
  2892. }
  2893. }
  2894. this.dataListLoading = false
  2895. })
  2896. },
  2897. // ======== 新增/编辑模态框 ========
  2898. /**
  2899. * 物料信息新增模态框
  2900. */
  2901. addModal () {
  2902. this.modalData = {
  2903. flag: '1',
  2904. title: '物料新增',
  2905. site: this.$store.state.user.site,
  2906. partNo: '',
  2907. partDesc: '',
  2908. spec: '',
  2909. partTypeDb: '',
  2910. partType: 'Purchase raw',
  2911. familyId: '',
  2912. familyName: '',
  2913. groupId: '',
  2914. groupName: '',
  2915. umId: '',
  2916. umName: '',
  2917. weightNet: '',
  2918. uomForWeightNet: '',
  2919. volumeNet: '',
  2920. uomForVolumeNet: '',
  2921. lotTrackingCode: 'Order Based',
  2922. active: 'Y',
  2923. remark: '',
  2924. supplierId: '',
  2925. supplierName: '',
  2926. productGroupId1: '',
  2927. productGroupName1: '',
  2928. productGroupId2: '',
  2929. productGroupName2: '',
  2930. productGroupId3: '',
  2931. productGroupName3: '',
  2932. productGroupId4: '*',
  2933. productGroupName4: 'NorthSky Application owner',
  2934. erpPartNo: '',
  2935. codeNo: '',
  2936. codeDesc: '',
  2937. manufacturerId: '',
  2938. manufacturerName: '',
  2939. agentId: '',
  2940. agentName: '',
  2941. createBy: this.$store.state.user.name,
  2942. typeDesignation: '',
  2943. hazardCode: '',
  2944. hazardDesc: '',
  2945. assetClass: 'S',
  2946. assetClassDesc: '标准',
  2947. dimQuality: '',
  2948. abcClass: 'C',
  2949. abcClassDesc: '',
  2950. frequencyClass: 'Very Slow Mover',
  2951. lifecycleStage: 'Development',
  2952. isoCountry: '',
  2953. isoCountryDesc: '',
  2954. manufacturingLeadTime: '',
  2955. expectedLeadTime: '',
  2956. regionOfOrigin: '',
  2957. regionOfOriginDesc: '',
  2958. durabilityWeek: '',
  2959. customsStarNo: '',
  2960. customsStarDesc: '',
  2961. durabilityDay: '',
  2962. intrastatConvFactor: '',
  2963. umDesc: '',
  2964. status: 'N',
  2965. partStatus: 'A',
  2966. partStatusDesc: '活动',
  2967. configurationId: '*',
  2968. estimatedMaterialCost: 0,
  2969. inventoryValuationMethod: 'Standard Cost',
  2970. partCostGroupId: '',
  2971. partCostGroupDesc: '',
  2972. inventoryPartCostLevel: 'Cost Per Part',
  2973. invoiceConsideration: 'Ignore Invoice Price',
  2974. zeroCostFlag: 'Zero Cost Forbidden',
  2975. planningMethod: '',
  2976. planningMethodDesc: '',
  2977. safetyStock: 0,
  2978. minOrderQty: 0,
  2979. maxOrderQty: 0,
  2980. mulOrderQty: 0,
  2981. safetyLeadTime: 0,
  2982. shrinkageFac: 0,
  2983. stdOrderQty: 0,
  2984. cumLeadTime: 0,
  2985. backFlushPart: 'All Locations',
  2986. byProdAsSupplyInMrpDb: '',
  2987. unprotectedLeadTime: 0,
  2988. issueType: 'Reserve And Backflush',
  2989. mrpControlFlagDb: 'Y',
  2990. fixedLeadTimeDay: 0,
  2991. overReporting: 'Allowed',
  2992. useTheoreticalDensityDb: '',
  2993. variableLeadTimeDay: 0,
  2994. overReportTolerance: 0,
  2995. fixedLeadTimeHour: 0,
  2996. density: 0,
  2997. variableLeadTimeHour: 0
  2998. }
  2999. this.modalDisableFlag = false
  3000. this.modalFlag = true
  3001. },
  3002. /**
  3003. * 物料信息编辑模态框
  3004. * @param row
  3005. */
  3006. updateModal (row) {
  3007. this.modalData = {
  3008. flag: '2',
  3009. title: '物料编辑',
  3010. site: row.site,
  3011. partNo: row.partNo,
  3012. partDesc: row.partDesc,
  3013. spec: row.spec,
  3014. partTypeDb: row.partTypeDb,
  3015. partType: row.partType,
  3016. familyId: row.familyId,
  3017. familyName: row.familyName,
  3018. groupId: row.groupId,
  3019. groupName: row.groupName,
  3020. umId: row.umId,
  3021. umName: row.umName,
  3022. weightNet: row.weightNet,
  3023. uomForWeightNet: row.uomForWeightNet,
  3024. volumeNet: row.volumeNet,
  3025. uomForVolumeNet: row.uomForVolumeNet,
  3026. lotTrackingCode: row.lotTrackingCode,
  3027. active: row.active,
  3028. remark: row.remark,
  3029. supplierId: row.supplierId,
  3030. supplierName: row.supplierName,
  3031. productGroupId1: row.productGroupId1,
  3032. productGroupName1: row.productGroupName1,
  3033. productGroupId2: row.productGroupId2,
  3034. productGroupName2: row.productGroupName2,
  3035. productGroupId3: row.productGroupId3,
  3036. productGroupName3: row.productGroupName3,
  3037. productGroupId4: row.productGroupId4,
  3038. productGroupName4: row.productGroupName4,
  3039. erpPartNo: row.erpPartNo,
  3040. codeNo: row.codeNo,
  3041. codeDesc: row.codeDesc,
  3042. manufacturerId: row.manufacturerId,
  3043. manufacturerName: row.manufacturerName,
  3044. agentId: row.agentId,
  3045. agentName: row.agentName,
  3046. updateBy: this.$store.state.user.name,
  3047. typeDesignation: row.typeDesignation,
  3048. hazardCode: row.hazardCode,
  3049. hazardDesc: row.hazardDesc,
  3050. assetClass: row.assetClass,
  3051. assetClassDesc: row.assetClassDesc,
  3052. dimQuality: row.dimQuality,
  3053. abcClass: row.abcClass,
  3054. abcClassDesc: row.abcClassDesc,
  3055. frequencyClass: row.frequencyClass,
  3056. lifecycleStage: row.lifecycleStage,
  3057. isoCountry: row.isoCountry,
  3058. isoCountryDesc: row.isoCountryDesc,
  3059. manufacturingLeadTime: row.manufacturingLeadTime,
  3060. expectedLeadTime: row.expectedLeadTime,
  3061. regionOfOrigin: row.regionOfOrigin,
  3062. regionOfOriginDesc: row.regionOfOriginDesc,
  3063. durabilityWeek: '',
  3064. customsStarNo: row.customsStarNo,
  3065. customsStarDesc: row.customsStarDesc,
  3066. durabilityDay: row.durabilityDay,
  3067. intrastatConvFactor: row.intrastatConvFactor,
  3068. umDesc: row.umDesc,
  3069. status: row.status,
  3070. partStatus: row.partStatus,
  3071. partStatusDesc: row.partStatusDesc,
  3072. configurationId: row.configurationId,
  3073. estimatedMaterialCost: row.estimatedMaterialCost,
  3074. inventoryValuationMethod: row.inventoryValuationMethod,
  3075. partCostGroupId: row.partCostGroupId,
  3076. partCostGroupDesc: row.partCostGroupDesc,
  3077. inventoryPartCostLevel: row.inventoryPartCostLevel,
  3078. invoiceConsideration: row.invoiceConsideration,
  3079. zeroCostFlag: row.zeroCostFlag,
  3080. planningMethod: row.planningMethod,
  3081. planningMethodDesc: row.planningMethodDesc,
  3082. safetyStock: row.safetyStock,
  3083. minOrderQty: row.minOrderQty,
  3084. maxOrderQty: row.maxOrderQty,
  3085. mulOrderQty: row.mulOrderQty,
  3086. safetyLeadTime: row.safetyLeadTime,
  3087. shrinkageFac: row.shrinkageFac,
  3088. stdOrderQty: row.stdOrderQty,
  3089. cumLeadTime: row.cumLeadTime,
  3090. backFlushPart: row.backFlushPart,
  3091. byProdAsSupplyInMrpDb: row.byProdAsSupplyInMrpDb,
  3092. unprotectedLeadTime: row.unprotectedLeadTime,
  3093. issueType: row.issueType,
  3094. mrpControlFlagDb: row.mrpControlFlagDb,
  3095. fixedLeadTimeDay: row.fixedLeadTimeDay,
  3096. overReporting: row.overReporting,
  3097. useTheoreticalDensityDb: row.useTheoreticalDensityDb,
  3098. variableLeadTimeDay: row.variableLeadTimeDay,
  3099. overReportTolerance: row.overReportTolerance,
  3100. fixedLeadTimeHour: row.fixedLeadTimeHour,
  3101. density: row.density,
  3102. variableLeadTimeHour: row.variableLeadTimeHour
  3103. }
  3104. this.modalDisableFlag = true
  3105. this.modalFlag = true
  3106. },
  3107. /**
  3108. * 选择代理商
  3109. */
  3110. getAgentList () {
  3111. // // 先清空缓存选中
  3112. // this.$nextTick(() => this.$refs.agentTable.clearSelection())
  3113. // // 拿到选中的代理商id
  3114. // let tempDataList = this.modalData.agentId.split(';')
  3115. // 查询所有代理商
  3116. getAgentListBy(this.agentData).then(({data}) => {
  3117. if (data && data.code === 0) {
  3118. this.agentList1 = data.rows
  3119. // this.agentList.forEach(val => {
  3120. // // 回显选中的代理商
  3121. // if (tempDataList.includes(val.agentId)) {
  3122. // this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
  3123. // }
  3124. // })
  3125. // this.agentModelFlag = true
  3126. } else {
  3127. this.$alert(data.msg, '错误', {
  3128. confirmButtonText: '确定'
  3129. })
  3130. }
  3131. })
  3132. },
  3133. /**
  3134. * 代理商多选
  3135. * @param row
  3136. */
  3137. agentClickRow (row) {
  3138. this.$refs.agentTable.toggleRowSelection(row);
  3139. },
  3140. /**
  3141. * 获得选中的代理商
  3142. * @param val
  3143. */
  3144. selectionAgent (val) {
  3145. this.agentSelections = val
  3146. },
  3147. /**
  3148. * 返回列表唯一值
  3149. * @param row
  3150. * @returns {string|[{trigger: string, message: string, required: boolean}]|*}
  3151. */
  3152. getRowKeys (row) {
  3153. // 唯一值,一般都为id
  3154. return row.agentId
  3155. },
  3156. /**
  3157. * 确认多选代理商
  3158. * @returns {boolean}
  3159. */
  3160. confirmAgent () {
  3161. this.modalData.agentId = ''
  3162. this.modalData.agentName = ''
  3163. for (let i = 0; i < this.agentSelections.length; i++) {
  3164. this.modalData.agentId = this.modalData.agentId + ";" + this.agentSelections[i].agentId
  3165. this.modalData.agentName = this.modalData.agentName + ";" + this.agentSelections[i].agentName
  3166. }
  3167. this.modalData.agentId = this.modalData.agentId.substring(1)
  3168. this.modalData.agentName = this.modalData.agentName.substring(1)
  3169. this.agentModelFlag = false
  3170. },
  3171. savePartAgent () {
  3172. this.agentSelections1 = null
  3173. this.agentSelections2 = null
  3174. getAgentList(this.partCurrentRow).then(({data}) => {
  3175. this.agentList1 = data.row1
  3176. this.agentList2 = data.row2
  3177. })
  3178. this.agentData = {
  3179. site: this.$store.state.user.site,
  3180. agentId: '',
  3181. agentName: '',
  3182. }
  3183. this.agentModelFlag = true
  3184. },
  3185. // 可选代理商
  3186. agentClickRow1 (row) {
  3187. this.$refs.agentTable1.toggleRowSelection(row)
  3188. },
  3189. // 已有代理商
  3190. agentClickRow2 (row) {
  3191. this.$refs.agentTable2.toggleRowSelection(row)
  3192. },
  3193. selectionAgent1 (val) {
  3194. this.agentSelections1 = val
  3195. },
  3196. selectionAgent2 (val) {
  3197. this.agentSelections2 = val
  3198. },
  3199. // 添加代理商
  3200. addAgent () {
  3201. if (this.agentSelections1 == null || this.agentSelections1.length === 0) {
  3202. this.$message.warning('请选择可选代理商!')
  3203. return
  3204. }
  3205. let inData = {
  3206. site: this.$store.state.user.site,
  3207. partNo: this.partCurrentRow.partNo,
  3208. agentList: this.agentSelections1
  3209. }
  3210. addPartAgent(inData).then(({data}) => {
  3211. if (data && data.code === 0) {
  3212. getAgentList(this.partCurrentRow).then(({data}) => {
  3213. this.agentList1 = data.row1
  3214. this.agentList2 = data.row2
  3215. })
  3216. this.agentSelections1 = []
  3217. } else {
  3218. this.$alert(data.msg, '错误', {
  3219. confirmButtonText: '确定'
  3220. })
  3221. }
  3222. })
  3223. },
  3224. // 删除物料代理商
  3225. deleteAgent () {
  3226. if(this.agentSelections2 == null || this.agentSelections2.length === 0){
  3227. this.$message.warning('请选择已有代理商!')
  3228. return
  3229. }
  3230. let inData = {
  3231. site: this.$store.state.user.site,
  3232. partNo: this.partCurrentRow.partNo,
  3233. agentList: this.agentSelections2
  3234. }
  3235. deletePartAgent(inData).then(({data}) => {
  3236. if (data && data.code === 0) {
  3237. getAgentList(this.partCurrentRow).then(({data}) => {
  3238. this.agentList1 = data.row1
  3239. this.agentList2 = data.row2
  3240. })
  3241. this.agentSelections2 = []
  3242. } else {
  3243. this.$alert(data.msg, '错误', {
  3244. confirmButtonText: '确定'
  3245. })
  3246. }
  3247. })
  3248. },
  3249. // 单删
  3250. deleteAgent2 (row) {
  3251. this.$confirm(`是否删除该代理商?`, '提示', {
  3252. confirmButtonText: '确定',
  3253. cancelButtonText: '取消',
  3254. type: 'warning'
  3255. }).then(() => {
  3256. deleteAgent(row).then(({data}) => {
  3257. if (data && data.code === 0) {
  3258. this.getPartAgent()
  3259. this.$message({
  3260. message: '操作成功',
  3261. type: 'success',
  3262. duration: 1500,
  3263. onClose: () => {}
  3264. })
  3265. } else {
  3266. this.$alert(data.msg, '错误', {
  3267. confirmButtonText: '确定'
  3268. })
  3269. }
  3270. })
  3271. }).catch(() => {
  3272. })
  3273. },
  3274. /**
  3275. * 选择制造商
  3276. */
  3277. getManufacturerList () {
  3278. // // 先清空缓存选中
  3279. // this.$nextTick(() => this.$refs.agentTable.clearSelection())
  3280. // // 拿到选中的代理商id
  3281. // let tempDataList = this.modalData.agentId.split(';')
  3282. // 查询所有代理商
  3283. getManufacturerListBy(this.manufacturerData).then(({data}) => {
  3284. if (data && data.code === 0) {
  3285. this.manufacturerList1 = data.rows
  3286. // this.agentList.forEach(val => {
  3287. // // 回显选中的代理商
  3288. // if (tempDataList.includes(val.agentId)) {
  3289. // this.$nextTick(() => this.$refs.agentTable.toggleRowSelection(val, true))
  3290. // }
  3291. // })
  3292. // this.agentModelFlag = true
  3293. } else {
  3294. this.$alert(data.msg, '错误', {
  3295. confirmButtonText: '确定'
  3296. })
  3297. }
  3298. })
  3299. },
  3300. /**
  3301. * 选择默认库位
  3302. */
  3303. getLocationList () {
  3304. // 查询所有库位
  3305. getLocationListBy(this.locationData).then(({data}) => {
  3306. if (data && data.code === 0) {
  3307. this.locationList1 = data.rows
  3308. } else {
  3309. this.$alert(data.msg, '错误', {
  3310. confirmButtonText: '确定'
  3311. })
  3312. }
  3313. })
  3314. },
  3315. /**
  3316. * 制造商多选
  3317. * @param row
  3318. */
  3319. manufacturerClickRow (row) {
  3320. this.$refs.manufacturerTable.toggleRowSelection(row);
  3321. },
  3322. /**
  3323. * 获得选中的制造商
  3324. * @param val
  3325. */
  3326. selectionManufacturer (val) {
  3327. this.manufacturerSelections = val
  3328. },
  3329. /**
  3330. * 返回列表唯一值
  3331. * @param row
  3332. * @returns {string|[{trigger: string, message: string, required: boolean}]|*}
  3333. */
  3334. getRowKeys2 (row) {
  3335. // 唯一值,一般都为id
  3336. return row.manufacturerId
  3337. },
  3338. /**
  3339. * 确认多选制造商
  3340. * @returns {boolean}
  3341. */
  3342. confirmManufacturer () {
  3343. this.modalData.manufacturerId = ''
  3344. this.modalData.manufacturerName = ''
  3345. for (let i = 0; i < this.manufacturerSelections.length; i++) {
  3346. this.modalData.manufacturerId = this.modalData.manufacturerId + ";" + this.manufacturerSelections[i].manufacturerId
  3347. this.modalData.manufacturerName = this.modalData.manufacturerName + ";" + this.agentSelections[i].manufacturerName
  3348. }
  3349. this.modalData.manufacturerId = this.modalData.manufacturerId.substring(1)
  3350. this.modalData.manufacturerName = this.modalData.manufacturerName.substring(1)
  3351. this.manufacturerModelFlag = false
  3352. },
  3353. savePartManufacturer () {
  3354. this.manufacturerSelections1 = null
  3355. this.manufacturerSelections2 = null
  3356. getManufacturerList(this.partCurrentRow).then(({data}) => {
  3357. this.manufacturerList1 = data.row1
  3358. this.manufacturerList2 = data.row2
  3359. })
  3360. this.manufacturerData = {
  3361. site: this.$store.state.user.site,
  3362. manufacturerId: '',
  3363. manufacturerName: '',
  3364. }
  3365. this.manufacturerModelFlag = true
  3366. },
  3367. // 可选制造商
  3368. manufacturerClickRow1 (row) {
  3369. this.$refs.manufacturerTable1.toggleRowSelection(row)
  3370. },
  3371. // 已有制造商
  3372. manufacturerClickRow2 (row) {
  3373. this.$refs.manufacturerTable2.toggleRowSelection(row)
  3374. },
  3375. selectionManufacturer1 (val) {
  3376. this.manufacturerSelections1 = val
  3377. },
  3378. selectionManufacturer2 (val) {
  3379. this.manufacturerSelections2 = val
  3380. },
  3381. // 添加制造商
  3382. addManufacturer () {
  3383. if (this.manufacturerSelections1 == null || this.manufacturerSelections1.length === 0) {
  3384. this.$message.warning('请选择可选制造商!')
  3385. return
  3386. }
  3387. let inData = {
  3388. site: this.$store.state.user.site,
  3389. partNo: this.partCurrentRow.partNo,
  3390. manufacturerList: this.manufacturerSelections1
  3391. }
  3392. addPartManufacturer(inData).then(({data}) => {
  3393. if (data && data.code === 0) {
  3394. getManufacturerList(this.partCurrentRow).then(({data}) => {
  3395. this.manufacturerList1 = data.row1
  3396. this.manufacturerList2 = data.row2
  3397. })
  3398. this.manufacturerSelections1 = []
  3399. } else {
  3400. this.$alert(data.msg, '错误', {
  3401. confirmButtonText: '确定'
  3402. })
  3403. }
  3404. })
  3405. },
  3406. // 删除物料制造商
  3407. deleteManufacturer () {
  3408. if (this.manufacturerSelections2 == null || this.manufacturerSelections2.length === 0) {
  3409. this.$message.warning('请选择已有制造商!')
  3410. return
  3411. }
  3412. let inData = {
  3413. site: this.$store.state.user.site,
  3414. partNo: this.partCurrentRow.partNo,
  3415. manufacturerList: this.manufacturerSelections2
  3416. }
  3417. deletePartManufacturer(inData).then(({data}) => {
  3418. if (data && data.code === 0) {
  3419. getManufacturerList(this.partCurrentRow).then(({data}) => {
  3420. this.manufacturerList1 = data.row1
  3421. this.manufacturerList2 = data.row2
  3422. })
  3423. this.manufacturerSelections2 = []
  3424. } else {
  3425. this.$alert(data.msg, '错误', {
  3426. confirmButtonText: '确定'
  3427. })
  3428. }
  3429. })
  3430. },
  3431. // 单删
  3432. deleteManufacturer2 (row) {
  3433. this.$confirm(`是否删除该制造商?`, '提示', {
  3434. confirmButtonText: '确定',
  3435. cancelButtonText: '取消',
  3436. type: 'warning'
  3437. }).then(() => {
  3438. deleteManufacturer(row).then(({data}) => {
  3439. if (data && data.code === 0) {
  3440. this.getPartManufacturer()
  3441. this.$message({
  3442. message: '操作成功',
  3443. type: 'success',
  3444. duration: 1500,
  3445. onClose: () => {}
  3446. })
  3447. } else {
  3448. this.$alert(data.msg, '错误', {
  3449. confirmButtonText: '确定'
  3450. })
  3451. }
  3452. })
  3453. }).catch(() => {
  3454. })
  3455. },
  3456. saveDefaultLocation () {
  3457. this.locationSelections1 = null
  3458. this.locationSelections2 = null
  3459. getLocationList(this.partCurrentRow).then(({data}) => {
  3460. this.locationList1 = data.row1
  3461. this.locationList2 = data.row2
  3462. })
  3463. this.locationData = {
  3464. site: this.$store.state.user.site,
  3465. locationId: '',
  3466. locationName: '',
  3467. }
  3468. this.locationModelFlag = true
  3469. },
  3470. // 可选库位
  3471. locationClickRow1 (row) {
  3472. this.$refs.locationTable1.toggleRowSelection(row)
  3473. },
  3474. // 已有库位
  3475. locationClickRow2 (row) {
  3476. this.$refs.locationTable2.toggleRowSelection(row)
  3477. },
  3478. selectionLocation1 (val) {
  3479. this.locationSelections1 = val
  3480. },
  3481. selectionLocation2 (val) {
  3482. this.locationSelections2 = val
  3483. },
  3484. // 添加库位
  3485. addLocation () {
  3486. if (this.locationSelections1 == null || this.locationSelections1.length === 0) {
  3487. this.$message.warning('请选择可选库位!')
  3488. return
  3489. }
  3490. let inData = {
  3491. site: this.$store.state.user.site,
  3492. partNo: this.partCurrentRow.partNo,
  3493. locationList: this.locationSelections1
  3494. }
  3495. addDefaultLocation(inData).then(({data}) => {
  3496. if (data && data.code === 0) {
  3497. getLocationList(this.partCurrentRow).then(({data}) => {
  3498. this.locationList1 = data.row1
  3499. this.locationList2 = data.row2
  3500. })
  3501. this.locationSelections1 = []
  3502. } else {
  3503. this.$alert(data.msg, '错误', {
  3504. confirmButtonText: '确定'
  3505. })
  3506. }
  3507. })
  3508. },
  3509. // 删除库位
  3510. deleteLocation () {
  3511. if (this.locationSelections2 == null || this.locationSelections2.length === 0) {
  3512. this.$message.warning('请选择已有库位!')
  3513. return
  3514. }
  3515. let inData = {
  3516. site: this.$store.state.user.site,
  3517. partNo: this.partCurrentRow.partNo,
  3518. locationList: this.locationSelections2
  3519. }
  3520. deleteDefaultLocation(inData).then(({data}) => {
  3521. if (data && data.code === 0) {
  3522. getLocationList(this.partCurrentRow).then(({data}) => {
  3523. this.locationList1 = data.row1
  3524. this.locationList2 = data.row2
  3525. })
  3526. this.locationSelections2 = []
  3527. } else {
  3528. this.$alert(data.msg, '错误', {
  3529. confirmButtonText: '确定'
  3530. })
  3531. }
  3532. })
  3533. },
  3534. // 单删
  3535. deleteLocation2 (row) {
  3536. this.$confirm(`是否删除该库位?`, '提示', {
  3537. confirmButtonText: '确定',
  3538. cancelButtonText: '取消',
  3539. type: 'warning'
  3540. }).then(() => {
  3541. deleteLocation(row).then(({data}) => {
  3542. if (data && data.code === 0) {
  3543. this.getDefaultLocation()
  3544. this.$message({
  3545. message: '操作成功',
  3546. type: 'success',
  3547. duration: 1500,
  3548. onClose: () => {}
  3549. })
  3550. } else {
  3551. this.$alert(data.msg, '错误', {
  3552. confirmButtonText: '确定'
  3553. })
  3554. }
  3555. })
  3556. }).catch(() => {
  3557. })
  3558. },
  3559. // 关闭后刷新列表
  3560. refreshDetailList () {
  3561. this.getPartAgent()
  3562. this.getPartManufacturer()
  3563. },
  3564. // ======== 新增/编辑/删除方法 ========
  3565. /**
  3566. * 物料信息新增/编辑
  3567. */
  3568. saveData () {
  3569. if (this.modalData.partNo === '' || this.modalData.partNo == null) {
  3570. this.$message.warning('请填写物料编码!')
  3571. return
  3572. }
  3573. if (this.modalData.partDesc === '' || this.modalData.partDesc == null) {
  3574. this.$message.warning('请填写物料描述!')
  3575. return
  3576. }
  3577. if (this.modalData.partType === '' || this.modalData.partType == null) {
  3578. this.$message.warning('请选择零件类型!')
  3579. return
  3580. }
  3581. if (this.modalData.productGroupId4 === '' || this.modalData.productGroupId4 == null) {
  3582. this.$message.warning('请选择计划人!')
  3583. return
  3584. }
  3585. if (this.modalData.umId === '' || this.modalData.umId == null) {
  3586. this.$message.warning('请选择库存计量单位!')
  3587. return
  3588. }
  3589. if (this.modalData.codeNo === '' || this.modalData.codeNo == null) {
  3590. this.$message.warning('请选择属性模板!')
  3591. return
  3592. }
  3593. if (this.modalData.flag === '1') {
  3594. partInformationSave(this.modalData).then(({data}) => {
  3595. if (data && data.code === 0) {
  3596. this.getDataList()
  3597. this.modalFlag = false
  3598. this.$message({
  3599. message: '操作成功',
  3600. type: 'success',
  3601. duration: 1500,
  3602. onClose: () => {}
  3603. })
  3604. } else {
  3605. this.$alert(data.msg, '错误', {
  3606. confirmButtonText: '确定'
  3607. })
  3608. }
  3609. })
  3610. } else {
  3611. partInformationEdit(this.modalData).then(({data}) => {
  3612. if (data && data.code === 0) {
  3613. this.getDataList()
  3614. this.modalFlag = false
  3615. this.$message({
  3616. message: '操作成功',
  3617. type: 'success',
  3618. duration: 1500,
  3619. onClose: () => {}
  3620. })
  3621. } else {
  3622. this.$alert(data.msg, '错误', {
  3623. confirmButtonText: '确定'
  3624. })
  3625. }
  3626. })
  3627. }
  3628. },
  3629. /**
  3630. * 物料信息删除
  3631. */
  3632. delModal () {
  3633. if (this.partSelections.length === 0) {
  3634. this.$message.warning('请勾选要删除的物料信息!')
  3635. return
  3636. }
  3637. this.$confirm(`是否删除这 `+ this.partSelections.length +` 条物料信息?`, '提示', {
  3638. confirmButtonText: '确定',
  3639. cancelButtonText: '取消',
  3640. type: 'warning'
  3641. }).then(() => {
  3642. let tempData = {
  3643. informationList: this.partSelections
  3644. }
  3645. partInformationDelete(tempData).then(({data}) => {
  3646. if (data && data.code === 0) {
  3647. this.getDataList()
  3648. this.partSelections = []
  3649. this.$message({
  3650. message: '操作成功',
  3651. type: 'success',
  3652. duration: 1500,
  3653. onClose: () => {}
  3654. })
  3655. } else {
  3656. this.$alert(data.msg, '错误', {
  3657. confirmButtonText: '确定'
  3658. })
  3659. }
  3660. })
  3661. }).catch(() => {
  3662. })
  3663. },
  3664. // ======== 列表操作方法 ========
  3665. /**
  3666. * 单机选中物料信息
  3667. * @param row
  3668. */
  3669. partClickRow (row) {
  3670. this.$refs.partTable.toggleRowSelection(row)
  3671. this.partCurrentRow = JSON.parse(JSON.stringify(row))
  3672. },
  3673. /**
  3674. * 复选物料信息
  3675. * @param val
  3676. */
  3677. selectionPart (val) {
  3678. this.partSelections = val
  3679. this.$refs.selectDiv.setLengthselected(this.partSelections.length)
  3680. },
  3681. // ======== 属性页签相关方法 ========
  3682. // /**
  3683. // * 编辑属性值方法
  3684. // * @returns {boolean}
  3685. // */
  3686. // itemSaveData () {
  3687. // if(this.itemData.partNo === '' || this.itemData.partNo == null){
  3688. // this.$message.warning('未选择物料!')
  3689. // return false
  3690. // }
  3691. // if(this.itemData.propertiesItemNo === ''|| this.itemData.propertiesItemNo == null){
  3692. // this.$message.warning('未选择属性!')
  3693. // return false
  3694. // }
  3695. // savePartItemValue(this.itemData).then(({data}) => {
  3696. // if (data && data.code === 0) {
  3697. // this.itemModalFlag = false
  3698. // this.getPartItem()
  3699. // this.$message({
  3700. // message: '操作成功',
  3701. // type: 'success',
  3702. // duration: 1500,
  3703. // onClose: () => {}
  3704. // })
  3705. // } else {
  3706. // this.$alert(data.msg, '错误', {
  3707. // confirmButtonText: '确定'
  3708. // })
  3709. // }
  3710. // })
  3711. // },
  3712. // ======== 附件的相关方法 ========
  3713. /**
  3714. * 获取物料附件列表
  3715. */
  3716. getFileContentData () {
  3717. let currentData = {
  3718. orderRef1: this.$store.state.user.site,
  3719. orderRef2: this.partCurrentRow.partNo
  3720. }
  3721. getFileContentList(currentData).then(({data}) => {
  3722. if (data && data.code === 0) {
  3723. this.fileContentList = data.rows
  3724. } else {
  3725. this.fileContentList = []
  3726. }
  3727. })
  3728. },
  3729. /**
  3730. * 上传文件
  3731. */
  3732. uploadFile () {
  3733. let currentData = {
  3734. titleCon: '物料附件上传',
  3735. site: this.$store.state.user.site,
  3736. createBy: this.$store.state.user.name,
  3737. partNo: this.partCurrentRow.partNo
  3738. }
  3739. //打开组件 去做新增业务
  3740. this.$nextTick(() => {
  3741. this.$refs.partUploadFile.init(currentData);
  3742. })
  3743. },
  3744. /**
  3745. * 文件删除
  3746. * @param row
  3747. */
  3748. deleteFile (row) {
  3749. this.$confirm('确定要删除此文件?', '提示', {
  3750. confirmButtonText: '确定',
  3751. cancelButtonText: '取消',
  3752. type: 'warning'
  3753. }).then(() => {
  3754. deleteQuotationFile(row).then(({data}) => {
  3755. if (data && data.code === 0) {
  3756. this.getFileContentData()
  3757. this.$message({
  3758. message: '操作成功',
  3759. type: 'success',
  3760. duration: 1500,
  3761. onClose: () => {}
  3762. })
  3763. } else {
  3764. this.$alert(data.msg, '错误', {
  3765. confirmButtonText: '确定'
  3766. })
  3767. }
  3768. })
  3769. }).catch(() => {
  3770. })
  3771. },
  3772. /**
  3773. * 文件下载
  3774. * @param row
  3775. */
  3776. downloadFile (row) {
  3777. downLoadQuotationFile(row).then(({data}) => {
  3778. // 不限制文件下载类型
  3779. const blob = new Blob([data], {type:'application/octet-stream;charset=utf-8'})
  3780. // 下载文件名称
  3781. const fileName = row.fileName
  3782. // a标签下载
  3783. const linkNode = document.createElement('a')
  3784. linkNode.download = fileName // a标签的download属性规定下载文件的名称
  3785. linkNode.style.display = 'none'
  3786. linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL
  3787. document.body.appendChild(linkNode)
  3788. linkNode.click() // 模拟在按钮上的一次鼠标单击
  3789. URL.revokeObjectURL(linkNode.href) // 释放URL 对象
  3790. document.body.removeChild(linkNode)
  3791. })
  3792. },
  3793. // ======== chooseList相关方法 ========
  3794. /**
  3795. * 获取基础数据列表S
  3796. * @param val
  3797. * @param type
  3798. */
  3799. getBaseList (val, type) {
  3800. this.tagNo = val
  3801. this.tempCodeNo = this.modalData.codeNo
  3802. this.$nextTick(() => {
  3803. let strVal = ''
  3804. if (val === 1007) {
  3805. strVal = this.modalData.umId
  3806. } else if (val === 108) {
  3807. strVal = this.modalData.familyId
  3808. } else if (val === 109) {
  3809. strVal = this.modalData.groupId
  3810. } else if (val === 110) {
  3811. strVal = this.modalData.productGroupId1
  3812. } else if (val === 111) {
  3813. strVal = this.modalData.productGroupId2
  3814. } else if (val === 112) {
  3815. strVal = this.modalData.productGroupId3
  3816. } else if (val === 113) {
  3817. strVal = this.modalData.productGroupId4
  3818. } else if (val === 114) {
  3819. strVal = this.modalData.manufacturerId
  3820. } else if (val === 20) {
  3821. strVal = this.modalData.codeNo
  3822. } else if (val === 123) {
  3823. strVal = this.modalData.hazardCode
  3824. } else if (val === 124) {
  3825. strVal = this.modalData.assetClass
  3826. } else if (val === 125) {
  3827. strVal = this.modalData.partStatus
  3828. } else if (val === 126) {
  3829. strVal = this.modalData.abcClass
  3830. } else if (val === 127) {
  3831. strVal = this.modalData.isoCountry
  3832. } else if (val === 128) {
  3833. strVal = this.modalData.regionOfOrigin
  3834. } else if (val === 129) {
  3835. strVal = this.modalData.customsStarNo
  3836. } else if (val === 131) {
  3837. strVal = this.modalData.partCostGroupId
  3838. } else if (val === 132) {
  3839. strVal = this.modalData.planningMethod
  3840. }
  3841. this.$refs.baseList.init(val, strVal)
  3842. })
  3843. },
  3844. /**
  3845. * 列表方法的回调
  3846. * @param val
  3847. */
  3848. getBaseData (val) {
  3849. if (this.tagNo === 1007) {
  3850. this.modalData.umId = val.um_id
  3851. this.modalData.umName = val.um_name
  3852. } else if (this.tagNo === 108) {
  3853. this.modalData.familyId = val.family_id
  3854. this.modalData.familyName = val.family_name
  3855. } else if (this.tagNo === 109) {
  3856. this.modalData.groupId = val.group_id
  3857. this.modalData.groupName = val.group_name
  3858. } else if (this.tagNo === 110) {
  3859. this.modalData.productGroupId1 = val.product_group_id
  3860. this.modalData.productGroupName1 = val.product_group_name
  3861. } else if (this.tagNo === 111) {
  3862. this.modalData.productGroupId2 = val.product_group_id
  3863. this.modalData.productGroupName2 = val.product_group_name
  3864. } else if (this.tagNo === 112) {
  3865. this.modalData.productGroupId3 = val.product_group_id
  3866. this.modalData.productGroupName3 = val.product_group_name
  3867. } else if (this.tagNo === 113) {
  3868. this.modalData.productGroupId4 = val.product_group_id
  3869. this.modalData.productGroupName4 = val.product_group_name
  3870. } else if (this.tagNo === 114) {
  3871. this.modalData.manufacturerId = val.manufacturer_id
  3872. this.modalData.manufacturerName = val.manufacturer_name
  3873. } else if (this.tagNo === 20) {
  3874. if (this.modalData.flag === '2') {
  3875. if (val.Code_no != this.tempCodeNo) {
  3876. this.$confirm(`更换属性模板将替换下方物料属性数据,请确认?`, '提示', {
  3877. confirmButtonText: '确定',
  3878. cancelButtonText: '取消',
  3879. type: 'warning'
  3880. }).then(() => {
  3881. this.modalData.codeNo = val.Code_no
  3882. this.$set(this.modalData, 'codeDesc', val.Code_desc)
  3883. }).catch(() => {
  3884. })
  3885. }
  3886. } else {
  3887. this.modalData.codeNo = val.Code_no
  3888. this.$set(this.modalData, 'codeDesc', val.Code_desc)
  3889. }
  3890. } else if (this.tagNo === 123) {
  3891. this.modalData.hazardCode = val.hazard_code
  3892. this.modalData.hazardDesc = val.hazard_desc
  3893. } else if (this.tagNo === 124) {
  3894. this.modalData.assetClass = val.asset_class
  3895. this.modalData.assetClassDesc = val.asset_class_desc
  3896. } else if (this.tagNo === 125) {
  3897. this.modalData.partStatus = val.part_status
  3898. this.modalData.partStatusDesc = val.part_status_desc
  3899. } else if (this.tagNo === 126) {
  3900. this.modalData.abcClass = val.abc_class
  3901. this.modalData.abcClassDesc = val.abc_class_desc
  3902. } else if (this.tagNo === 127) {
  3903. this.modalData.isoCountry = val.iso_country
  3904. this.modalData.isoCountryDesc = val.iso_country_desc
  3905. } else if (this.tagNo === 128) {
  3906. this.modalData.regionOfOrigin = val.region_of_origin
  3907. this.modalData.regionOfOriginDesc = val.region_of_origin_desc
  3908. } else if (this.tagNo === 129) {
  3909. this.modalData.customsStarNo = val.customs_star_no
  3910. this.modalData.customsStarDesc = val.customs_star_desc
  3911. } else if (this.tagNo === 131) {
  3912. this.modalData.partCostGroupId = val.part_cost_group_id
  3913. this.modalData.partCostGroupDesc = val.part_cost_group_desc
  3914. } else if (this.tagNo === 132) {
  3915. this.modalData.planningMethod = val.planning_method
  3916. this.modalData.planningMethodDesc = val.planning_method_desc
  3917. }
  3918. },
  3919. // ======== 导出相关方法 ========
  3920. /**
  3921. * 导出excel
  3922. */
  3923. async createExportData () {
  3924. this.searchData.limit = -1
  3925. this.searchData.page = 1
  3926. await partInformationSearch(this.searchData).then(({data}) => {
  3927. this.resultList = data.page.list
  3928. })
  3929. return this.resultList
  3930. },
  3931. startDownload () {},
  3932. finishDownload () {},
  3933. fields () {
  3934. let json = '{'
  3935. this.columnList.forEach((item, index) => {
  3936. if (index == this.columnList.length - 1) {
  3937. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
  3938. } else {
  3939. json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
  3940. }
  3941. })
  3942. json += '}'
  3943. let s = eval('(' + json + ')')
  3944. return s
  3945. }
  3946. }
  3947. }
  3948. </script>
  3949. <style scoped lang="scss">
  3950. /deep/ .customer-tab .el-tabs__content {
  3951. padding: 0px !important;
  3952. height: 459px;
  3953. }
  3954. /deep/ .customer-tab .el-tabs__content {
  3955. height: 294px;
  3956. }
  3957. .numInput /deep/ .el-input__inner{
  3958. text-align: right;
  3959. }
  3960. /deep/ .inlineNumber input::-webkit-outer-spin-button,
  3961. /deep/ .inlineNumber input::-webkit-inner-spin-button {
  3962. -webkit-appearance: none;
  3963. }
  3964. /deep/ .inlineNumber input[type="number"]{
  3965. -moz-appearance: textfield;
  3966. padding-right: 5px !important;
  3967. }
  3968. </style>