index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="app-container">
  3. <el-form inline :model="dataForm">
  4. <el-form-item>
  5. <el-select v-model="dataForm.actId" placeholder="请选择活动名" clearable filterable @change="getDataList()">
  6. <el-option
  7. v-for="item in actList"
  8. :key="item.actId"
  9. :label="item.name"
  10. :value="item.actId">
  11. </el-option>
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item>
  15. <el-button icon="el-icon-refresh-left" @click="getDataList">搜索</el-button>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-button icon="el-icon-refresh-left" @click="resetSearch">重置</el-button>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button @click="save" style="float: right">保存</el-button>
  22. </el-form-item>
  23. </el-form>
  24. <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
  25. <el-table-column label="序号" type="index" width="55" align="center"/>
  26. <el-table-column
  27. prop="branName"
  28. header-align="center"
  29. align="center"
  30. label="承包单位"
  31. v-if="loginContractorId === 1">
  32. </el-table-column>
  33. <el-table-column
  34. prop="actId"
  35. header-align="center"
  36. align="center"
  37. width="400"
  38. label="活动名">
  39. <template slot-scope="scope">
  40. <span v-if="scope.row.actId === 110">入库审批流程</span>
  41. <span v-if="scope.row.actId === 120">出库审批流程</span>
  42. <span v-if="scope.row.actId === 130">货转审批流程</span>
  43. <span v-if="scope.row.actId === 140">调拨审批流程</span>
  44. <span v-if="scope.row.actId === 150">计算仓储费审批流程</span>
  45. <span v-if="scope.row.actId === 160">货物通关审批流程</span>
  46. <span v-if="scope.row.actId === 210">对账审批流程</span>
  47. <span v-if="scope.row.actId === 220">收费审批流程</span>
  48. <span v-if="scope.row.actId === 230">付费审批流程</span>
  49. <span v-if="scope.row.actId === 310">协议仓储费审批流程</span>
  50. <span v-if="scope.row.actId === 320">协议计划费审批流程</span>
  51. <span v-if="scope.row.actId === 410">下单审批流程</span>
  52. <span v-if="scope.row.actId === 420">配船审批流程</span>
  53. <span v-if="scope.row.actId === 430">凯和对账审批流程</span>
  54. <span v-if="scope.row.actId === 440">凯和收费审批流程</span>
  55. <span v-if="scope.row.actId === 450">凯和付费审批流程</span>
  56. <span v-if="scope.row.actId === 460">凯和费用审批流程</span>
  57. <span v-if="scope.row.actId === 470">凯和发票申请审批流程</span>
  58. <span v-if="scope.row.actId === 170">入库明细审批流程</span>
  59. <span v-if="scope.row.actId === 180">出库明细审批流程</span>
  60. <span v-if="scope.row.actId === 471">凯和商务端申请修改订单审批</span>
  61. <span v-if="scope.row.actId === 472">凯和商务端修改订单提交审批</span>
  62. <span v-if="scope.row.actId === 473">凯和商务端删除订单审批</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. prop="reviewConditions"
  67. header-align="center"
  68. align="center"
  69. width="250"
  70. label="审核条件">
  71. <template slot-scope="scope">
  72. <span v-if="scope.row.reviewConditions === 'O'">
  73. 正常流程
  74. </span>
  75. <span v-if="scope.row.reviewConditions === 'I'">
  76. 非正常流程
  77. </span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column
  81. prop="pathId"
  82. header-align="center"
  83. align="center"
  84. label="审核路径">
  85. <template slot-scope="scope">
  86. <el-select v-model="scope.row.pathId" placeholder="审核路径" filterable style="width: 100%">
  87. <el-option
  88. v-for="item in optionsPathIds"
  89. :key="item.id"
  90. :label="item.pathName"
  91. :value="item.id">
  92. </el-option>
  93. </el-select>
  94. </template>
  95. </el-table-column>
  96. </el-table>
  97. <pagination
  98. v-show="total>0"
  99. :total="total"
  100. :page.sync="dataForm.pageNum"
  101. :limit.sync="dataForm.pageSize"
  102. @pagination="getDataList"
  103. />
  104. </div>
  105. </template>
  106. <script>
  107. import {addCharge,preservation} from '@/api/system/auditConfiguration'
  108. export default {
  109. data () {
  110. return {
  111. dataForm: {
  112. branchId: this.$store.state.user.loginContractorId,
  113. actId: null,
  114. pageNum: 1,
  115. pageSize: 10,
  116. },
  117. total:0,
  118. dataList: [],
  119. optionsBranch: [],
  120. optionsPathIds: [],
  121. dataListLoading: false,
  122. loginContractorId: null,
  123. totalPage: 0,
  124. actList: [{
  125. name: '入库', actId: 110
  126. },{
  127. name: '出库', actId: 120
  128. },{
  129. name: '货转', actId: 130
  130. },{
  131. name: '调拨', actId: 140
  132. },{
  133. name: '计算仓储费', actId: 150
  134. },{
  135. name: '货物通关', actId: 160
  136. },
  137. {
  138. name: '对账', actId: 210
  139. },{
  140. name: '收费', actId: 220
  141. },{
  142. name: '付费', actId: 230
  143. },{
  144. name: '仓储费', actId: 310
  145. },{
  146. name: '计划费', actId: 320
  147. }
  148. ]
  149. }
  150. },
  151. activated () {
  152. // this.$http({
  153. // url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
  154. // method: 'post'
  155. // }).then(({data}) => {
  156. // this.loginContractorId = data.loginContractorId
  157. // this.$set(this.dataForm, 'branchId', data.loginContractorId)
  158. // })
  159. // this.$http({
  160. // url: this.$http.adornUrl('/engineering/bbranchs/selectBranchs'),
  161. // method: 'post',
  162. // data: ({postAddr: 'audit'})
  163. // }).then(({data}) => {
  164. // if (typeof data.list !== 'undefined' && data.list !== null) {
  165. // if (typeof data.list.branchs !== 'undefined' && data.list.branchs !== null) {
  166. // this.optionsBranch = data.list.branchs
  167. // }
  168. // }
  169. // })
  170. this.$nextTick(function () {
  171. this.getDataList()
  172. })
  173. },
  174. methods: {
  175. // 获取数据列表
  176. getDataList () {
  177. console.log(this.dataForm)
  178. addCharge(this.dataForm).then(data =>{
  179. console.log(data)
  180. this.dataList = data.auditPathAct
  181. this.optionsPathIds = data.auditPath
  182. this.total = data.count
  183. })
  184. },
  185. // 保存
  186. save () {
  187. let formData = new window.FormData()
  188. formData.append('auditPathsActs', JSON.stringify(this.dataList))
  189. preservation(formData).then(data =>{
  190. console.log(data)
  191. this.$message.success('保存成功');
  192. })
  193. },
  194. // 每页数
  195. sizeChangeHandle (val) {
  196. this.dataForm.size = val
  197. this.dataForm.current = 1
  198. this.getDataList()
  199. },
  200. // 当前页
  201. currentChangeHandle (val) {
  202. this.dataForm.current = val
  203. this.getDataList()
  204. },
  205. resetSearch () {
  206. this.dataForm.actId = null
  207. this.dataForm.current = 1
  208. this.dataForm.size = 10
  209. this.getDataList()
  210. }
  211. }
  212. }
  213. </script>