index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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. </template>
  61. </el-table-column>
  62. <el-table-column
  63. prop="reviewConditions"
  64. header-align="center"
  65. align="center"
  66. width="250"
  67. label="审核条件">
  68. <template slot-scope="scope">
  69. <span v-if="scope.row.reviewConditions === 'O'">
  70. 正常流程
  71. </span>
  72. <span v-if="scope.row.reviewConditions === 'I'">
  73. 非正常流程
  74. </span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column
  78. prop="pathId"
  79. header-align="center"
  80. align="center"
  81. label="审核路径">
  82. <template slot-scope="scope">
  83. <el-select v-model="scope.row.pathId" placeholder="审核路径" filterable style="width: 100%">
  84. <el-option
  85. v-for="item in optionsPathIds"
  86. :key="item.id"
  87. :label="item.pathName"
  88. :value="item.id">
  89. </el-option>
  90. </el-select>
  91. </template>
  92. </el-table-column>
  93. </el-table>
  94. <pagination
  95. v-show="total>0"
  96. :total="total"
  97. :page.sync="dataForm.pageNum"
  98. :limit.sync="dataForm.pageSize"
  99. @pagination="getDataList"
  100. />
  101. </div>
  102. </template>
  103. <script>
  104. import {addCharge,preservation} from '@/api/system/auditConfiguration'
  105. export default {
  106. data () {
  107. return {
  108. dataForm: {
  109. branchId: this.$store.state.user.loginContractorId,
  110. actId: null,
  111. pageNum: 1,
  112. pageSize: 10,
  113. },
  114. total:0,
  115. dataList: [],
  116. optionsBranch: [],
  117. optionsPathIds: [],
  118. dataListLoading: false,
  119. loginContractorId: null,
  120. totalPage: 0,
  121. actList: [{
  122. name: '入库', actId: 110
  123. },{
  124. name: '出库', actId: 120
  125. },{
  126. name: '货转', actId: 130
  127. },{
  128. name: '调拨', actId: 140
  129. },{
  130. name: '计算仓储费', actId: 150
  131. },{
  132. name: '货物通关', actId: 160
  133. },
  134. {
  135. name: '对账', actId: 210
  136. },{
  137. name: '收费', actId: 220
  138. },{
  139. name: '付费', actId: 230
  140. },{
  141. name: '仓储费', actId: 310
  142. },{
  143. name: '计划费', actId: 320
  144. }
  145. ]
  146. }
  147. },
  148. activated () {
  149. // this.$http({
  150. // url: this.$http.adornUrl('/sys/user/getLoginContractorId'),
  151. // method: 'post'
  152. // }).then(({data}) => {
  153. // this.loginContractorId = data.loginContractorId
  154. // this.$set(this.dataForm, 'branchId', data.loginContractorId)
  155. // })
  156. // this.$http({
  157. // url: this.$http.adornUrl('/engineering/bbranchs/selectBranchs'),
  158. // method: 'post',
  159. // data: ({postAddr: 'audit'})
  160. // }).then(({data}) => {
  161. // if (typeof data.list !== 'undefined' && data.list !== null) {
  162. // if (typeof data.list.branchs !== 'undefined' && data.list.branchs !== null) {
  163. // this.optionsBranch = data.list.branchs
  164. // }
  165. // }
  166. // })
  167. this.$nextTick(function () {
  168. this.getDataList()
  169. })
  170. },
  171. methods: {
  172. // 获取数据列表
  173. getDataList () {
  174. console.log(this.dataForm)
  175. addCharge(this.dataForm).then(data =>{
  176. console.log(data)
  177. this.dataList = data.auditPathAct
  178. this.optionsPathIds = data.auditPath
  179. this.total = data.count
  180. })
  181. },
  182. // 保存
  183. save () {
  184. let formData = new window.FormData()
  185. formData.append('auditPathsActs', JSON.stringify(this.dataList))
  186. preservation(formData).then(data =>{
  187. console.log(data)
  188. this.$message.success('保存成功');
  189. })
  190. },
  191. // 每页数
  192. sizeChangeHandle (val) {
  193. this.dataForm.size = val
  194. this.dataForm.current = 1
  195. this.getDataList()
  196. },
  197. // 当前页
  198. currentChangeHandle (val) {
  199. this.dataForm.current = val
  200. this.getDataList()
  201. },
  202. resetSearch () {
  203. this.dataForm.actId = null
  204. this.dataForm.current = 1
  205. this.dataForm.size = 10
  206. this.getDataList()
  207. }
  208. }
  209. }
  210. </script>