materialAppMessage.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli="iconCli" :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="exportTempletelist">导出
  8. </el-button>
  9. </div>
  10. <div class="tabbox">
  11. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  12. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  13. <el-table-column prop="region" label="城市">
  14. </el-table-column>
  15. <el-table-column prop="district" label="区县">
  16. </el-table-column>
  17. <el-table-column prop="selectedGys" label="供应商(全称)">
  18. </el-table-column>
  19. <el-table-column prop="useCase" label="使用场景">
  20. </el-table-column>
  21. <el-table-column prop="materialNo" label="物料编码">
  22. </el-table-column>
  23. <el-table-column prop="material" label="物料名称">
  24. </el-table-column>
  25. <el-table-column prop="unit" label="物料单位">
  26. </el-table-column>
  27. <el-table-column prop="spec" label="规格尺寸">
  28. </el-table-column>
  29. <el-table-column prop="chang" label="长(M)">
  30. </el-table-column>
  31. <el-table-column prop="kuan" label="宽(M)">
  32. </el-table-column>
  33. <el-table-column prop="coefficient" label="系数">
  34. </el-table-column>
  35. <el-table-column prop="quantity" label="数量">
  36. </el-table-column>
  37. <el-table-column prop="selectedGysPrice" label="结算金额(元,不含税)">
  38. </el-table-column>
  39. </el-table>
  40. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  41. :total="total">
  42. </el-pagination>
  43. </div>
  44. </div>
  45. </fullscreen>
  46. </template>
  47. <script>
  48. import mySearch from "../../../components/search.vue";
  49. import toolList from "../../../components/toolList";
  50. export default {
  51. components: {
  52. mySearch,
  53. toolList,
  54. },
  55. data() {
  56. return {
  57. searchList: [
  58. {
  59. type: "sel",
  60. tit: "使用场景",
  61. value: "",
  62. width: "31%",
  63. options: [
  64. {
  65. dataCode: "营业厅-VI改造-自有渠道",
  66. dataName: "营业厅-VI改造-自有渠道"
  67. },
  68. {
  69. dataCode: "营业厅-常规物料-自有渠道",
  70. dataName: "营业厅-常规物料-自有渠道"
  71. },
  72. {
  73. dataCode: "营业厅-VI改造-合作渠道",
  74. dataName: "营业厅-VI改造-合作渠道"
  75. },
  76. {
  77. dataCode: "营业厅-常规物料-合作渠道",
  78. dataName: "营业厅-常规物料-合作渠道"
  79. },
  80. {
  81. dataCode: "小区",
  82. dataName: "小区"
  83. },
  84. {
  85. dataCode: "校园",
  86. dataName: "校园"
  87. },
  88. {
  89. dataCode: "政企",
  90. dataName: "政企"
  91. }
  92. ]
  93. },
  94. { type: "input", tit: "供应商", value: "", width: "31%" },
  95. { type: "input", tit: "城市名称", value: "", width: "31%" },
  96. { type: "input", tit: "区县名称", value: "", width: "31%" },
  97. { type: "input", tit: "物料编码", value: "", width: "31%" }
  98. ],
  99. tooltit: "宣传物料制作费用明细",
  100. fullscreen: false,
  101. total: 0,
  102. pageSize: 1,
  103. tableData: [],
  104. dialogStatus: false,
  105. disableStatus: false,
  106. titname: "",
  107. infolist: {},
  108. userInfo: {},
  109. params: {},
  110. centerDialogVisible: false,
  111. messTit: "",
  112. delid: "",
  113. loading: false,
  114. loadinged: false,
  115. //使用场景
  116. sceneopt: [
  117. {
  118. dataCode: "1",
  119. dataName: "小区"
  120. },
  121. {
  122. dataCode: "2",
  123. dataName: "校园"
  124. },
  125. {
  126. dataCode: "3",
  127. dataName: "营业厅-VI改造-自有渠道"
  128. },
  129. {
  130. dataCode: "4",
  131. dataName: "营业厅-常规物料-自有渠道"
  132. },
  133. {
  134. dataCode: "5",
  135. dataName: '营业厅-VI改造-合作渠道'
  136. },
  137. {
  138. dataCode: "6",
  139. dataName: '营业厅-常规物料-合作渠道'
  140. },
  141. {
  142. dataCode: "7",
  143. dataName: "政企"
  144. }
  145. ],
  146. // 基础数据
  147. isAsicopt: [
  148. {
  149. id: "0",
  150. name: "是"
  151. },
  152. {
  153. id: "1",
  154. name: "否"
  155. }
  156. ],
  157. coefficientopt: [
  158. {
  159. id: "0",
  160. name: "按需录入"
  161. },
  162. {
  163. id: "1",
  164. name: "1"
  165. }
  166. ],
  167. //单位
  168. unitopt: [
  169. {
  170. id: "0",
  171. name: "平方米"
  172. },
  173. {
  174. id: "1",
  175. name: "个"
  176. },
  177. {
  178. id: "2",
  179. name: "延长米"
  180. },
  181. {
  182. id: "3",
  183. name: "套"
  184. },
  185. {
  186. id: "4",
  187. name: "组"
  188. }, {
  189. id: "5",
  190. name: "延米"
  191. }, {
  192. id: '6',
  193. name: '张'
  194. }
  195. ],
  196. //物料名称
  197. nameopt: [],
  198. //供应商
  199. suppOpt: [],
  200. usePlanceArr: [],
  201. metirialTypeopt: [],
  202. metirialCodeDisableStatus: false,
  203. // scene:[]
  204. };
  205. },
  206. methods: {
  207. exportTempletelist() {
  208. let data = this.params;
  209. // return
  210. this.$http({
  211. url: "/market/xcwlProcess/excelExportFeeDetail",
  212. method: "post",
  213. headers: {
  214. "Content-Type": "application/json",
  215. },
  216. responseType: "blob",
  217. data: {},
  218. }).then((response) => {
  219. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  220. let blob = new Blob([response.data], {
  221. type: 'application/vnd.ms-excel'
  222. })
  223. window.navigator.msSaveOrOpenBlob(blob,
  224. new Date().getTime() + '.xlsx')
  225. } else {
  226. /* 火狐谷歌的文件下载方式 */
  227. var blob = new Blob([response.data])
  228. var downloadElement = document.createElement('a')
  229. var href = window.URL.createObjectURL(blob)
  230. downloadElement.href = href
  231. downloadElement.download = new Date().getTime() + '.xlsx'
  232. document.body.appendChild(downloadElement)
  233. downloadElement.click()
  234. document.body.removeChild(downloadElement)
  235. window.URL.revokeObjectURL(href)
  236. }
  237. });
  238. },
  239. usePlance(v) {
  240. this.usePlanceArr = v;
  241. },
  242. closedia() {
  243. this.infolist = {};
  244. this.dialogStatus = false;
  245. },
  246. //搜索数据
  247. searchInfo(v) {
  248. this.params = {};
  249. v[0] ? (this.params.useCase = v[0]) : "";
  250. v[1] ? (this.params.selectedGys = v[1]) : "";
  251. v[2] ? (this.params.region = v[2]) : "";
  252. v[3] ? (this.params.district = v[3]) : "";
  253. v[4] ? (this.params.materialNo = v[4]) : "";
  254. this.getList(this.params, this.pageSize);
  255. },
  256. uploadBack(v) {
  257. let that = this;
  258. console.log(v);
  259. if (v.data.result == 0) {
  260. that.getList({}, 1);
  261. that.getUser();
  262. that.getMetirialType();
  263. that.getMetirialInfo();
  264. }
  265. },
  266. getMetirialInfo() {
  267. this.$http({
  268. url: "/market/cadvSecbuyMetirial/queryList",
  269. method: "post",
  270. headers: {
  271. "Content-Type": "application/json"
  272. },
  273. data: {
  274. dictCodePks: "metirialType"
  275. }
  276. }).then(res => {
  277. this.materialNameopt = res.data;
  278. });
  279. },
  280. getMetirialType() {
  281. this.$http({
  282. url: "/sysmgr/cfgDataDicts/queryMap",
  283. method: "post",
  284. headers: {
  285. "Content-Type": "application/json"
  286. },
  287. data: {
  288. dictCodePks: "metirialType"
  289. }
  290. }).then(res => {
  291. this.metirialTypeopt = res.data.body.metirialType;
  292. });
  293. },
  294. //获取列表
  295. getList(v, n) {
  296. this.pageSize = n;
  297. let _this = this;
  298. this.loading = true;
  299. this.tableData = [];
  300. this.$http({
  301. url: "/market/xcwlProcess/queryDonePage",
  302. method: "post",
  303. headers: {
  304. "Content-Type": "application/json",
  305. page: '{"pageNo":"' + n + '","pageSize":"10"}'
  306. },
  307. data: v
  308. }).then(res => {
  309. res.data.data.forEach(item => {
  310. for (let i = 0; i < this.sceneopt.length; i++) {
  311. if (this.sceneopt[i].dataCode == item.sceneName) {
  312. item.sceneName = this.sceneopt[i].dataName;
  313. }
  314. }
  315. });
  316. this.tableData = res.data.data;
  317. this.total = res.data.totalRecord;
  318. this.loading = false;
  319. });
  320. },
  321. // 分页
  322. currchange(v) {
  323. this.pageSize = v;
  324. this.getList(this.params, this.pageSize);
  325. },
  326. //功能栏
  327. iconCli(v) {
  328. if (v === 1) {
  329. this.getList(this.params, this.pageSize);
  330. }
  331. if (v === 2) {
  332. this.fullscreen = !this.fullscreen;
  333. }
  334. },
  335. getUser() {
  336. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  337. this.$http({
  338. url: "/market/cadvSupplier/queryValidSupplierList",
  339. method: "post",
  340. headers: {
  341. "Content-Type": "application/json"
  342. },
  343. // data: { buyTypeCode: "2" }
  344. data: {}
  345. }).then(res => {
  346. this.suppOpt = res.data;
  347. });
  348. }
  349. },
  350. mounted() {
  351. this.getList({}, 1);
  352. this.getUser();
  353. this.$http({
  354. url: "/sysmgr/cfgDataDicts/queryMap",
  355. method: "post",
  356. headers: {
  357. "Content-Type": "application/json"
  358. },
  359. data: {
  360. dictCodePks: "metirialType"
  361. }
  362. }).then(res => {
  363. this.metirialTypeopt = res.data.body.metirialType;
  364. // this.stypeList = res.data.body.materType;
  365. });
  366. },
  367. created() { }
  368. };
  369. </script>
  370. <style scoped lang="scss">
  371. .onetab {
  372. margin-bottom: 20px;
  373. padding: 0 20px;
  374. }
  375. .titbox {
  376. div {
  377. float: right;
  378. i {
  379. font-size: 22px;
  380. margin-left: 20px;
  381. cursor: pointer;
  382. }
  383. }
  384. }
  385. .tabbox {
  386. margin-top: 15px;
  387. }
  388. .pageBox {
  389. text-align: right;
  390. margin-top: 10px;
  391. }
  392. .info-line {
  393. width: 100%;
  394. display: block;
  395. padding-left: 20px;
  396. div {
  397. width: 50%;
  398. display: inline-block;
  399. }
  400. span {
  401. width: 80px;
  402. display: inline-block;
  403. text-align: left;
  404. i {
  405. color: red;
  406. display: inline-block;
  407. padding-right: 5px;
  408. }
  409. }
  410. .el-select,
  411. .el-input {
  412. width: calc(100% - 100px);
  413. }
  414. }
  415. .online {
  416. width: 100%;
  417. .el-select {
  418. width: calc(100% - 100px);
  419. }
  420. span {
  421. vertical-align: top;
  422. }
  423. .el-textarea {
  424. width: calc(100% - 100px);
  425. }
  426. }
  427. </style>