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.

333 lines
9.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
10 months ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <script>
  2. import {queryQuoteGroupDetailByInquiry} from "../../../../api/quote/quoteGroupDetail";
  3. export default {
  4. name: "inquiryQuoteDetail",
  5. props:{
  6. quotation: {
  7. type:Object,
  8. required:true
  9. },
  10. height:{
  11. type: [String,Number],
  12. default:"47vh",
  13. }
  14. },
  15. data(){
  16. return{
  17. queryLoading:false,
  18. dataList:[],
  19. columns: [
  20. {
  21. userId: this.$store.state.user.name,
  22. functionId: 102001,
  23. serialNumber: '102001Table2QuoteVersionNo',
  24. tableId: '102001Table2',
  25. tableName: '报价详情信息表',
  26. columnProp: 'quoteVersionNo',
  27. headerAlign: 'center',
  28. align: 'left',
  29. columnLabel: '报价单号',
  30. columnHidden: false,
  31. columnImage: false,
  32. columnSortable: false,
  33. sortLv: 0,
  34. status: true,
  35. fixed: '',
  36. columnWidth: 120
  37. },
  38. {
  39. userId: this.$store.state.user.name,
  40. functionId: 102001,
  41. serialNumber: '102001Table2QuoteDate',
  42. tableId: '102001Table2',
  43. tableName: '报价详情信息表',
  44. columnProp: 'quoteDate',
  45. headerAlign: 'center',
  46. align: 'left',
  47. columnLabel: '报价日期',
  48. columnHidden: false,
  49. columnImage: false,
  50. columnSortable: false,
  51. sortLv: 0,
  52. status: true,
  53. fixed: '',
  54. columnWidth: 120
  55. },
  56. {
  57. userId: this.$store.state.user.name,
  58. functionId: 102001,
  59. serialNumber: '102001Table2PartNo',
  60. tableId: '102001Table2',
  61. tableName: '报价详情信息表',
  62. columnProp: 'partNo',
  63. headerAlign: 'center',
  64. align: 'left',
  65. columnLabel: '物料编码',
  66. columnHidden: false,
  67. columnImage: false,
  68. columnSortable: false,
  69. sortLv: 0,
  70. status: true,
  71. fixed: '',
  72. columnWidth: 120
  73. },
  74. {
  75. userId: this.$store.state.user.name,
  76. functionId: 102001,
  77. serialNumber: '102001Table2PartDesc',
  78. tableId: '102001Table2',
  79. tableName: '报价详情信息表',
  80. columnProp: 'partDesc',
  81. headerAlign: 'center',
  82. align: 'left',
  83. columnLabel: '物料名称',
  84. columnHidden: false,
  85. columnImage: false,
  86. columnSortable: false,
  87. sortLv: 0,
  88. status: true,
  89. fixed: '',
  90. columnWidth: 240
  91. },
  92. {
  93. userId: this.$store.state.user.name,
  94. functionId: 102001,
  95. serialNumber: '102001Table2Qty',
  96. tableId: '102001Table2',
  97. tableName: '报价详情信息表',
  98. columnProp: 'qty',
  99. headerAlign: 'center',
  100. align: 'right',
  101. columnLabel: 'MOQ',
  102. columnHidden: false,
  103. columnImage: false,
  104. columnSortable: false,
  105. sortLv: 0,
  106. status: true,
  107. fixed: '',
  108. columnWidth: 100
  109. },
  110. {
  111. userId: this.$store.state.user.name,
  112. functionId: 102001,
  113. serialNumber: '102001Table2Qty',
  114. tableId: '102001Table2',
  115. tableName: '报价详情信息表',
  116. columnProp: 'unitPrice',
  117. headerAlign: 'center',
  118. align: 'right',
  119. columnLabel: '未税单价',
  120. columnHidden: false,
  121. columnImage: false,
  122. columnSortable: false,
  123. sortLv: 0,
  124. status: true,
  125. fixed: '',
  126. columnWidth: 100
  127. },
  128. {
  129. userId: this.$store.state.user.name,
  130. functionId: 102001,
  131. serialNumber: '102001Table2Qty',
  132. tableId: '102001Table2',
  133. tableName: '报价详情信息表',
  134. columnProp: 'taxRate',
  135. headerAlign: 'center',
  136. align: 'right',
  137. columnLabel: '税率',
  138. columnHidden: false,
  139. columnImage: false,
  140. columnSortable: false,
  141. sortLv: 0,
  142. status: true,
  143. fixed: '',
  144. columnWidth: 100
  145. },
  146. {
  147. userId: this.$store.state.user.name,
  148. functionId: 102001,
  149. serialNumber: '102001Table2Qty',
  150. tableId: '102001Table2',
  151. tableName: '报价详情信息表',
  152. columnProp: 'exchangeRate1',
  153. headerAlign: 'center',
  154. align: 'right',
  155. columnLabel: '其他税率',
  156. columnHidden: false,
  157. columnImage: false,
  158. columnSortable: false,
  159. sortLv: 0,
  160. status: true,
  161. fixed: '',
  162. columnWidth: 100
  163. },
  164. {
  165. userId: this.$store.state.user.name,
  166. functionId: 102001,
  167. serialNumber: '102001Table2Qty',
  168. tableId: '102001Table2',
  169. tableName: '报价详情信息表',
  170. columnProp: 'taxUnitPrice',
  171. headerAlign: 'center',
  172. align: 'right',
  173. columnLabel: '含税单价(CNY)',
  174. columnHidden: false,
  175. columnImage: false,
  176. columnSortable: false,
  177. sortLv: 0,
  178. status: true,
  179. fixed: '',
  180. columnWidth: 100
  181. },
  182. {
  183. userId: this.$store.state.user.name,
  184. functionId: 102001,
  185. serialNumber: '102001Table2Qty',
  186. tableId: '102001Table2',
  187. tableName: '报价详情信息表',
  188. columnProp: 'currencyDesc2',
  189. headerAlign: 'center',
  190. align: 'right',
  191. columnLabel: '币种',
  192. columnHidden: false,
  193. columnImage: false,
  194. columnSortable: false,
  195. sortLv: 0,
  196. status: true,
  197. fixed: '',
  198. columnWidth: 100
  199. },
  200. {
  201. userId: this.$store.state.user.name,
  202. functionId: 102001,
  203. serialNumber: '102001Table2Qty',
  204. tableId: '102001Table2',
  205. tableName: '报价详情信息表',
  206. columnProp: 'exchangeRate2',
  207. headerAlign: 'center',
  208. align: 'right',
  209. columnLabel: '汇率',
  210. columnHidden: false,
  211. columnImage: false,
  212. columnSortable: false,
  213. sortLv: 0,
  214. status: true,
  215. fixed: '',
  216. columnWidth: 100
  217. },
  218. {
  219. userId: this.$store.state.user.name,
  220. functionId: 102001,
  221. serialNumber: '102001Table2Qty',
  222. tableId: '102001Table2',
  223. tableName: '报价详情信息表',
  224. columnProp: 'currencyTotalCost2',
  225. headerAlign: 'center',
  226. align: 'right',
  227. columnLabel: '含税单价',
  228. columnHidden: false,
  229. columnImage: false,
  230. columnSortable: false,
  231. sortLv: 0,
  232. status: true,
  233. fixed: '',
  234. columnWidth: 100
  235. },
  236. {
  237. userId: this.$store.state.user.name,
  238. functionId: 102001,
  239. serialNumber: '102001Table2Remark',
  240. tableId: '102001Table2',
  241. tableName: '报价详情信息表',
  242. columnProp: 'remark',
  243. headerAlign: 'center',
  244. align: 'left',
  245. columnLabel: '备注',
  246. columnHidden: false,
  247. columnImage: false,
  248. columnSortable: false,
  249. sortLv: 0,
  250. status: true,
  251. fixed: '',
  252. columnWidth: 120
  253. },
  254. ],
  255. };
  256. },
  257. methods:{
  258. handleQuery(){
  259. let params = {
  260. internalInquiryNo: this.quotation.quotationNo,
  261. site: this.quotation.site
  262. }
  263. this.queryLoading = true;
  264. queryQuoteGroupDetailByInquiry(params).then(({data})=>{
  265. if (data && data.code === 0){
  266. this.dataList = data.rows;
  267. }else {
  268. this.$message.warning(data.msg);
  269. }
  270. this.queryLoading = false;
  271. }).catch((error)=>{
  272. this.$message.error(error)
  273. this.queryLoading = false;
  274. })
  275. },
  276. handleClickDetail(row){
  277. if (this.$router.resolve('/quote-index').resolved.name === '404') {
  278. this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',})
  279. } else {
  280. this.$router.push({
  281. name: 'quote-index',
  282. params:{
  283. quoteVersionNo:row.quoteVersionNo,
  284. type:'project'
  285. }
  286. })
  287. }
  288. }
  289. },
  290. watch:{
  291. "quotation"(newVal,oldVal){
  292. if (newVal && newVal.site && newVal.quotationNo){
  293. this.handleQuery();
  294. }else {
  295. this.dataList = [];
  296. }
  297. }
  298. }
  299. }
  300. </script>
  301. <template>
  302. <div>
  303. <el-table :height="height" :data="dataList" border v-loading="queryLoading" style="margin-top: 5px">
  304. <el-table-column label="操作" min-width="80px" fixed="left" align="center">
  305. <template slot-scope="scope">
  306. <a @click="handleClickDetail(scope.row)">详情</a>
  307. </template>
  308. </el-table-column>
  309. <el-table-column
  310. v-for="(item,index) in columns" :key="index"
  311. :sortable="item.columnSortable"
  312. :prop="item.columnProp"
  313. :header-align="item.headerAlign"
  314. :show-overflow-tooltip="item.showOverflowTooltip"
  315. :align="item.align"
  316. :fixed="item.fixed===''?false:item.fixed"
  317. :min-width="item.columnWidth"
  318. :label="item.columnLabel">
  319. <template slot-scope="scope" >
  320. <span v-if="!item.columnHidden"> {{ scope.row[item.columnProp]}}</span>
  321. <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
  322. </template>
  323. </el-table-column>
  324. </el-table>
  325. </div>
  326. </template>
  327. <style scoped>
  328. </style>