AuditDetail.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685
  1. <template>
  2. <div class="auditDetail" style="width: 100%;height: 100%;padding: 5px">
  3. <el-form ref="infoForm" :model="infoForm" style="width: 100%;padding: 5px" :rules="auditRules">
  4. <el-tabs v-model="activeName" type="border-card">
  5. <el-tab-pane label="申请详情" name="first">
  6. <el-row>
  7. <el-col style="padding-bottom: 10px">
  8. <span class="card_title">基本信息</span>
  9. <el-card shadow="always">
  10. <el-row>
  11. <el-col :span="3" class="col-txt"><span>储备项目名称</span></el-col>
  12. <el-col :span="8" class="col-words">
  13. <span>{{ infoForm.proName }}</span>
  14. </el-col>
  15. <el-col :span="4" class="col-txt"><span>客户名称</span></el-col>
  16. <el-col :span="8" class="col-words">
  17. <span>{{ infoForm.cusName }}</span>
  18. </el-col>
  19. </el-row>
  20. </el-card>
  21. </el-col>
  22. </el-row>
  23. <el-row>
  24. <el-col style="padding-bottom: 10px">
  25. <span class="card_title">申请内容</span>
  26. <el-card shadow="always">
  27. <el-row class="col-self">
  28. <el-col :span="3" class="col-txt"><span>流程来源</span></el-col>
  29. <el-col :span="20" class="col-input col-bg">
  30. <span>{{ infoForm.auditType }}</span>
  31. </el-col>
  32. </el-row>
  33. <el-row class="col-self">
  34. <el-col :span="3" class="col-txt"><span>申请理由</span></el-col>
  35. <el-col :span="20" class="col-input col-bg">
  36. <el-input v-model="infoForm.apply.reason" disabled type="textarea" :rows="2" />
  37. <!-- <span>{{ infoForm.apply.reason }}</span>-->
  38. </el-col>
  39. </el-row>
  40. <el-row class="col-self">
  41. <el-col :span="3" class="col-txt"><span>申请说明</span></el-col>
  42. <el-col :span="20" class="col-input col-bg">
  43. <el-input v-model=" infoForm.apply.comment " disabled type="textarea" :rows="2" />
  44. <!-- <span>{{ infoForm.apply.comment }}</span>-->
  45. </el-col>
  46. </el-row>
  47. <el-row class="col-self">
  48. <el-col :span="3" class="col-txt"><span>附件</span></el-col>
  49. <el-col :span="20" class="col-input col-bg">
  50. <div v-for="file in fileUrlList" :key="file.data">
  51. <a :href="file.url">{{ file.name }}</a>
  52. </div>
  53. </el-col>
  54. </el-row>
  55. <el-row class="col-self">
  56. <el-col :span="3" class="col-txt"><span>申请人</span></el-col>
  57. <el-col :span="10" class="col-input col-bg">
  58. <span>{{ infoForm.apply.auditedBy }}</span>
  59. </el-col>
  60. <el-col :span="5" class="col-txt"><span>申请时间</span></el-col>
  61. <el-col :span="5" class="col-input col-bg">
  62. <span>{{ infoForm.apply.auditedAt }}</span>
  63. </el-col>
  64. </el-row>
  65. </el-card>
  66. </el-col>
  67. </el-row>
  68. <el-row v-if="!isView">
  69. <el-col style="padding-bottom: 10px">
  70. <span class="card_title">申请审核</span>
  71. <el-card shadow="always">
  72. <el-row>
  73. <el-col :span="3" class="col-txt"><span>审核结果</span></el-col>
  74. <el-col :span="20" class="col-input">
  75. <el-form-item>
  76. <el-radio-group v-model="infoForm.auditResult" size="small" @change="updateReason">
  77. <el-radio-button label="0">转交</el-radio-button>
  78. <el-radio-button label="1">通过</el-radio-button>
  79. <el-radio-button label="2">不通过</el-radio-button>
  80. </el-radio-group>
  81. </el-form-item>
  82. </el-col>
  83. </el-row>
  84. <el-row v-if="infoForm.auditResult == '0'">
  85. <el-col :span="3" class="col-txt"><span>下一步审批人</span></el-col>
  86. <el-col :span="20" class="col-input">
  87. <el-form-item prop="auditNextTo">
  88. <el-select v-model="infoForm.auditNextTo" placeholder="下一步审批人">
  89. <el-option
  90. v-for="item in UserData"
  91. :key="item.value"
  92. :label="item.label"
  93. :value="item.value"
  94. />
  95. </el-select>
  96. </el-form-item>
  97. </el-col>
  98. </el-row>
  99. <el-row>
  100. <el-col :span="3" class="col-txt"><span>审核意见</span></el-col>
  101. <el-col :span="20" class="col-input">
  102. <el-form-item prop="auditReason">
  103. <el-input v-model="infoForm.auditReason" />
  104. </el-form-item>
  105. </el-col>
  106. </el-row>
  107. <el-row>
  108. <el-col :span="3" class="col-txt"><span>审核说明</span></el-col>
  109. <el-col :span="20" class="col-input">
  110. <el-form-item>
  111. <el-input v-model="infoForm.auditComment" class="conn" type="textarea" :rows="2" />
  112. </el-form-item>
  113. </el-col>
  114. </el-row>
  115. </el-card>
  116. </el-col>
  117. </el-row>
  118. </el-tab-pane>
  119. <el-tab-pane :label="formTitle" name="third">
  120. <el-row v-if="infoForm.auditForm && (infoForm.auditForm.default.formType == 'Approve'||infoForm.auditForm.default.formType == 'Prior')">
  121. <el-col style="padding-bottom: 10px">
  122. <span class="card_title">表单详情</span>
  123. <el-card shadow="always">
  124. <cust-form-main :cus-main="infoForm.auditForm.default" />
  125. </el-card>
  126. </el-col>
  127. </el-row>
  128. <el-row v-if="infoForm.auditForm && infoForm.auditForm.default.formType == 'Contract'">
  129. <el-col style="padding-bottom: 10px">
  130. <span class="card_title">合同内容</span>
  131. <el-card shadow="always">
  132. <contract-detail :trans-form="infoForm.auditForm.default" />
  133. </el-card>
  134. </el-col>
  135. </el-row>
  136. <el-row v-if="infoForm.auditForm && infoForm.auditForm.default.formType == 'AccPay'">
  137. <el-col style="padding-bottom: 10px">
  138. <span class="card_title">应付详情</span>
  139. <el-card shadow="always">
  140. <acc-pay :reference-id="infoForm.auditForm.default.id" step="view" />
  141. </el-card>
  142. </el-col>
  143. </el-row>
  144. <el-row v-if="infoForm.auditForm && infoForm.auditForm.default.formType == 'RealApproval'">
  145. <el-col style="padding-bottom: 10px">
  146. <span class="card_title">立项内容</span>
  147. <el-card shadow="always">
  148. <approval-form :trans-form="infoForm.auditForm.default" :is-view="true" />
  149. </el-card>
  150. </el-col>
  151. </el-row>
  152. <el-row v-if="infoForm.auditForm && infoForm.auditForm.default.formType == 'BudgetMaking'">
  153. <el-col style="padding-bottom: 10px">
  154. <span class="card_title">预算变更</span>
  155. <el-card shadow="always">
  156. <budgeting ref="budgeting" :pro-id="infoForm.auditForm.default.referenceId" :audit-data="infoForm.auditForm.default" :is-detail="true" :is-audit="'true'" />
  157. </el-card>
  158. </el-col>
  159. </el-row>
  160. </el-tab-pane>
  161. <el-tab-pane label="审批过程" name="second">
  162. <el-row v-for="userAudit in infoForm.auditList" style="margin-bottom: 10px">
  163. <el-col v-if="userAudit.auditedBy != currUserId" :span="3" class="col-txt">
  164. <span>{{ userAudit.auditedByName }}</span><br>
  165. <span class="f-tiny">{{ userAudit.auditedAt }}</span>
  166. </el-col>
  167. <el-col v-if="userAudit.auditedBy != currUserId" :span="20" class="col-input">
  168. <el-card class="audit-card">
  169. <div slot="header" class="text title">
  170. <span class="ftb">{{ userAudit.reason }}</span>
  171. <!--<span class="fr">{{ userAudit.auditedAt }}</span>-->
  172. </div>
  173. <div class="pr text comment">
  174. <div>
  175. <span class="ftb">{{ userAudit.comment }}</span>
  176. </div>
  177. <div class="fr f-small">
  178. <div>审批状态:{{ userAudit.resultStr }}</div>
  179. <div v-if="userAudit.result =='0'" class="p-gray">下一步审批人:{{ userAudit.nextTo }}</div>
  180. </div>
  181. </div>
  182. </el-card>
  183. </el-col>
  184. <el-col v-if="userAudit.auditedBy == currUserId" :span="20" class="col-txt">
  185. <el-card class="audit-card fr self">
  186. <div slot="header" class="text title">
  187. <span class="ftb">{{ userAudit.reason }}</span>
  188. </div>
  189. <div class="pr text comment">
  190. <div>
  191. <span class="ftb">{{ userAudit.comment }}</span>
  192. </div>
  193. <div class="fl f-small">
  194. <div>审批状态:{{ userAudit.resultStr }}</div>
  195. <div v-if="userAudit.result =='0'" class="p-lightgray">下一步审批人:{{ userAudit.nextTo }}</div>
  196. </div>
  197. </div>
  198. </el-card>
  199. </el-col>
  200. <el-col v-if="userAudit.auditedBy == currUserId" :span="3" class="col-input">
  201. <span>{{ userAudit.auditedByName }}(本人)</span><br>
  202. <span class="f-tiny">{{ userAudit.auditedAt }}</span>
  203. </el-col>
  204. </el-row>
  205. </el-tab-pane>
  206. </el-tabs>
  207. </el-form>
  208. <div class="el-dialog__footer">
  209. <el-button @click="handleClose()">取 消</el-button>
  210. <el-button v-if="!isView" type="primary" @click="handleCommit()">确 定</el-button>
  211. </div>
  212. <el-dialog
  213. title="消息"
  214. :visible.sync="dialogVisible"
  215. width="30%"
  216. :show-close="false"
  217. :close-on-click-modal="false"
  218. :close-on-press-escape="false"
  219. append-to-body
  220. :before-close="handleMessageClose"
  221. >
  222. <span>储备项目确认成功,请先分配售前负责人或项目经理!</span>
  223. <span slot="footer" class="dialog-footer">
  224. <el-button type="primary" @click="handleCloseCommit()">分配售前负责人或项目经理</el-button>
  225. </span>
  226. </el-dialog>
  227. <el-dialog
  228. title="消息"
  229. :visible.sync="dialogSqVisible"
  230. width="30%"
  231. :close-on-click-modal="false"
  232. :close-on-press-escape="false"
  233. append-to-body
  234. :before-close="handleSqMessageClose"
  235. >
  236. <span>售前负责人或项目经理已分配,继续指派任务吗?</span>
  237. <span slot="footer" class="dialog-footer">
  238. <el-button type="primary" @click="handleCreateTask()">创建售前任务</el-button>
  239. </span>
  240. </el-dialog>
  241. <el-dialog :title="dialogTaskTitle" :visible.sync="dialogTaskVisible" width="70%" top="50px" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body>
  242. <task-form :key="taskFormKey" :task-info="taskInfo" @handleClose="handleTaskClose" @handleCommit="handleTaskCommit" />
  243. </el-dialog>
  244. <el-dialog :title="dialogTitleFp" :visible.sync="dialogVisibleFp" width="70%" top="50px" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false" append-to-body>
  245. <pro-distribution-form :key="distKey" :pro-id="proId" @handleClose="handleFpClose" @handleCommit="handleFpCommit" />
  246. </el-dialog>
  247. </div>
  248. </template>
  249. <script>
  250. import channel from '../../../static/utils/channel'
  251. import Constant from '../../../static/utils/constant'
  252. import ContractDetail from '../../form/ctrForm'
  253. import AccPay from '../../form/apForm'
  254. import TaskForm from '@/views/task/taskForm'
  255. import ApprovalForm from '../../project/proApprovalForm'
  256. import CustFormMain from '@/views/crm/custFormMain'
  257. import Budgeting from '@/views/projectDashboard/components/morecom/budgeting'
  258. import ProDistributionForm from '@/views/plan-2/proDistributionForm'
  259. import Base from '@/views/base/base'
  260. import BaseData from '@/views/base/baseData'
  261. export default {
  262. name: 'AuditDetail',
  263. components: {
  264. ContractDetail, AccPay, TaskForm, ApprovalForm,
  265. CustFormMain,
  266. Budgeting,
  267. ProDistributionForm
  268. },
  269. mixins: [Base, BaseData],
  270. props: {
  271. auditId: {
  272. type: String,
  273. default: ''
  274. },
  275. isView: {
  276. type: Boolean,
  277. default: false
  278. }
  279. },
  280. data() {
  281. return {
  282. // 通用字典项
  283. dc_flow_status: Constant.dc_flow_status,
  284. AUDIT_TYPE: [],
  285. dc_map: {},
  286. // 业务相关
  287. currUserId: '',
  288. formType: '',
  289. UserData: [],
  290. fileUrlList: [],
  291. UserMap: {},
  292. activeName: 'first',
  293. infoForm: this.getBaseForm(),
  294. auditRules: {
  295. auditNextTo: [{ required: true, trigger: 'blur', message: '请输入下一步审批人' }],
  296. auditReason: [{ required: true, trigger: 'blur', message: '请输入审批意见' }]
  297. },
  298. proId: '',
  299. protype: '',
  300. taskFormKey: 0,
  301. dialogTaskTitle: '创建任务',
  302. dialogTaskVisible: false,
  303. dialogTitleFp: '项目分配',
  304. dialogVisibleFp: false,
  305. distKey: 0,
  306. taskInfo: {
  307. id: '',
  308. batchId: '',
  309. proId: '',
  310. proType: '',
  311. batchName: '',
  312. type: '1'
  313. },
  314. dialogVisible: false,
  315. dialogSqVisible: false,
  316. // 表单相关
  317. formTitle: '表单详情'
  318. }
  319. },
  320. watch: {
  321. auditId: {
  322. deep: true,
  323. handler(val) {
  324. this.getData(val)
  325. }
  326. }
  327. },
  328. mounted() {
  329. this.generateDcMap()
  330. this.$nextTick(() => {
  331. this.initValue()
  332. this.initUser().then(() => {
  333. this.getData(this.auditId)
  334. })
  335. })
  336. },
  337. methods: {
  338. initValue: function() {
  339. const currUser = this.$common.currUser()
  340. if (currUser) {
  341. this.currUserId = currUser.id
  342. }
  343. },
  344. getData: function(_auditId) {
  345. const _this = this
  346. this.infoForm = this.getBaseForm()
  347. const postData = {
  348. id: _auditId
  349. }
  350. _this.fileUrlList = []
  351. this.baseRequest('getById', postData).then((res) => {
  352. if (res.data) {
  353. const data = res.data
  354. _this.proId = data.referenceId
  355. // 审核的表单部分
  356. const referenceContent = _this.$common.castEval(data.referenceContent)
  357. if (referenceContent) {
  358. _this.infoForm.proName = referenceContent.proName
  359. _this.infoForm.cusName = referenceContent.cusName
  360. }
  361. if (data.auditType === Constant.AUDIT_TYPE.SIGN.key) {
  362. _this.formType = 'Contract'
  363. }
  364. _this.infoForm.auditType = _this.dc_map.AUDIT_TYPE[data.auditType]
  365. _this.infoForm.auditForm = _this.$common.castEval(data.auditForm)
  366. _this.infoForm.auditTarget = _this.$common.castEval(data.auditTarget)
  367. _this.protype = _this.infoForm.auditTarget.protypeId
  368. console.log('_this.infoForm.auditTarget.protype')
  369. console.log(_this.infoForm)
  370. _this.infoForm.auditedList = data.auditedList
  371. if (_this.infoForm.auditForm) {
  372. if (_this.infoForm.auditForm.default.formType === 'Contract') {
  373. _this.formTitle = '合同详情'
  374. } else if (_this.infoForm.auditForm.default.formType === 'AccPay') {
  375. _this.formTitle = '应付详情'
  376. } else if (_this.infoForm.auditForm.default.formType === 'RealApproval') {
  377. _this.infoForm.auditForm.default.referenceId = _this.infoForm.auditForm.default.proId
  378. _this.formTitle = '立项详情'
  379. } else if (_this.infoForm.auditForm.default.formType === 'Approve' || _this.infoForm.auditForm.default.formType === 'Prior') {
  380. _this.infoForm.auditForm.default.cusName = _this.infoForm.cusName
  381. _this.formTitle = '表单详情'
  382. } else {
  383. _this.formTitle = '表单详情'
  384. }
  385. }
  386. // 审核的通用部分
  387. const detailPostData = {
  388. auditId: _auditId
  389. }
  390. channel.globleRequest('FlowAuditDetailController', 'listAll', detailPostData, 'Audit Detail').then((res) => {
  391. if (res.data) {
  392. const detailList = res.data
  393. if (detailList.length > 0) {
  394. _this.infoForm.apply.reason = detailList[0].reason
  395. _this.infoForm.apply.comment = detailList[0].comment
  396. _this.infoForm.apply.auditedAt = _this.$common.transDate(detailList[0].createdAt, 'yyyy/MM/dd hh:mm')
  397. _this.infoForm.apply.auditedBy = _this.UserMap[detailList[0].auditedBy]
  398. if (detailList[0].auditFile) {
  399. _this.fileUrlList = JSON.parse(detailList[0].auditFile)
  400. console.log(_this.fileUrlList)
  401. }
  402. }
  403. detailList.forEach(function(item) {
  404. const detail = {
  405. auditedBy: item.auditedBy,
  406. auditedByName: _this.UserMap[item.auditedBy],
  407. auditedAt: _this.$common.transDate(item.createdAt, 'yyyy/MM/dd hh:mm'),
  408. reason: item.reason,
  409. comment: item.comment,
  410. result: item.auditResult,
  411. nextTo: item.nextTo ? _this.UserMap[item.nextTo] : ''
  412. }
  413. if (detail.result === '0') {
  414. detail.resultStr = '转交'
  415. } else if (detail.result === '1') {
  416. detail.resultStr = '通过'
  417. } else if (detail.result === '2') {
  418. detail.resultStr = '不通过'
  419. }
  420. _this.infoForm.auditList.push(detail)
  421. })
  422. }
  423. }).catch(() => {
  424. })
  425. }
  426. }).then(() => {
  427. this.$nextTick(() => {
  428. this.$refs.budgeting.initData()
  429. })
  430. }).catch(() => {
  431. })
  432. },
  433. handleClose: function() {
  434. this.$emit('handleAuditClose')
  435. },
  436. handleMessageClose: function() {
  437. this.dialogVisible = false
  438. },
  439. handleSqMessageClose: function() {
  440. this.dialogSqVisible = false
  441. },
  442. handleTaskClose: function() {
  443. this.dialogTaskVisible = false
  444. },
  445. handleFpClose: function() {
  446. this.dialogVisibleFp = false
  447. },
  448. handleTaskCommit: function() {
  449. this.dialogTaskVisible = false
  450. },
  451. handleFpCommit: function() {
  452. this.dialogVisibleFp = false
  453. this.dialogSqVisible = true
  454. },
  455. handleCreateTask: function() {
  456. this.taskFormKey++
  457. this.taskInfo.proId = this.proId
  458. this.taskInfo.proType = this.protype
  459. this.dialogVisible = false
  460. this.dialogSqVisible = false
  461. this.dialogTaskVisible = true
  462. },
  463. handleCommit: function() {
  464. if (this.infoForm.auditForm && this.infoForm.auditForm.default.formType == 'Approve') {
  465. if (this.infoForm.auditResult == '1') {
  466. this.dialogVisible = true
  467. }
  468. }
  469. this.handleCommit1()
  470. },
  471. handleCloseCommit: function() {
  472. this.dialogVisible = false
  473. this.distKey++
  474. this.dialogVisibleFp = true
  475. },
  476. handleCommit1: function() {
  477. const _this = this
  478. this.$refs.infoForm.validate(valid => {
  479. if (valid) {
  480. const auditData = {
  481. auditStatus: _this.infoForm.auditResult,
  482. auditedList: _this.infoForm.auditedList + ',' + _this.currUserId + ',',
  483. currAuditBy: _this.infoForm.auditResult === '0' ? _this.infoForm.auditNextTo : '',
  484. id: _this.auditId
  485. }
  486. const auditDetailData = {
  487. reason: _this.infoForm.auditReason,
  488. comment: _this.infoForm.auditComment,
  489. auditedBy: _this.currUserId,
  490. nextTo: _this.infoForm.auditNextTo,
  491. auditResult: _this.infoForm.auditResult,
  492. auditId: _this.auditId
  493. }
  494. _this.baseRequest('edit', auditData).then((res) => {
  495. if (res.data) {
  496. channel.globleRequest('FlowAuditDetailController', 'add', auditDetailData, 'audit detail')
  497. if (_this.infoForm.auditResult !== '0') {
  498. // @FIXME 审核目标的更新,如果没有审核目标则略过
  499. const target = _this.infoForm.auditTarget
  500. if (target) {
  501. let targetData = target.passData
  502. if (_this.infoForm.auditResult === '2') {
  503. targetData = target.refuseData
  504. }
  505. if (targetData.validat) {
  506. targetData.validat = _this.$common.transServDate(new Date())
  507. } else if (targetData.signat) {
  508. targetData.signat = _this.$common.transServDate(new Date())
  509. } else if (targetData.bidat) {
  510. targetData.bidat = _this.$common.transServDate(new Date())
  511. } else if (targetData.endingat) {
  512. targetData.endingat = _this.$common.transServDate(new Date())
  513. } else if (targetData.realValidAt) {
  514. targetData.realValidAt = _this.$common.transServDate(new Date())
  515. }
  516. console.log('update target:', targetData)
  517. channel.globleRequest(target.target, target.op, targetData, target.target)
  518. }
  519. if (_this.infoForm.auditResult === '1') {
  520. const form = _this.infoForm.auditForm
  521. if (form.default.opUpdate && form.default.updateData) {
  522. const defaultForm = form.default
  523. // @Todo 这里以Contract/AccPay之类的标准表单作了类定制化,后期需再进行调整
  524. channel.globleRequest(defaultForm.controller, defaultForm.opQuery, '', defaultForm.controller).then((res) => {
  525. if (res.data) {
  526. const updateData = defaultForm.updateData
  527. updateData.id = res.data.id
  528. channel.globleRequest(defaultForm.controller, defaultForm.opUpdate, updateData, defaultForm.controller)
  529. }
  530. })
  531. }
  532. }
  533. }
  534. }
  535. console.log(this.infoForm)
  536. _this.$emit('handleAuditCommit')
  537. }).catch(() => {
  538. })
  539. } else {
  540. console.log('error submit!!')
  541. return false
  542. }
  543. })
  544. },
  545. getBaseForm: function() {
  546. const form = {
  547. proName: '',
  548. cusName: '',
  549. auditType: '',
  550. auditedList: '',
  551. apply: {
  552. reason: '',
  553. comment: '',
  554. auditedBy: '',
  555. auditedAt: ''
  556. },
  557. auditForm: null,
  558. auditTarget: null,
  559. auditResult: '1',
  560. auditReason: '同意',
  561. auditComment: '',
  562. auditNextTo: '',
  563. auditList: []
  564. }
  565. return form
  566. },
  567. updateReason: function(val) {
  568. if (val === '0') {
  569. this.infoForm.auditReason = '转交'
  570. } else if (val === '1') {
  571. this.infoForm.auditReason = '同意'
  572. } else if (val === '2') {
  573. this.infoForm.auditReason = '不同意'
  574. }
  575. },
  576. // /* 辅助相关*/
  577. // initUser: function() {
  578. // const _this = this
  579. // this.UserData = []
  580. // this.UserMap = {}
  581. //
  582. // return channel.globleRequest('SysUserExtendController', 'listAll', '', 'Pending Audit get user').then((res) => {
  583. // if (res.data) {
  584. // res.data.forEach(function(item) {
  585. // const json = {
  586. // label: item.truename,
  587. // value: item.id
  588. // }
  589. // _this.UserData.push(json)
  590. // _this.UserMap[json.value] = json.label
  591. // })
  592. // }
  593. // }).catch(() => {
  594. // })
  595. // },
  596. generateDcMap: function() {
  597. this.AUDIT_TYPE = []
  598. for (const key in Constant.AUDIT_TYPE) {
  599. const json = {
  600. label: Constant.AUDIT_TYPE[key].name,
  601. value: Constant.AUDIT_TYPE[key].key
  602. }
  603. this.AUDIT_TYPE.push(json)
  604. }
  605. this.dc_map['dc_flow_status'] = this.$common.transDcMap(Constant.dc_flow_status)
  606. this.dc_map['AUDIT_TYPE'] = this.$common.transDcMap(this.AUDIT_TYPE)
  607. },
  608. baseRequest(opUrl, postData) {
  609. return channel.globleRequest('FlowAuditController', opUrl, postData, 'audit')
  610. }
  611. }
  612. }
  613. </script>
  614. <!--<style scoped>-->
  615. <!-- .audit-card {-->
  616. <!-- width: 70%;-->
  617. <!-- }-->
  618. <!-- .self {-->
  619. <!-- /*background: #95ec69;*/-->
  620. <!-- background: #4e7ebf9c;-->
  621. <!-- color: white;-->
  622. <!-- }-->
  623. <!-- .title {-->
  624. <!-- line-height: 20px;-->
  625. <!-- }-->
  626. <!-- .comment{-->
  627. <!-- line-height: 24px;-->
  628. <!-- }-->
  629. <!-- .text {-->
  630. <!-- font-size: 14px;-->
  631. <!-- }-->
  632. <!--</style>-->
  633. <style lang="scss">
  634. .auditDetail{
  635. .el-textarea__inner{
  636. border-color: rgba(0,0,0,0) !important;
  637. }
  638. .conn .el-textarea__inner{
  639. border-color: #C0C4CC !important;
  640. }
  641. .audit-card {
  642. width: 70%;
  643. }
  644. .self {
  645. /*background: #95ec69;*/
  646. background: #4e7ebf9c;
  647. color: white;
  648. }
  649. .title {
  650. line-height: 20px;
  651. }
  652. .comment{
  653. line-height: 24px;
  654. }
  655. .text {
  656. font-size: 14px;
  657. }
  658. }
  659. .el-card__header {
  660. padding: 10px 20px;
  661. }
  662. .el-card__body {
  663. padding: 10px 20px;
  664. }
  665. .ftb{
  666. word-wrap: break-word;
  667. word-break: break-all;
  668. white-space: pre-wrap !important;
  669. //text-align: left;
  670. }
  671. </style>