advcheck.vue 14 KB

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