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