AuditDetail.vue 34 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. <!-- &lt;!&ndash; <span>{{ infoForm.apply.reason }}</span>&ndash;&gt;-->
  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. <!-- &lt;!&ndash; <span>{{ infoForm.apply.comment }}</span>&ndash;&gt;-->
  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. <!--&lt;!&ndash; <el-card shadow="always">&ndash;&gt;-->
  148. <!--&lt;!&ndash; <approval-form :trans-form="infoForm.auditForm.default" :is-view="true" />&ndash;&gt;-->
  149. <!--&lt;!&ndash; </el-card>&ndash;&gt;-->
  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. <!-- &lt;!&ndash;<span class="fr">{{ userAudit.auditedAt }}</span>&ndash;&gt;-->
  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 CustFormMain from '@/views/crm/custFormMain'-->
  256. <!--import Budgeting from '@/views/projectDashboard/components/morecom/budgeting'-->
  257. <!--import ProDistributionForm from '@/views/plan-2/proDistributionForm'-->
  258. <!--import Base from '@/views/base/base'-->
  259. <!--import BaseData from '@/views/base/baseData'-->
  260. <!--export default {-->
  261. <!-- name: 'AuditDetail',-->
  262. <!-- components: {-->
  263. <!-- ContractDetail, AccPay, TaskForm,-->
  264. <!-- CustFormMain,-->
  265. <!-- Budgeting,-->
  266. <!-- ProDistributionForm-->
  267. <!-- },-->
  268. <!-- mixins: [Base, BaseData],-->
  269. <!-- props: {-->
  270. <!-- auditId: {-->
  271. <!-- type: String,-->
  272. <!-- default: ''-->
  273. <!-- },-->
  274. <!-- isView: {-->
  275. <!-- type: Boolean,-->
  276. <!-- default: false-->
  277. <!-- }-->
  278. <!-- },-->
  279. <!-- data() {-->
  280. <!-- return {-->
  281. <!-- // 通用字典项-->
  282. <!-- dc_flow_status: Constant.dc_flow_status,-->
  283. <!-- AUDIT_TYPE: [],-->
  284. <!-- dc_map: {},-->
  285. <!-- // 业务相关-->
  286. <!-- currUserId: '',-->
  287. <!-- formType: '',-->
  288. <!-- UserData: [],-->
  289. <!-- fileUrlList: [],-->
  290. <!-- UserMap: {},-->
  291. <!-- activeName: 'first',-->
  292. <!-- infoForm: this.getBaseForm(),-->
  293. <!-- auditRules: {-->
  294. <!-- auditNextTo: [{ required: true, trigger: 'blur', message: '请输入下一步审批人' }],-->
  295. <!-- auditReason: [{ required: true, trigger: 'blur', message: '请输入审批意见' }]-->
  296. <!-- },-->
  297. <!-- proId: '',-->
  298. <!-- protype: '',-->
  299. <!-- taskFormKey: 0,-->
  300. <!-- dialogTaskTitle: '创建任务',-->
  301. <!-- dialogTaskVisible: false,-->
  302. <!-- dialogTitleFp: '项目分配',-->
  303. <!-- dialogVisibleFp: false,-->
  304. <!-- distKey: 0,-->
  305. <!-- taskInfo: {-->
  306. <!-- id: '',-->
  307. <!-- batchId: '',-->
  308. <!-- proId: '',-->
  309. <!-- proType: '',-->
  310. <!-- batchName: '',-->
  311. <!-- type: '1'-->
  312. <!-- },-->
  313. <!-- dialogVisible: false,-->
  314. <!-- dialogSqVisible: false,-->
  315. <!-- // 表单相关-->
  316. <!-- formTitle: '表单详情'-->
  317. <!-- }-->
  318. <!-- },-->
  319. <!-- watch: {-->
  320. <!-- auditId: {-->
  321. <!-- deep: true,-->
  322. <!-- handler(val) {-->
  323. <!-- this.getData(val)-->
  324. <!-- }-->
  325. <!-- }-->
  326. <!-- },-->
  327. <!-- mounted() {-->
  328. <!-- this.generateDcMap()-->
  329. <!-- this.$nextTick(() => {-->
  330. <!-- this.initValue()-->
  331. <!-- this.initUser().then(() => {-->
  332. <!-- this.getData(this.auditId)-->
  333. <!-- })-->
  334. <!-- })-->
  335. <!-- },-->
  336. <!-- methods: {-->
  337. <!-- initValue: function() {-->
  338. <!-- const currUser = this.$common.currUser()-->
  339. <!-- if (currUser) {-->
  340. <!-- this.currUserId = currUser.id-->
  341. <!-- }-->
  342. <!-- },-->
  343. <!-- getData: function(_auditId) {-->
  344. <!-- const _this = this-->
  345. <!-- this.infoForm = this.getBaseForm()-->
  346. <!-- const postData = {-->
  347. <!-- id: _auditId-->
  348. <!-- }-->
  349. <!-- _this.fileUrlList = []-->
  350. <!-- this.baseRequest('getById', postData).then((res) => {-->
  351. <!-- if (res.data) {-->
  352. <!-- const data = res.data-->
  353. <!-- _this.proId = data.referenceId-->
  354. <!-- // 审核的表单部分-->
  355. <!-- const referenceContent = _this.$common.castEval(data.referenceContent)-->
  356. <!-- if (referenceContent) {-->
  357. <!-- _this.infoForm.proName = referenceContent.proName-->
  358. <!-- _this.infoForm.cusName = referenceContent.cusName-->
  359. <!-- }-->
  360. <!-- if (data.auditType === Constant.AUDIT_TYPE.SIGN.key) {-->
  361. <!-- _this.formType = 'Contract'-->
  362. <!-- }-->
  363. <!-- _this.infoForm.auditType = _this.dc_map.AUDIT_TYPE[data.auditType]-->
  364. <!-- _this.infoForm.auditForm = _this.$common.castEval(data.auditForm)-->
  365. <!-- _this.infoForm.auditTarget = _this.$common.castEval(data.auditTarget)-->
  366. <!-- _this.protype = _this.infoForm.auditTarget.protypeId-->
  367. <!-- console.log('_this.infoForm.auditTarget.protype')-->
  368. <!-- console.log(_this.infoForm)-->
  369. <!-- _this.infoForm.auditedList = data.auditedList-->
  370. <!-- if (_this.infoForm.auditForm) {-->
  371. <!-- if (_this.infoForm.auditForm.default.formType === 'Contract') {-->
  372. <!-- _this.formTitle = '合同详情'-->
  373. <!-- } else if (_this.infoForm.auditForm.default.formType === 'AccPay') {-->
  374. <!-- _this.formTitle = '应付详情'-->
  375. <!-- } else if (_this.infoForm.auditForm.default.formType === 'RealApproval') {-->
  376. <!-- _this.infoForm.auditForm.default.referenceId = _this.infoForm.auditForm.default.proId-->
  377. <!-- _this.formTitle = '立项详情'-->
  378. <!-- } else if (_this.infoForm.auditForm.default.formType === 'Approve' || _this.infoForm.auditForm.default.formType === 'Prior') {-->
  379. <!-- _this.infoForm.auditForm.default.cusName = _this.infoForm.cusName-->
  380. <!-- _this.formTitle = '表单详情'-->
  381. <!-- } else {-->
  382. <!-- _this.formTitle = '表单详情'-->
  383. <!-- }-->
  384. <!-- }-->
  385. <!-- // 审核的通用部分-->
  386. <!-- const detailPostData = {-->
  387. <!-- auditId: _auditId-->
  388. <!-- }-->
  389. <!-- channel.globleRequest('FlowAuditDetailController', 'listAll', detailPostData, 'Audit Detail').then((res) => {-->
  390. <!-- if (res.data) {-->
  391. <!-- const detailList = res.data-->
  392. <!-- if (detailList.length > 0) {-->
  393. <!-- _this.infoForm.apply.reason = detailList[0].reason-->
  394. <!-- _this.infoForm.apply.comment = detailList[0].comment-->
  395. <!-- _this.infoForm.apply.auditedAt = _this.$common.transDate(detailList[0].createdAt, 'yyyy/MM/dd hh:mm')-->
  396. <!-- _this.infoForm.apply.auditedBy = _this.UserMap[detailList[0].auditedBy]-->
  397. <!-- if (detailList[0].auditFile) {-->
  398. <!-- _this.fileUrlList = JSON.parse(detailList[0].auditFile)-->
  399. <!-- console.log(_this.fileUrlList)-->
  400. <!-- }-->
  401. <!-- }-->
  402. <!-- detailList.forEach(function(item) {-->
  403. <!-- const detail = {-->
  404. <!-- auditedBy: item.auditedBy,-->
  405. <!-- auditedByName: _this.UserMap[item.auditedBy],-->
  406. <!-- auditedAt: _this.$common.transDate(item.createdAt, 'yyyy/MM/dd hh:mm'),-->
  407. <!-- reason: item.reason,-->
  408. <!-- comment: item.comment,-->
  409. <!-- result: item.auditResult,-->
  410. <!-- nextTo: item.nextTo ? _this.UserMap[item.nextTo] : ''-->
  411. <!-- }-->
  412. <!-- if (detail.result === '0') {-->
  413. <!-- detail.resultStr = '转交'-->
  414. <!-- } else if (detail.result === '1') {-->
  415. <!-- detail.resultStr = '通过'-->
  416. <!-- } else if (detail.result === '2') {-->
  417. <!-- detail.resultStr = '不通过'-->
  418. <!-- }-->
  419. <!-- _this.infoForm.auditList.push(detail)-->
  420. <!-- })-->
  421. <!-- }-->
  422. <!-- }).catch(() => {-->
  423. <!-- })-->
  424. <!-- }-->
  425. <!-- }).then(() => {-->
  426. <!-- this.$nextTick(() => {-->
  427. <!-- this.$refs.budgeting.initData()-->
  428. <!-- })-->
  429. <!-- }).catch(() => {-->
  430. <!-- })-->
  431. <!-- },-->
  432. <!-- handleClose: function() {-->
  433. <!-- this.$emit('handleAuditClose')-->
  434. <!-- },-->
  435. <!-- handleMessageClose: function() {-->
  436. <!-- this.dialogVisible = false-->
  437. <!-- },-->
  438. <!-- handleSqMessageClose: function() {-->
  439. <!-- this.dialogSqVisible = false-->
  440. <!-- },-->
  441. <!-- handleTaskClose: function() {-->
  442. <!-- this.dialogTaskVisible = false-->
  443. <!-- },-->
  444. <!-- handleFpClose: function() {-->
  445. <!-- this.dialogVisibleFp = false-->
  446. <!-- },-->
  447. <!-- handleTaskCommit: function() {-->
  448. <!-- this.dialogTaskVisible = false-->
  449. <!-- },-->
  450. <!-- handleFpCommit: function() {-->
  451. <!-- this.dialogVisibleFp = false-->
  452. <!-- this.dialogSqVisible = true-->
  453. <!-- },-->
  454. <!-- handleCreateTask: function() {-->
  455. <!-- this.taskFormKey++-->
  456. <!-- this.taskInfo.proId = this.proId-->
  457. <!-- this.taskInfo.proType = this.protype-->
  458. <!-- this.dialogVisible = false-->
  459. <!-- this.dialogSqVisible = false-->
  460. <!-- this.dialogTaskVisible = true-->
  461. <!-- },-->
  462. <!-- handleCommit: function() {-->
  463. <!-- if (this.infoForm.auditForm && this.infoForm.auditForm.default.formType == 'Approve') {-->
  464. <!-- if (this.infoForm.auditResult == '1') {-->
  465. <!-- this.dialogVisible = true-->
  466. <!-- }-->
  467. <!-- }-->
  468. <!-- this.handleCommit1()-->
  469. <!-- },-->
  470. <!-- handleCloseCommit: function() {-->
  471. <!-- this.dialogVisible = false-->
  472. <!-- this.distKey++-->
  473. <!-- this.dialogVisibleFp = true-->
  474. <!-- },-->
  475. <!-- handleCommit1: function() {-->
  476. <!-- const _this = this-->
  477. <!-- this.$refs.infoForm.validate(valid => {-->
  478. <!-- if (valid) {-->
  479. <!-- const auditData = {-->
  480. <!-- auditStatus: _this.infoForm.auditResult,-->
  481. <!-- auditedList: _this.infoForm.auditedList + ',' + _this.currUserId + ',',-->
  482. <!-- currAuditBy: _this.infoForm.auditResult === '0' ? _this.infoForm.auditNextTo : '',-->
  483. <!-- id: _this.auditId-->
  484. <!-- }-->
  485. <!-- const auditDetailData = {-->
  486. <!-- reason: _this.infoForm.auditReason,-->
  487. <!-- comment: _this.infoForm.auditComment,-->
  488. <!-- auditedBy: _this.currUserId,-->
  489. <!-- nextTo: _this.infoForm.auditNextTo,-->
  490. <!-- auditResult: _this.infoForm.auditResult,-->
  491. <!-- auditId: _this.auditId-->
  492. <!-- }-->
  493. <!-- _this.baseRequest('edit', auditData).then((res) => {-->
  494. <!-- if (res.data) {-->
  495. <!-- channel.globleRequest('FlowAuditDetailController', 'add', auditDetailData, 'audit detail')-->
  496. <!--debugger-->
  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. <!--&lt;!&ndash;<style scoped>&ndash;&gt;-->
  615. <!--&lt;!&ndash; .audit-card {&ndash;&gt;-->
  616. <!--&lt;!&ndash; width: 70%;&ndash;&gt;-->
  617. <!--&lt;!&ndash; }&ndash;&gt;-->
  618. <!--&lt;!&ndash; .self {&ndash;&gt;-->
  619. <!--&lt;!&ndash; /*background: #95ec69;*/&ndash;&gt;-->
  620. <!--&lt;!&ndash; background: #4e7ebf9c;&ndash;&gt;-->
  621. <!--&lt;!&ndash; color: white;&ndash;&gt;-->
  622. <!--&lt;!&ndash; }&ndash;&gt;-->
  623. <!--&lt;!&ndash; .title {&ndash;&gt;-->
  624. <!--&lt;!&ndash; line-height: 20px;&ndash;&gt;-->
  625. <!--&lt;!&ndash; }&ndash;&gt;-->
  626. <!--&lt;!&ndash; .comment{&ndash;&gt;-->
  627. <!--&lt;!&ndash; line-height: 24px;&ndash;&gt;-->
  628. <!--&lt;!&ndash; }&ndash;&gt;-->
  629. <!--&lt;!&ndash; .text {&ndash;&gt;-->
  630. <!--&lt;!&ndash; font-size: 14px;&ndash;&gt;-->
  631. <!--&lt;!&ndash; }&ndash;&gt;-->
  632. <!--&lt;!&ndash;</style>&ndash;&gt;-->
  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>-->