inventoryTableDetails.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <template>
  2. <ele-pro-table
  3. ref="table"
  4. :needPage="false"
  5. :columns="columns"
  6. :datasource="form.datasource"
  7. row-key="id"
  8. @columns-change="handleColumnChange"
  9. :cache-key="cacheKeyUrl"
  10. :maxHeight="350"
  11. >
  12. <template v-slot:technicalDrawings="{ row }">
  13. <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
  14. </template>
  15. <template v-slot:packagingStrength="scope">
  16. <DictSelection
  17. disabled
  18. dict-name="包装强度"
  19. v-model="scope.row.extField.packagingStrength"
  20. ></DictSelection>
  21. </template>
  22. <template v-slot:packagingDensity="scope">
  23. <DictSelection
  24. disabled
  25. dict-name="包装密度"
  26. v-model="scope.row.extField.packagingDensity"
  27. ></DictSelection>
  28. </template>
  29. </ele-pro-table>
  30. </template>
  31. <script>
  32. import dictMixins from '@/mixins/dictMixins';
  33. import tabMixins from '@/mixins/tableColumnsMixin';
  34. // import fileMain from '@/components/addDoc/index.vue';
  35. import getDynamicsColumns from '@/mixins/getDynamicsColumns';
  36. import { reviewStatusEnum, lbjtList } from '@/enum/dict';
  37. import { levelList } from '@/enum/dict.js';
  38. export default {
  39. mixins: [dictMixins, tabMixins,getDynamicsColumns],
  40. components: {
  41. // fileMain
  42. },
  43. data() {
  44. return {
  45. cacheKeyUrl: 'eos-saleManage-invoice-inventoryTableDetail',
  46. form: {
  47. datasource: []
  48. }
  49. };
  50. },
  51. created() {
  52. this.requestDict('产地');
  53. this.requestDict('生产类型');
  54. },
  55. computed: {
  56. clientEnvironmentId() {
  57. return this.$store.state.user.info.clientEnvironmentId;
  58. },
  59. columns() {
  60. return [
  61. {
  62. width: 45,
  63. type: 'index',
  64. columnKey: 'index',
  65. align: 'center',
  66. fixed: 'left'
  67. },
  68. {
  69. minWidth: 150,
  70. prop: 'orderNo',
  71. label: '订单编码',
  72. align: 'center',
  73. fixed: 'left'
  74. },
  75. {
  76. width: 200,
  77. prop: 'productName',
  78. label: '名称',
  79. slot: 'productName',
  80. align: 'center'
  81. },
  82. {
  83. width: 120,
  84. prop: 'productCode',
  85. label: '编码',
  86. slot: 'productCode',
  87. align: 'center'
  88. },
  89. {
  90. width: 200,
  91. prop: 'productCategoryName',
  92. label: '类型',
  93. slot: 'productCategoryName',
  94. align: 'center'
  95. },
  96. {
  97. width: 160,
  98. prop: 'batchNo',
  99. label: '批次号',
  100. slot: 'batchNo',
  101. align: 'center'
  102. },
  103. {
  104. width: 160,
  105. prop: 'productBrand',
  106. label: '牌号',
  107. slot: 'productBrand',
  108. align: 'center'
  109. },
  110. {
  111. width: 120,
  112. prop: 'modelType',
  113. label: '型号',
  114. slot: 'modelType',
  115. align: 'center'
  116. },
  117. {
  118. width: 120,
  119. prop: 'specification',
  120. label: '规格',
  121. slot: 'specification',
  122. align: 'center'
  123. },
  124. {
  125. minWidth: 160,
  126. prop: 'productionCodes',
  127. label: '生产编号',
  128. align: 'center'
  129. },
  130. {
  131. width: 120,
  132. prop: 'imgCode',
  133. align: 'center',
  134. label: '图号/件号',
  135. showOverflowTooltip: true
  136. },
  137. {
  138. width: 120,
  139. prop: 'produceType',
  140. align: 'center',
  141. label: '属性类型',
  142. formatter: (row, column) => {
  143. if (row.produceType) {
  144. return row.produceType
  145. .map((item) => {
  146. return lbjtList[item];
  147. })
  148. .toString();
  149. }
  150. },
  151. showOverflowTooltip: true
  152. },
  153. {
  154. minWidth: 120,
  155. prop: 'goodsLevel',
  156. label: '物品级别',
  157. formatter: (_row, _column, cellValue) => {
  158. return levelList.find(item=>item.value==_row.goodsLevel)?.label
  159. },
  160. align: 'center'
  161. },
  162. {
  163. width: 120,
  164. prop: 'customerMark',
  165. label: '客户代号',
  166. slot: 'customerMark',
  167. align: 'center'
  168. },
  169. {
  170. width: 200,
  171. prop: 'warehouseName',
  172. label: '仓库名称',
  173. slot: 'warehouseName',
  174. align: 'center'
  175. },
  176. {
  177. width: 150,
  178. prop: 'saleCount',
  179. label: '数量',
  180. slot: 'saleCount',
  181. headerSlot: 'headerTotalCount',
  182. align: 'center'
  183. },
  184. {
  185. width: 150,
  186. prop: 'saleUnit',
  187. label: '单位',
  188. slot: 'saleUnit',
  189. headerSlot: 'headerTotalCount',
  190. align: 'center'
  191. },
  192. {
  193. width: 120,
  194. prop: 'packingSpecification',
  195. align: 'center',
  196. label: '包装规格',
  197. showOverflowTooltip: true
  198. },
  199. {
  200. width: 120,
  201. prop: 'totalCount',
  202. label: '发货数量',
  203. slot: 'totalCount',
  204. headerSlot: 'headerTotalCount',
  205. align: 'center'
  206. },
  207. {
  208. width: 120,
  209. prop: 'orderTotalCount',
  210. label: '订单数量',
  211. slot: 'orderTotalCount',
  212. align: 'center'
  213. },
  214. {
  215. width: 80,
  216. prop: 'measuringUnit',
  217. label: '计量单位',
  218. slot: 'measuringUnit',
  219. align: 'center'
  220. },
  221. {
  222. width: 120,
  223. prop: 'blockCount',
  224. label: '发货块数',
  225. slot: 'blockCount',
  226. align: 'center',
  227. show: this.clientEnvironmentId == '4'
  228. },
  229. {
  230. width: 120,
  231. prop: 'singleWeight',
  232. label: '单重',
  233. slot: 'singleWeight',
  234. align: 'center'
  235. },
  236. {
  237. width: 200,
  238. prop: 'receiveTotalWeight',
  239. label: '收货总重',
  240. slot: 'receiveTotalWeight',
  241. align: 'center',
  242. headerSlot: 'headerTotalCount'
  243. },
  244. {
  245. width: 100,
  246. prop: 'sendTotalWeight',
  247. label: '发货总重',
  248. slot: 'sendTotalWeight',
  249. align: 'center'
  250. },
  251. {
  252. width: 100,
  253. prop: 'increaseTotalWeight',
  254. label: '增重重量',
  255. slot: 'increaseTotalWeight',
  256. align: 'center'
  257. },
  258. {
  259. width: 100,
  260. prop: 'weightUnit',
  261. label: '重量单位',
  262. slot: 'weightUnit',
  263. align: 'center'
  264. },
  265. // {
  266. // width: 160,
  267. // prop: 'pricingWay',
  268. // label: '计价方式',
  269. // slot: 'pricingWay',
  270. // align: 'center',
  271. // formatter: (row, column) => {
  272. // return row.pricingWay == 1
  273. // ? '按数量计费'
  274. // : row.pricingWay == 2
  275. // ? '按重量计费'
  276. // : '';
  277. // }
  278. // },
  279. {
  280. width: 160,
  281. prop: 'singlePrice',
  282. label: '单价',
  283. slot: 'singlePrice',
  284. align: 'center'
  285. },
  286. {
  287. width: 160,
  288. prop: 'taxRate',
  289. label: '税率',
  290. formatter: (_row, _column, cellValue) => {
  291. return _row.taxRate ? _row.taxRate + '%' : '';
  292. },
  293. align: 'center'
  294. },
  295. {
  296. width: 160,
  297. prop: 'notaxSinglePrice',
  298. label: '不含税单价',
  299. align: 'center'
  300. },
  301. {
  302. width: 160,
  303. prop: 'discountSinglePrice',
  304. label: '折后单价',
  305. slot: 'discountSinglePrice',
  306. align: 'center'
  307. },
  308. {
  309. width: 120,
  310. prop: 'totalPrice',
  311. label: '合计',
  312. slot: 'totalPrice',
  313. align: 'center'
  314. },
  315. {
  316. width: 120,
  317. prop: 'discountTotalPrice',
  318. label: '折后合计',
  319. slot: 'discountTotalPrice',
  320. align: 'center'
  321. },
  322. ...this.dynamicsColumns,
  323. // {
  324. // width: 120,
  325. // prop: 'deliveryDays',
  326. // label: '交期(天)',
  327. // slot: 'deliveryDays',
  328. // align: 'center'
  329. // },
  330. {
  331. width: 200,
  332. prop: 'guaranteePeriod',
  333. label: '有效期',
  334. slot: 'guaranteePeriod',
  335. formatter: (_row, _column, cellValue) => {
  336. return (
  337. (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
  338. );
  339. },
  340. align: 'center'
  341. },
  342. {
  343. width: 200,
  344. prop: 'guaranteePeriodDeadline',
  345. label: '有效期截止日期',
  346. slot: 'guaranteePeriodDeadline',
  347. align: 'center'
  348. },
  349. {
  350. prop: 'provenance',
  351. label: '产地',
  352. slot: 'provenance',
  353. align: 'center',
  354. // show:this.contractBookType==2,
  355. minWidth: 200,
  356. showOverflowTooltip: true,
  357. formatter: (row, column) => {
  358. return row.provenance && row.provenance.length
  359. ? row.provenance
  360. .map((item) => this.getDictValue('产地', item))
  361. .join(',')
  362. : '';
  363. }
  364. },
  365. {
  366. width: 130,
  367. prop: 'technicalAnswerName',
  368. label: '技术答疑人',
  369. slot: 'technicalAnswerName',
  370. align: 'center'
  371. },
  372. {
  373. width: 220,
  374. prop: 'technicalParams',
  375. label: '技术参数',
  376. slot: 'technicalParams',
  377. align: 'center'
  378. },
  379. {
  380. width: 240,
  381. prop: 'technicalDrawings',
  382. label: '技术图纸',
  383. slot: 'technicalDrawings',
  384. align: 'center'
  385. },
  386. {
  387. width: 220,
  388. prop: 'remark',
  389. label: '备注',
  390. slot: 'remark',
  391. align: 'center'
  392. }
  393. ];
  394. }
  395. },
  396. methods: {
  397. //修改回显
  398. putTableValue(data) {
  399. console.log(data,'data')
  400. if (data) {
  401. this.form.datasource = data;
  402. }
  403. }
  404. }
  405. };
  406. </script>
  407. <style lang="scss" scoped>
  408. .headbox {
  409. display: flex;
  410. justify-content: flex-start;
  411. align-items: center;
  412. .amount {
  413. font-size: 14px;
  414. font-weight: bold;
  415. padding-right: 30px;
  416. }
  417. }
  418. .time-form .el-form-item {
  419. margin-bottom: 0 !important;
  420. }
  421. ::v-deep .period {
  422. display: flex;
  423. .borderleftnone {
  424. .el-input--medium .el-input__inner {
  425. border-top-right-radius: 0;
  426. border-bottom-right-radius: 0;
  427. }
  428. }
  429. .borderrightnone {
  430. .el-input--medium .el-input__inner {
  431. border-top-left-radius: 0;
  432. border-bottom-left-radius: 0;
  433. }
  434. }
  435. }
  436. ::v-deep .time-form tbody > tr:hover > td {
  437. background-color: transparent !important;
  438. }
  439. ::v-deep .time-form .el-table tr {
  440. background-color: #ffffff;
  441. }
  442. .pricebox {
  443. display: flex;
  444. justify-content: flex-start;
  445. align-items: center;
  446. font-weight: bold;
  447. }
  448. </style>