advdetailed.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList :tooltit='tooltit'></toolList>
  5. <div class="search">
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. <el-button class="btn-check" size="medium" type="primary" @click="outlist">导出
  8. </el-button>
  9. </div>
  10. <div class="tabbox">
  11. <table cellspacing='0' style="width: auto;">
  12. <tr>
  13. <th colspan="8">广告设计费</th>
  14. </tr>
  15. <tr>
  16. <th>序号</th>
  17. <th>文件编号</th>
  18. <th>文件名称</th>
  19. <th>提供物料</th>
  20. <th>折后单价(含税,元)</th>
  21. <th>数量</th>
  22. <th>结算费用(含税,元)</th>
  23. </tr>
  24. <tr v-for="(item,index) in tabList">
  25. <td>
  26. <div style="text-align: left">{{index+1}}</div>
  27. </td>
  28. <td>
  29. <div style="text-align: left;">{{item.code}}</div>
  30. </td>
  31. <td>
  32. <div style="text-align: left;">{{item.name}}</div>
  33. </td>
  34. <td>
  35. <div class="tab-f" style="text-align: left;" v-for="items in item.wl">{{items}}</div>
  36. </td>
  37. <td>
  38. <div class="tab-f" style="text-align: left;" v-for="items in item.dj">{{items}}</div>
  39. </td>
  40. <td>
  41. <div class="tab-f" style="text-align: left;" v-for="items in item.sl">{{items}}</div>
  42. </td>
  43. <td>
  44. <div class="tab-f" style="text-align: left;" v-for="items in item.fy">{{items}}</div>
  45. </td>
  46. <!-- <td rowspan="11" v-if="index == 0">
  47. <el-input v-model="factoryName" :disabled="disableStatus"
  48. style="text-align: left;width: 200px;">
  49. </el-input>
  50. </td> -->
  51. </tr>
  52. </table>
  53. <div style="text-align: right;padding-top: 10px;padding-right: 20px;">
  54. <span style="margin-right: 20px;">合计数量:{{allNum}}</span>
  55. <span>结算费用:{{allPrice}}</span>
  56. </div>
  57. </div>
  58. </div>
  59. </fullscreen>
  60. </template>
  61. <script>
  62. import mySearch from "../../../components/search.vue";
  63. import toolList from "../../../components/toolList.vue";
  64. export default {
  65. components: {
  66. mySearch,
  67. toolList
  68. },
  69. data() {
  70. return {
  71. searchList: [{
  72. type: 'input',
  73. tit: '供应商名称',
  74. value: '',
  75. width: '98%',
  76. },
  77. // {
  78. // type: 'date',
  79. // tit: '开始时间',
  80. // value: '',
  81. // width: '32%',
  82. // }, {
  83. // type: 'date',
  84. // tit: '结束时间',
  85. // value: '',
  86. // width: '32%',
  87. // },
  88. ],
  89. tooltit: '广告设计费明细',
  90. fullscreen: false,
  91. total: 0,
  92. pageSize: 1,
  93. tableData: [],
  94. dialogStatus: false,
  95. disableStatus: false,
  96. titname: '终端',
  97. infolist: {},
  98. typeOptions: [{
  99. dataCode: 1,
  100. dataName: 111,
  101. }],
  102. userInfo: {},
  103. params: {},
  104. infoApply: [],
  105. tabList:[],
  106. allPrice:0,
  107. allNum:0,
  108. }
  109. },
  110. methods: {
  111. //搜索数据
  112. searchInfo(v) {
  113. this.params = {};
  114. v[0] ? this.params.supplier = v[0] : '';
  115. v[1] ? this.params.contractStartTimeFrom = this.$formatDate(v[1] , "YYYY-MM-DD") : '';
  116. v[2] ? this.params.contractStartTimeTo = this.$formatDate(v[2] , "YYYY-MM-DD") : '';
  117. this.getList(this.params, this.pageSize);
  118. },
  119. //获取列表
  120. getList(v, n) {
  121. this.pageSize = n;
  122. let _this = this;
  123. this.$http({
  124. url: "/market/designSupplier/queryList",
  125. method: "post",
  126. headers: {
  127. "Content-Type": "application/json",
  128. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  129. },
  130. data: v,
  131. }).then((res) => {
  132. this.tabList = res.data;
  133. this.allPrice = res.data[res.data.length-1].amountPrice;
  134. this.allNum = res.data[res.data.length-1].numTotal;
  135. this.tabList.pop();
  136. });
  137. },
  138. // 分页
  139. currchange(v) {
  140. this.pageSize = v;
  141. this.getList(this.params, this.pageSize);
  142. },
  143. // =======================
  144. outlist() {
  145. this.$http({
  146. url: "/market/DesignSupplier/download",
  147. method: "post",
  148. headers: {
  149. "Content-Type": "application/json",
  150. },
  151. responseType: "blob",
  152. data: {supplier:this.params.supplier},
  153. }).then((response) => {
  154. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  155. let blob = new Blob([response.data], {
  156. type: 'application/vnd.ms-excel'
  157. })
  158. window.navigator.msSaveOrOpenBlob(blob,
  159. new Date().getTime() + '.xlsx')
  160. } else {
  161. /* 火狐谷歌的文件下载方式 */
  162. var blob = new Blob([response.data])
  163. var downloadElement = document.createElement('a')
  164. var href = window.URL.createObjectURL(blob)
  165. downloadElement.href = href
  166. downloadElement.download = new Date().getTime() + '.xlsx'
  167. document.body.appendChild(downloadElement)
  168. downloadElement.click()
  169. document.body.removeChild(downloadElement)
  170. window.URL.revokeObjectURL(href)
  171. }
  172. });
  173. },
  174. getUser() {
  175. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  176. this.infolist = {
  177. opNo: '',
  178. opName: '',
  179. };
  180. this.infolist.opNo = this.userInfo.loginNo;
  181. this.infolist.opName = this.userInfo.loginName;
  182. }
  183. },
  184. mounted() {
  185. this.getList({}, 1);
  186. this.getUser();
  187. },
  188. created() {
  189. }
  190. }
  191. </script>
  192. <style scoped lang="scss">
  193. .onetab {
  194. margin-bottom: 20px;
  195. padding: 0 20px;
  196. }
  197. .titbox {
  198. div {
  199. float: right;
  200. i {
  201. font-size: 22px;
  202. margin-left: 20px;
  203. cursor: pointer;
  204. }
  205. }
  206. }
  207. .pageBox {
  208. text-align: right;
  209. margin-top: 10px;
  210. }
  211. .info-line {
  212. width: 100%;
  213. display: block;
  214. padding-left: 20px;
  215. div {
  216. width: 50%;
  217. display: inline-block;
  218. }
  219. span {
  220. width: 80px;
  221. display: inline-block;
  222. text-align: left;
  223. i {
  224. color: red;
  225. display: inline-block;
  226. padding-right: 5px;
  227. }
  228. }
  229. .el-select,
  230. .el-input {
  231. width: calc(100% - 100px);
  232. }
  233. }
  234. .online {
  235. width: 100%;
  236. .el-select {
  237. width: calc(100% - 100px);
  238. }
  239. span {
  240. vertical-align: top;
  241. }
  242. .el-textarea {
  243. width: calc(100% - 100px);
  244. }
  245. }
  246. .tabbox {
  247. margin-top: 15px;
  248. height: calc(100vh - 300px);
  249. overflow-y: scroll;
  250. table {
  251. border-bottom: 1px solid #ddd;
  252. border-right: 1px solid #ddd;
  253. text-align: center;
  254. width: 100%!important;
  255. }
  256. tr {
  257. // width: 100%;
  258. }
  259. th {
  260. border: 1px solid #ddd;
  261. border-bottom: 0;
  262. border-right: 0;
  263. padding: 5px 10px;
  264. font-size: 14px;
  265. }
  266. td {
  267. border: 1px solid #ddd;
  268. border-bottom: 0;
  269. border-right: 0;
  270. // padding: 5px 10px;
  271. font-size: 12px;
  272. width: 10%;
  273. div{
  274. padding-left: 10px;
  275. }
  276. }
  277. }
  278. .tab-f{
  279. padding: 10px 0;
  280. border-bottom: 1px solid #ddd;
  281. }
  282. .tab-f:last-child{
  283. border-bottom: 0;
  284. }
  285. </style>