advcheck.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. <el-select v-model="advstatus" @change="advchange">
  7. <el-option v-for="items in advopt" :key="items.id" :label="items.name" :value="items.id">
  8. </el-option>
  9. </el-select>
  10. </div>
  11. <div class="tabbox">
  12. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  13. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  14. <el-table-column prop="id" label="工单编号">
  15. </el-table-column>
  16. <el-table-column prop="advTitle" label="工单标题">
  17. </el-table-column>
  18. <el-table-column prop="opNo" label="发起人">
  19. </el-table-column>
  20. <el-table-column prop="opName" label="发起人姓名">
  21. </el-table-column>
  22. <el-table-column prop="opTime" label="发起时间">
  23. </el-table-column>
  24. <el-table-column prop="stsDesc" label="状态">
  25. </el-table-column>
  26. <el-table-column label="操作" width="120px" align="center">
  27. <template slot-scope="scope">
  28. <el-button size="mini" type="primary" @click="dialogCheck(scope.row,1)">查看</el-button>
  29. <el-button size="mini" type="danger" v-if="userInfo.loginName != scope.row.opName"
  30. @click="dialogCheck(scope.row,2)">审核</el-button>
  31. <el-button v-if="userInfo.loginName == scope.row.opName&&scope.row.sts=='1'" size="mini" type="primary" @click="advSure(scope.row)">归档
  32. </el-button>
  33. </template>
  34. </el-table-column>
  35. </el-table>
  36. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  37. :total="total">
  38. </el-pagination>
  39. </div>
  40. <el-dialog title="广告管理" :visible.sync="dialogStatus" width="80%" :destroy-on-close="true"
  41. :modal-append-to-body="false" :close-on-click-modal="false">
  42. <div>
  43. <advert v-if="typestatsu === 2" @closeEdio="closeEdio" :componentInfo="componentInfo"
  44. :componentStatus="componentStatus" :changeinfo="changeinfo"></advert>
  45. </div>
  46. </el-dialog>
  47. <el-dialog title="定稿素材" :visible.sync="dialogStatusc" width="50%" :destroy-on-close="true"
  48. :modal-append-to-body="false" :close-on-click-modal="false">
  49. <el-form>
  50. <el-form-item class="info-line online">
  51. <span>素材类型</span>
  52. <el-select :popper-append-to-body="false" v-model="advtype" placeholder="素材类型">
  53. <el-option v-for="item in typeList" :key="item.dataCode" :label="item.dataName"
  54. :value="item.dataCode">
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. </el-form>
  59. <div slot="footer" class="dialog-footer">
  60. <el-button @click="dialogCli(1)" type="primary">确 定</el-button>
  61. <el-button @click="dialogCli(2)">取 消</el-button>
  62. </div>
  63. </el-dialog>
  64. </div>
  65. </fullscreen>
  66. </template>
  67. <script>
  68. import mySearch from "../../../components/search.vue";
  69. import toolList from "../../../components/toolList.vue";
  70. import advert from "./components/advert.vue"
  71. export default {
  72. components: {
  73. mySearch,
  74. toolList,
  75. advert
  76. },
  77. data() {
  78. return {
  79. tooltit: '广告管理',
  80. fullscreen: false,
  81. total: 0,
  82. pageSize: 1,
  83. tableData: [{}],
  84. dialogStatus: false,
  85. disableStatus: false,
  86. infolist: {},
  87. userInfo: {},
  88. params: {},
  89. typestatsu: 1,
  90. options: [],
  91. typeopt: [],
  92. componentInfo: {},
  93. componentStatus: false,
  94. dialogStatusc: false,
  95. loading: false,
  96. changeinfo: false,
  97. advstatus: '',
  98. advopt: [{
  99. id: '0',
  100. name: '待审批',
  101. },{
  102. id: '2',
  103. name: '定稿',
  104. }, ],
  105. btnctrlStatus: false,
  106. typeList: [],
  107. advtype: '',
  108. dgid:'',
  109. }
  110. },
  111. methods: {
  112. //获取列表
  113. getList(v, n) {
  114. this.pageSize = n;
  115. let _this = this;
  116. this.tableData = [];
  117. this.loading = true;
  118. let param = {
  119. sts: this.advstatus
  120. };
  121. this.$http({
  122. url: "/market/cadv/queryPage",
  123. method: "post",
  124. headers: {
  125. "Content-Type": "application/json",
  126. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  127. },
  128. data: param,
  129. }).then((res) => {
  130. this.tableData = res.data.data;
  131. this.total = res.data.totalRecord;
  132. this.loading = false;
  133. });
  134. },
  135. // 分页
  136. currchange(v) {
  137. this.pageSize = v;
  138. this.getList(this.params, this.pageSize);
  139. },
  140. advchange(){
  141. this.getList(this.params, this.pageSize);
  142. },
  143. //处理申请
  144. dialogCheck(n, v) {
  145. if (v == 1) {
  146. this.changeinfo = false;
  147. } else {
  148. this.changeinfo = true;
  149. }
  150. this.typestatsu = 2;
  151. this.dialogStatus = true;
  152. let params = {
  153. woNo: n.id,
  154. taskId: n.taskId
  155. }
  156. this.componentInfo = params;
  157. this.componentStatus = true;
  158. },
  159. advSure(v) {
  160. let _this = this;
  161. this.dialogStatusc = true;
  162. this.dgid = v.id;
  163. },
  164. dialogCli(v){
  165. let _this = this;
  166. if(v == 1){
  167. let advTypeName = '';
  168. for (let i = 0; i < this.typeList.length; i++) {
  169. if (this.typeList[i].dataCode == this.advtype) {
  170. advTypeName = this.typeList[i].dataName;
  171. }
  172. }
  173. let param = {woNo:this.dgid,advTypeName:advTypeName,advType:this.advtype}
  174. this.$http({
  175. url: "/market/cadv/mkConfirmAdv",
  176. method: "post",
  177. headers: {
  178. "Content-Type": "application/json",
  179. },
  180. data: param,
  181. }).then((res) => {
  182. if (res.data.result === 1) {
  183. _this.$message({
  184. message: res.data.desc,
  185. type: 'error'
  186. });
  187. } else {
  188. _this.$message({
  189. message: '成功',
  190. type: 'success'
  191. });
  192. _this.getList(_this.params, _this.pageSize);
  193. }
  194. });
  195. }
  196. this.dialogStatusc = false;
  197. this.advtype = '';
  198. return
  199. },
  200. closeEdio() {
  201. this.getList(this.params, this.pageSize);
  202. this.dialogStatus = false;
  203. this.componentStatus = false;
  204. },
  205. gettype() {
  206. this.$http({
  207. url: "/sysmgr/cfgDataDicts/queryMap",
  208. method: "post",
  209. headers: {
  210. "Content-Type": "application/json",
  211. },
  212. data: {
  213. dictCodePks: 'materType'
  214. },
  215. }).then((res) => {
  216. this.typeList = res.data.body.materType;
  217. });
  218. },
  219. //功能栏
  220. iconCli(v) {
  221. if (v === 1) {
  222. this.getList(this.params, this.pageSize);
  223. }
  224. if (v === 2) {
  225. this.fullscreen = !this.fullscreen
  226. }
  227. },
  228. ctrlbtn() {
  229. let v = JSON.parse(window.sessionStorage.childrenMenus);
  230. for (let i = 0; i < v.length; i++) {
  231. if (v[i].jspUrl == this.$route.path && v[i].systemflag == '1') {
  232. this.btnctrlStatus = true;
  233. return
  234. }
  235. }
  236. },
  237. },
  238. mounted() {
  239. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  240. console.log(this.userInfo)
  241. this.advstatus = this.$route.query.type;
  242. this.getList({}, 1);
  243. this.ctrlbtn();
  244. this.gettype();
  245. },
  246. created() {
  247. }
  248. }
  249. </script>
  250. <style scoped lang="scss">
  251. .approval {
  252. .roval-box {
  253. padding: 0 20px;
  254. margin-top: 20px;
  255. margin-bottom: 10px;
  256. .el-input {
  257. width: calc(100% - 200px);
  258. display: inline-block;
  259. }
  260. span {
  261. display: inline-block;
  262. width: 80px;
  263. font-size: 14px;
  264. margin-right: 20px;
  265. .el-input {
  266. width: 100%;
  267. display: inline-block;
  268. }
  269. }
  270. }
  271. }
  272. .onetab {
  273. margin-bottom: 20px;
  274. padding: 0 20px;
  275. }
  276. .titbox {
  277. div {
  278. float: right;
  279. i {
  280. font-size: 22px;
  281. margin-left: 20px;
  282. cursor: pointer;
  283. }
  284. }
  285. }
  286. .tabbox {
  287. margin-top: 15px;
  288. }
  289. .pageBox {
  290. text-align: right;
  291. margin-top: 10px;
  292. }
  293. .info-line {
  294. width: 100%;
  295. display: block;
  296. padding-left: 20px;
  297. div {
  298. width: 50%;
  299. display: inline-block;
  300. }
  301. span {
  302. width: 80px;
  303. display: inline-block;
  304. text-align: left;
  305. i {
  306. color: red;
  307. display: inline-block;
  308. padding-right: 5px;
  309. }
  310. }
  311. .el-select,
  312. .el-input {
  313. width: calc(100% - 100px);
  314. }
  315. }
  316. .online {
  317. width: 100%;
  318. .el-select {
  319. width: calc(100% - 100px);
  320. }
  321. span {
  322. vertical-align: top;
  323. }
  324. .el-textarea {
  325. width: calc(100% - 100px);
  326. }
  327. }
  328. </style>