issueList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <!-- <div style="height: 95%"> -->
  3. <div class="container" style="margin: 15px 0 0 0">
  4. <fullscreen
  5. :fullscreen.sync="fullscreen"
  6. class="container-box"
  7. style="margin: 0 !important; padding: 0 !important"
  8. >
  9. <div class="titbox">
  10. <h2>下发管理</h2>
  11. <div>
  12. <i class="el-icon-refresh" @click="iconCli(1)"></i>
  13. <i class="el-icon-full-screen" @click="iconCli(2)"></i>
  14. </div>
  15. </div>
  16. <div class="search">
  17. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  18. </div>
  19. <div class="tabbox">
  20. <el-table
  21. height="calc(100% - 40px)"
  22. v-loading="loading"
  23. class="com-table"
  24. ref="multipleTable"
  25. :data="tableData"
  26. tooltip-effect="dark"
  27. size="small"
  28. border
  29. style="width: 100%"
  30. >
  31. <el-table-column align="center" prop="kpiTempName" show-overflow-tooltip
  32. label="模板名称"></el-table-column>
  33. <el-table-column align="center" prop="woTitle" show-overflow-tooltip label="标题"></el-table-column>
  34. <el-table-column align="center" prop="sendName" show-overflow-tooltip label="派发人"></el-table-column>
  35. <el-table-column align="center" prop="requiredTime" show-overflow-tooltip
  36. label="反馈时间"></el-table-column>
  37. <el-table-column align="center" prop="needReply" show-overflow-tooltip
  38. label="是否需要回复"></el-table-column>
  39. <el-table-column align="center" prop="hotline" width="200" label="操作">
  40. <template slot-scope="scope">
  41. <el-button size="mini" type="primary" plain
  42. @click="detailes(scope.row)">查看
  43. </el-button>
  44. <el-button size="mini" type="danger" plain
  45. v-show="scope.row.sts != '3' && scope.row.isNew == '1' && scope.row.needReply == '是'"
  46. @click="discontinue(scope.row)">中止
  47. </el-button>
  48. <el-button size="mini" type="primary" plain
  49. v-show="scope.row.isNew == '1' && scope.row.needReply == '是' && scope.row.sts != '3'"
  50. @click="updatesDialog(scope.row)">修改
  51. </el-button>
  52. </template>
  53. </el-table-column>
  54. </el-table>
  55. <el-pagination
  56. class="pageBox"
  57. @current-change="currchange"
  58. layout="prev, pager, next"
  59. background
  60. :total="total"
  61. >
  62. </el-pagination>
  63. </div>
  64. <myMessage
  65. :messTit="messTit"
  66. @closeMessage="closeMessage"
  67. :centerDialogVisible="centerDialogVisible"
  68. v-if="centerDialogVisible"
  69. ></myMessage>
  70. </fullscreen>
  71. <el-dialog
  72. title="修改"
  73. :visible.sync="dialogStatus"
  74. width="50%"
  75. :close-on-press-escape="false"
  76. :show-close="false"
  77. :destroy-on-close="true"
  78. :modal-append-to-body="false"
  79. :close-on-click-modal="false"
  80. >
  81. <el-form ref="issueForm" :rules="rules" :model="infolist" label-width="80px">
  82. <el-form-item label="反馈时间" prop="requiredTime">
  83. <el-date-picker
  84. style="width: 100%"
  85. v-model="infolist.requiredTime"
  86. type="datetime"
  87. placeholder="选择反馈时间"
  88. value-format="yyyy-MM-01 HH:mm:ss">
  89. </el-date-picker>
  90. </el-form-item>
  91. </el-form>
  92. <div slot="footer" class="dialog-footer">
  93. <el-button @click="resetForm('issueForm')">取 消</el-button>
  94. <el-button @click="updates('issueForm')">确 定</el-button>
  95. </div>
  96. </el-dialog>
  97. </div>
  98. </template>
  99. <script>
  100. import mySearch from "../../../components/search";
  101. import myMessage from "../../../components/myMessage.vue";
  102. export default {
  103. components: {
  104. mySearch,
  105. myMessage,
  106. },
  107. data() {
  108. return {
  109. infolist:{
  110. woNo: "",
  111. requiredTime: "",
  112. },
  113. centerDialogVisible: false,
  114. messTit: "",
  115. dialogStatus: false,
  116. rules: {
  117. requiredTime: [
  118. {
  119. required: true,
  120. message: "请选择反馈时间",
  121. trigger: 'blur',
  122. },
  123. ],
  124. },
  125. headers: {
  126. agileauthtoken: sessionStorage.agileauthtoken.replace(/"/g, ""),
  127. },
  128. fullscreen: false,
  129. total: 0,
  130. pageSize: 1,
  131. tableData: [],
  132. searchList: [
  133. {
  134. type: "input",
  135. tit: "模板名称",
  136. value: "",
  137. width: "100%",
  138. options: [],
  139. },
  140. ],
  141. params: {
  142. preTempName: "",
  143. },
  144. loading: false,
  145. };
  146. },
  147. methods: {
  148. detailes(val) {
  149. if (val.needReply == '是') {
  150. this.$router.push("/kpiRecall?status=see&id=" + val.woNo + "");
  151. } else {
  152. this.$router.push("/kpiNoRecall?status=see&id=" + val.woNo + "");
  153. }
  154. },
  155. updates(formName) {
  156. this.$refs[formName].validate((valid) => {
  157. if (valid) {
  158. let data = this.infolist;
  159. this.$http({
  160. url: "/market/kpiWo/updates",
  161. method: "post",
  162. headers: {
  163. "Content-Type": "application/json",
  164. },
  165. data: data,
  166. }).then((res) => {
  167. if (res.data.result == 0) {
  168. this.$message({
  169. type: "success",
  170. message: "修改成功",
  171. });
  172. } else {
  173. this.$message({
  174. type: "error",
  175. message: res.data.desc,
  176. });
  177. }
  178. this.resetForm(formName);
  179. this.closeDialog();
  180. this.getList(this.params, this.pageSize);
  181. });
  182. }
  183. });
  184. },
  185. // 取消提交
  186. resetForm(formName) {
  187. //this.$refs[formName].resetFields();
  188. this.woNo = "";
  189. this.requiredTime = "";
  190. this.closeDialog();
  191. },
  192. showDialog() {
  193. this.dialogStatus = true;
  194. },
  195. closeDialog() {
  196. this.dialogStatus = false;
  197. },
  198. updatesDialog(val) {
  199. this.infolist.woNo = val.woNo;
  200. this.infolist.requiredTime = val.requiredTime;
  201. this.showDialog();
  202. },
  203. discontinue(val) {
  204. this.centerDialogVisible = true;
  205. this.messTit = "中止后将不能修改回复,是否确定中止?";
  206. this.infolist.woNo = val.woNo;
  207. },
  208. closeMessage(v) {
  209. this.centerDialogVisible = false;
  210. if (v === 1) {
  211. this.$http({
  212. url: "/market/kpiWo/discontinue",
  213. method: "post",
  214. headers: {
  215. "Content-Type": "application/json",
  216. },
  217. data: {woNo: this.infolist.woNo},
  218. }).then((res) => {
  219. if (res.data.result == "0") {
  220. this.$message({message: "中止成功", type: "success"});
  221. this.getList(this.params, this.pageSize);
  222. } else {
  223. this.$message({message: res.data.desc, type: 'error'});
  224. }
  225. });
  226. }
  227. },
  228. //搜索数据
  229. searchInfo(v) {
  230. this.params = {};
  231. v[0] ? (this.params.preTempName = v[0]) : "";
  232. this.getList(this.params, this.pageSize);
  233. },
  234. //获取列表
  235. getList(v, n) {
  236. this.loading = true;
  237. this.pageSize = n;
  238. this.$http({
  239. url: "/market/kpiWo/querySMkKpiWoPage",
  240. method: "post",
  241. headers: {
  242. "Content-Type": "application/json",
  243. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  244. },
  245. data: v,
  246. }).then((res) => {
  247. this.loading = false;
  248. this.tableData = res.data.data;
  249. this.total = res.data.totalRecord;
  250. });
  251. },
  252. //功能栏
  253. iconCli(v) {
  254. if (v === 1) {
  255. this.getList(this.params, this.pageSize);
  256. }
  257. if (v === 2) {
  258. this.fullscreen = !this.fullscreen;
  259. }
  260. },
  261. // 分页
  262. currchange(v) {
  263. this.pageSize = v;
  264. this.getList(this.params, this.pageSize);
  265. },
  266. },
  267. mounted() {
  268. this.getList(this.params, this.pageSize);
  269. },
  270. watch: {
  271. $route() {
  272. this.getList(this.params, this.pageSize);
  273. },
  274. },
  275. };
  276. </script>
  277. <style scoped>
  278. .el-upload-list {
  279. float: right;
  280. }
  281. .el-input__suffix {
  282. cursor: pointer;
  283. }
  284. .container .el-upload {
  285. width: auto !important;
  286. }
  287. </style>
  288. <style scoped lang="scss">
  289. .btn-default {
  290. display: inline;
  291. margin-left: 10px;
  292. }
  293. .titbox {
  294. div {
  295. float: right;
  296. i {
  297. font-size: 22px;
  298. margin-left: 20px;
  299. cursor: pointer;
  300. }
  301. }
  302. }
  303. .tabbox {
  304. margin-top: 15px;
  305. }
  306. .pageBox {
  307. text-align: right;
  308. margin-top: 10px;
  309. }
  310. </style>