index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <template>
  2. <view class="objectives-add">
  3. <view class="message">
  4. <uv-text
  5. type="error"
  6. text="本系统中的年度服务目标、【年度服务预算】、年度服务计划等,无论是否经由一方或双方同意或者确认,均不构成双方之间的协议;服务量、服务费用价格与金额等应以另行签署的合同为准。"
  7. ></uv-text>
  8. </view>
  9. <view class="form">
  10. <uv-form labelPosition="left" :model="form" :rules="rules" ref="formRef" labelWidth="80">
  11. <uv-form-item
  12. label="目标产品"
  13. prop="skuIdLable"
  14. borderBottom
  15. @click="showSelect('skuId')"
  16. :customStyle="customStyle"
  17. required
  18. >
  19. <uv-input v-model="form.skuIdLable" border="none" placeholder="请选择" readonly />
  20. <template v-slot:right>
  21. <uv-icon name="arrow-right"></uv-icon>
  22. </template>
  23. </uv-form-item>
  24. <uv-form-item label="生产企业" prop="ent_name" borderBottom :customStyle="customStyle">
  25. <uv-input v-model="form.ent_name" border="none" readonly />
  26. </uv-form-item>
  27. <uv-form-item
  28. label="目标总值"
  29. prop="planScore"
  30. borderBottom
  31. :customStyle="customStyle"
  32. required
  33. >
  34. <uv-input v-model="form.planScore" :readonly="formDisabled" type="number" border="none" />
  35. </uv-form-item>
  36. <uv-form-item
  37. label="承接对象"
  38. prop="consigneeIdLable"
  39. borderBottom
  40. @click="showSelect('consigneeId')"
  41. :customStyle="customStyle"
  42. required
  43. >
  44. <uv-input v-model="form.consigneeIdLable" border="none" placeholder="请选择" readonly />
  45. <template v-slot:right>
  46. <uv-icon name="arrow-right"></uv-icon>
  47. </template>
  48. </uv-form-item>
  49. <uv-form-item
  50. label="目标类型"
  51. prop="planTypeLable"
  52. borderBottom
  53. @click="showSelect('planType')"
  54. :customStyle="customStyle"
  55. required
  56. >
  57. <uv-input v-model="form.planTypeLable" border="none" placeholder="请选择" readonly />
  58. <template v-slot:right>
  59. <uv-icon name="arrow-right"></uv-icon>
  60. </template>
  61. </uv-form-item>
  62. <uv-form-item
  63. label="目标周期"
  64. prop="monthrange"
  65. borderBottom
  66. @click="showSelect('monthrange')"
  67. :customStyle="customStyle"
  68. required
  69. >
  70. <uv-input
  71. prefixIcon="calendar"
  72. prefixIconStyle="font-size: 22px;color: #909399"
  73. v-model="form.monthrange"
  74. border="none"
  75. placeholder="请选择"
  76. readonly
  77. />
  78. <template v-slot:right>
  79. <uv-icon name="arrow-right"></uv-icon>
  80. </template>
  81. </uv-form-item>
  82. <uv-form-item
  83. label="目标名称"
  84. prop="planName"
  85. borderBottom
  86. :customStyle="customStyle"
  87. required
  88. >
  89. <uv-input
  90. v-model="form.planName"
  91. :readonly="formDisabled"
  92. placeholder="请输入"
  93. border="none"
  94. />
  95. </uv-form-item>
  96. </uv-form>
  97. <view class="avail-score" v-if="type === '3'">
  98. 剩余积分值:{{ detailInfo?.availScore }}
  99. </view>
  100. </view>
  101. <view class="table" v-if="['5', '6', '7'].includes(type)">
  102. <tableData v-if="type === '5'" ref="tableRef" :planScore="Number(form.planScore)" />
  103. <tableDetail
  104. v-if="['6', '7'].includes(type)"
  105. :planScore="Number(form.planScore)"
  106. ref="tableDetailRef"
  107. />
  108. </view>
  109. <!-- 新增 -->
  110. <!-- 1 新增 3 -->
  111. <template v-if="['1', '3', '5'].includes(type)">
  112. <view class="btn botton-content" :class="['1', '3'].includes(type) ? 'b-fixed' : ''">
  113. <view class="cancel" @click="cancelFn">取消</view>
  114. <view class="confirm" @click="confirmFn">确定</view>
  115. </view>
  116. </template>
  117. <template v-if="['2', '4', '7'].includes(type)">
  118. <view class="botton-content" :class="['2', '4'].includes(type) ? 'b-fixed' : ''">
  119. <view class="review-form">
  120. <uv-form
  121. labelPosition="left"
  122. :model="reviewForm"
  123. :rules="reviewFormRules"
  124. ref="reviewFormRef"
  125. labelWidth="80"
  126. >
  127. <uv-form-item label="审核说明" prop="msg" borderBottom>
  128. <uv-textarea
  129. v-model="reviewForm.msg"
  130. placeholder="请输入审核说明"
  131. height="48"
  132. ></uv-textarea>
  133. </uv-form-item>
  134. </uv-form>
  135. </view>
  136. <view class="btn">
  137. <view class="cancel" @click="reviewFn(false)">拒绝</view>
  138. <view class="confirm" @click="reviewFn(true)">通过</view>
  139. </view>
  140. </view>
  141. </template>
  142. <!-- 选择目标产品 -->
  143. <uv-picker ref="skuIdPicker" :columns="drugList" keyName="drug_name" @confirm="skuIdConfirm" />
  144. <!-- 选择承接对象 -->
  145. <uv-picker
  146. ref="consigneeIdPicker"
  147. :columns="csoList"
  148. keyName="name"
  149. @confirm="consigneeIdConfirm"
  150. />
  151. <!-- 选择目标类型 -->
  152. <uv-picker
  153. ref="planTypePicker"
  154. :columns="[planTypeList]"
  155. keyName="label"
  156. @confirm="planTypeConfirm"
  157. />
  158. <!-- 选择年份 -->
  159. <uv-datetime-picker ref="yearPicker" mode="year" @confirm="yearConfirm"></uv-datetime-picker>
  160. <!-- 选择季度 -->
  161. <uv-picker ref="seasonPicker" :columns="seasonList" keyName="label" @confirm="seasonConfirm" />
  162. <!-- 月份范围 -->
  163. <KDatePicker
  164. v-model="show"
  165. :limitStartDate="limitStartDate"
  166. :limitEndDate="limitEndDate"
  167. type="month"
  168. is-range
  169. @change="getDate"
  170. formatter="YYYY-MM-DD"
  171. />
  172. </view>
  173. </template>
  174. <script setup lang="ts">
  175. import {
  176. getListDrugApi,
  177. getListDescendant,
  178. createListApi,
  179. planCheckApi,
  180. getPlanInfoApi,
  181. planDetailCreateApi,
  182. checkPlanDetailsApi,
  183. updatePlanApi
  184. } from '@/service/modules/objectivesList'
  185. import { onLoad } from '@dcloudio/uni-app'
  186. import { reactive, ref } from 'vue'
  187. import KDatePicker from '@/components/dateSelect/k-date-picker/KDatePicker.vue'
  188. import tableData from '@/components/table/tableData.vue'
  189. import tableDetail from '@/components/table/tableDetail.vue'
  190. import dayjs from 'dayjs'
  191. const drugList = ref<any[]>([])
  192. const csoList = ref<any[]>([])
  193. const getDict = () => {
  194. getListDrugApi().then((res: any) => (drugList.value = [res.data]))
  195. getListDescendant().then((res: any) => (csoList.value = [res.data]))
  196. }
  197. const type = ref('')
  198. const planId = ref('')
  199. const formDisabled = ref(false)
  200. const distributeDisbled = ref(false)
  201. const btnType = ref('')
  202. onLoad(async (info: any) => {
  203. type.value = info?.type
  204. planId.value = info?.planId
  205. btnType.value = info?.btnType
  206. await getDict()
  207. // 审核
  208. if (info?.type === '2') {
  209. formDisabled.value = true
  210. uni.setNavigationBarTitle({
  211. title: '审核'
  212. })
  213. planInfo()
  214. }
  215. if (info?.type === '3') {
  216. distributeDisbled.value = true
  217. uni.setNavigationBarTitle({
  218. title: '分发-新增'
  219. })
  220. planInfo()
  221. }
  222. if (info?.type === '4') {
  223. formDisabled.value = true
  224. uni.setNavigationBarTitle({
  225. title: '分发-审核'
  226. })
  227. planInfo()
  228. }
  229. if (info?.type === '5') {
  230. formDisabled.value = true
  231. uni.setNavigationBarTitle({
  232. title: '拆解'
  233. })
  234. planInfo()
  235. }
  236. if (info?.type === '6') {
  237. formDisabled.value = true
  238. uni.setNavigationBarTitle({
  239. title: '数据统计'
  240. })
  241. planInfo()
  242. }
  243. if (info?.type === '7') {
  244. formDisabled.value = true
  245. uni.setNavigationBarTitle({
  246. title: '拆解审核'
  247. })
  248. planInfo()
  249. }
  250. if (info?.btnType === '1') {
  251. uni.setNavigationBarTitle({
  252. title: '编辑'
  253. })
  254. planInfo()
  255. }
  256. })
  257. const detailInfo = ref()
  258. const limitStartDate = ref()
  259. const limitEndDate = ref()
  260. const tableDetailRef = ref()
  261. const detailsState = ref()
  262. const planInfo = async () => {
  263. const res = await getPlanInfoApi(planId.value)
  264. detailInfo.value = res.data
  265. if (btnType?.value === '1') {
  266. return setInfo()
  267. }
  268. const typeList = ['2', '4', '5', '6', '7']
  269. if (typeList.includes(type.value)) {
  270. setFormCommonFields(res.data)
  271. form.value.planName = res.data.planName
  272. form.value.consigneeIdLable = res.data.consigneeInfo.consigneeName
  273. form.value.planScore = res.data.planScore + ''
  274. } else if (type.value === '3') {
  275. setFormCommonFields(res.data)
  276. form.value.skuId = res.data.skuId
  277. form.value.planIssue = res.data.planIssue
  278. form.value.planExpiry = res.data.planExpiry
  279. }
  280. if (['6', '7'].includes(type.value)) {
  281. setTimeout(async () => {
  282. const resDetail = await tableDetailRef.value.getDetail(res.data?.planDetails?.detailsId)
  283. detailsState.value = resDetail.data.detailsState
  284. }, 500)
  285. }
  286. }
  287. const setInfo = () => {
  288. const data = detailInfo.value
  289. if (type.value === '3') {
  290. if (data.planState === 'INIT') {
  291. detailInfo.value.availScore = data?.parentPlanAvailScore + data.availScore
  292. } else {
  293. detailInfo.value.availScore = data?.parentPlanAvailScore
  294. }
  295. }
  296. setFormCommonFields(data)
  297. form.value.planName = data.planName
  298. form.value.parentId = data.parentId
  299. form.value.locFlag = data.locFlag
  300. form.value.consigneeId = data.consigneeId
  301. form.value.consigneeIdLable = data.consigneeInfo.consigneeName
  302. if (data.planType === 'ANN') {
  303. const arr = data.planIssue.split('-')
  304. form.value.monthrange = arr[0]
  305. } else {
  306. form.value.monthrange = convertToQuarterStart(data.planIssue)
  307. }
  308. form.value.planIssue = data.skuInfo.planIssue
  309. form.value.planExpiry = data.skuInfo.planExpiry
  310. form.value.planScore = data.planScore + ''
  311. formRef.value.validateField('planScore')
  312. }
  313. const setFormCommonFields = (data: any) => {
  314. form.value.planType = data.planType
  315. const curr = planTypeList.find((item) => item.value === data.planType)
  316. if (curr) form.value.planTypeLable = curr.label
  317. form.value.skuIdLable = data.skuInfo.skuName
  318. form.value.ent_name = data.skuInfo.manufacturer
  319. form.value.monthrange = data.planIssue + '至' + data.planExpiry
  320. form.value.planType = data.planType
  321. }
  322. function convertToQuarterStart(dateString: string) {
  323. const date = new Date(dateString)
  324. const year = date.getFullYear()
  325. const month = date.getMonth() // 0 为 1 月,11 为 12 月
  326. let quarterStartMonth
  327. if (month >= 0 && month <= 2) {
  328. quarterStartMonth = '第一' // Q1: 1月
  329. } else if (month >= 3 && month <= 5) {
  330. quarterStartMonth = '第二' // Q2: 4月
  331. } else if (month >= 6 && month <= 8) {
  332. quarterStartMonth = '第三' // Q3: 7月
  333. } else {
  334. quarterStartMonth = '第四' // Q4: 10月
  335. }
  336. return `${year}年${quarterStartMonth}季度`
  337. }
  338. const customStyle = {
  339. height: '80rpx'
  340. }
  341. const formRef = ref()
  342. const form = ref({
  343. planType: '',
  344. planTypeLable: '',
  345. parentId: 0,
  346. locFlag: 'UN_LOCK',
  347. skuId: '',
  348. skuIdLable: '',
  349. planName: '',
  350. consigneeId: '',
  351. consigneeIdLable: '',
  352. ent_name: '',
  353. monthrange: '',
  354. planIssue: '',
  355. planExpiry: '',
  356. planScore: ''
  357. })
  358. const rules = reactive({
  359. skuIdLable: {
  360. type: 'string',
  361. required: true,
  362. message: '请选择目标产品',
  363. trigger: ['blur', 'change']
  364. },
  365. planName: {
  366. type: 'string',
  367. required: true,
  368. message: '请输入目标名称',
  369. trigger: ['blur', 'change']
  370. },
  371. consigneeIdLable: {
  372. type: 'string',
  373. required: true,
  374. message: '请选择承接对象',
  375. trigger: ['blur', 'change']
  376. },
  377. planTypeLable: {
  378. type: 'string',
  379. required: true,
  380. message: '请选择目标周期',
  381. trigger: ['blur', 'change']
  382. },
  383. monthrange: {
  384. type: 'string',
  385. required: true,
  386. message: '请选择目标周期',
  387. trigger: ['blur', 'change']
  388. },
  389. planScore: {
  390. type: 'string',
  391. required: true,
  392. message: '请输入目标总值',
  393. trigger: ['blur', 'change']
  394. }
  395. })
  396. const skuIdPicker = ref()
  397. const consigneeIdPicker = ref()
  398. const planTypePicker = ref()
  399. const planTypeList = [
  400. {
  401. label: '年度计划',
  402. value: 'ANN'
  403. },
  404. {
  405. label: '季度计划',
  406. value: 'QRT'
  407. }
  408. ]
  409. const show = ref(false)
  410. const yearPicker = ref()
  411. const seasonPicker = ref()
  412. const seasonList = ref()
  413. const showSelect = (detailType: string) => {
  414. if (formDisabled.value) return
  415. if (detailType === 'skuId') {
  416. if (type.value === '3') return
  417. skuIdPicker.value.open()
  418. } else if (detailType === 'consigneeId') {
  419. consigneeIdPicker.value.open()
  420. } else if (detailType === 'planType') {
  421. if (type.value === '3') return
  422. planTypePicker.value.open()
  423. } else if (detailType === 'monthrange') {
  424. if (type.value === '3') return
  425. if (!form.value.planTypeLable) return
  426. if (form.value.planType === 'ANN') {
  427. yearPicker.value.open()
  428. } else if (form.value.planType === 'QRT') {
  429. let arr = []
  430. let years = new Date().getFullYear()
  431. for (let i = years - 10; i <= years + 20; i++) {
  432. arr.push(i)
  433. }
  434. const seasonArr = ['一季度', '二季度', '三季度', '四季度']
  435. seasonList.value = [arr, seasonArr]
  436. seasonPicker.value.open()
  437. }
  438. }
  439. }
  440. const skuIdConfirm = (e: any) => {
  441. const value = e.value[0]
  442. form.value.skuId = value.drug_id
  443. form.value.skuIdLable = value.drug_name
  444. form.value.ent_name = value.ent_name
  445. formRef.value.validateField('skuIdLable')
  446. planNameChange()
  447. }
  448. const consigneeIdConfirm = (e: any) => {
  449. const value = e.value[0]
  450. form.value.consigneeId = value.deptId
  451. form.value.consigneeIdLable = value.name
  452. formRef.value.validateField('consigneeIdLable')
  453. if (type.value === '3') {
  454. const name = detailInfo.value.planName + '-' + value.name
  455. form.value.planName = name
  456. } else {
  457. planNameChange()
  458. }
  459. }
  460. const planTypeConfirm = (e: any) => {
  461. if (form.value?.planType === e.value[0]) return
  462. const value = e.value[0]
  463. form.value.planType = value.value
  464. form.value.planTypeLable = value.label
  465. formRef.value.validateField('planTypeLable')
  466. // 清空目标周期
  467. form.value.planIssue = ''
  468. form.value.planExpiry = ''
  469. form.value.monthrange = ''
  470. }
  471. const getDate = (e: string[]) => {
  472. form.value.monthrange = e[0] + ' 至 ' + e[1]
  473. form.value.planIssue = e[0]
  474. form.value.planExpiry = e[1]
  475. formRef.value.validateField('monthrange')
  476. show.value = false
  477. }
  478. const yearConfirm = (e: any) => {
  479. const year = dayjs(e.value).format('YYYY')
  480. form.value.monthrange = year
  481. form.value.planIssue = year + '-01-01'
  482. form.value.planExpiry = year + '-12-31'
  483. formRef.value.validateField('monthrange')
  484. planNameChange()
  485. }
  486. const seasonConfirm = (e: any) => {
  487. console.log('e', e)
  488. const seasonIndex = e.indexs[1]
  489. const value = e.value
  490. form.value.monthrange = value[0] + '年第' + value[1]
  491. let startMonth, endMonth, endDay, text
  492. switch (seasonIndex) {
  493. case 1: // Q1
  494. startMonth = 1
  495. endMonth = 3
  496. endDay = 31
  497. text = '第一'
  498. break
  499. case 2: // Q2
  500. startMonth = 4
  501. endMonth = 6
  502. endDay = 30
  503. text = '第二'
  504. break
  505. case 3: // Q3
  506. startMonth = 7
  507. endMonth = 9
  508. endDay = 30
  509. text = '第三'
  510. break
  511. case 4: // Q4
  512. startMonth = 10
  513. endMonth = 12
  514. endDay = 31
  515. text = '第四'
  516. break
  517. default:
  518. throw new Error('Invalid quarter code')
  519. }
  520. const startDate = `${value[0]}-${String(startMonth).padStart(2, '0')}-01`
  521. const endDate = `${value[0]}-${String(endMonth).padStart(2, '0')}-${endDay}`
  522. form.value.planIssue = startDate
  523. form.value.planExpiry = endDate
  524. formRef.value.validateField('monthrange')
  525. planNameChange()
  526. }
  527. const planNameChange = () => {
  528. if (
  529. form.value.skuIdLable &&
  530. form.value.consigneeIdLable &&
  531. form.value.planTypeLable &&
  532. form.value.monthrange
  533. ) {
  534. let name = ''
  535. if (form.value.planType === 'ANN') {
  536. name = `${form.value.monthrange}年度-全年-${form.value.consigneeIdLable}-${form.value.skuIdLable}`
  537. } else {
  538. const arr = form.value.monthrange.split('年')
  539. name = `${arr[0]}年度-${arr[1]}-${form.value.consigneeIdLable}-${form.value.skuIdLable}`
  540. }
  541. form.value.planName = name
  542. }
  543. }
  544. const cancelFn = () => {
  545. uni.navigateBack()
  546. }
  547. const confirmFn = () => {
  548. if (type.value === '5') {
  549. dismantleSubmit()
  550. return
  551. }
  552. formRef.value
  553. .validate()
  554. .then(async () => {
  555. let res
  556. if (type.value === '3') {
  557. form.value.parentId = detailInfo.value.planId
  558. if (form.value.planScore > detailInfo.value?.availScore) {
  559. return uni.showToast({
  560. title: '当前分发目标总值不能超过剩余积分值!',
  561. icon: 'none'
  562. })
  563. }
  564. }
  565. // 编辑 走编辑操作
  566. if (btnType.value === '1') {
  567. return submitEdit()
  568. }
  569. res = await createListApi(form.value)
  570. if (res.data) {
  571. uni.showToast({
  572. title: '添加成功',
  573. icon: 'none'
  574. })
  575. setTimeout(() => {
  576. uni.navigateBack()
  577. }, 1000)
  578. }
  579. })
  580. .catch((err: any) => {
  581. console.log('err', err)
  582. })
  583. }
  584. const submitEdit = async () => {
  585. const obj = Object.assign(form.value, {
  586. planId: detailInfo.value.planId
  587. })
  588. const res = await updatePlanApi(obj)
  589. if (res.data) {
  590. uni.showToast({
  591. title: '更新成功',
  592. icon: 'none'
  593. })
  594. setTimeout(() => {
  595. uni.navigateBack()
  596. }, 1000)
  597. }
  598. }
  599. // 审核相关
  600. const reviewFormRef = ref()
  601. const reviewForm = reactive({
  602. msg: ''
  603. })
  604. const reviewFormRules = reactive({
  605. msg: {
  606. type: 'string',
  607. required: false,
  608. message: '请输入审核说明',
  609. trigger: ['blur', 'change']
  610. }
  611. })
  612. const reviewFn = (flag: boolean) => {
  613. reviewFormRules.msg.required = !flag
  614. reviewFormRef.value
  615. .validate()
  616. .then(async () => {
  617. if (type.value === '7') {
  618. dismantleReviewSubmt(flag)
  619. return
  620. }
  621. const obj = {
  622. msg: reviewForm.msg,
  623. planId: detailInfo.value.planId,
  624. result: flag
  625. }
  626. const res = await planCheckApi(obj)
  627. if (res.data) {
  628. uni.showToast({
  629. title: '审核完成',
  630. icon: 'none'
  631. })
  632. setTimeout(() => {
  633. uni.navigateBack()
  634. }, 1000)
  635. }
  636. })
  637. .catch((err: any) => {
  638. console.log('err', err)
  639. })
  640. }
  641. // 拆解
  642. const tableRef = ref()
  643. const dismantleSubmit = async () => {
  644. const data = tableRef.value.getData()
  645. const allQty = data.reduce((prev: any, curr: any) => Number(prev) + Number(curr.qty), 0)
  646. const allTotal = data.reduce((prev: any, curr: any) => prev + Number(curr.subtotal), 0)
  647. if (allTotal != form.value.planScore) {
  648. return uni.showToast({
  649. title: '拆解总任务分值需等于目标总值',
  650. icon: 'none'
  651. })
  652. }
  653. const obj = {
  654. planId: detailInfo.value.planId,
  655. qty: allQty,
  656. total: allTotal,
  657. items: data
  658. }
  659. const res = await planDetailCreateApi(obj)
  660. if (res.data) {
  661. uni.showToast({
  662. title: '拆解完成',
  663. icon: 'none'
  664. })
  665. setTimeout(() => {
  666. uni.navigateBack()
  667. }, 1000)
  668. }
  669. }
  670. // 拆解审核
  671. const dismantleReviewSubmt = async (flag: boolean) => {
  672. const obj = {
  673. detailsId: detailInfo.value.planDetails.detailsId,
  674. result: flag,
  675. msg: reviewForm.msg,
  676. currentState: detailsState.value
  677. }
  678. const res = await checkPlanDetailsApi(obj)
  679. if (res.data) {
  680. uni.showToast({
  681. title: '审核完成',
  682. icon: 'none'
  683. })
  684. setTimeout(() => {
  685. uni.navigateBack()
  686. }, 1000)
  687. }
  688. }
  689. </script>
  690. <style lang="scss" scoped>
  691. .objectives-add {
  692. background: #f2f2f2;
  693. min-height: 100vh;
  694. box-sizing: border-box;
  695. padding: 24rpx;
  696. .message {
  697. background: #fff;
  698. padding: 30rpx;
  699. border-radius: 12rpx;
  700. width: 100%;
  701. box-sizing: border-box;
  702. }
  703. .form {
  704. background: #fff;
  705. padding: 30rpx;
  706. border-radius: 12rpx;
  707. .avail-score {
  708. margin-top: 34rpx;
  709. font-size: 30rpx;
  710. font-weight: 400;
  711. color: #000;
  712. }
  713. }
  714. .table {
  715. margin-top: 20rpx;
  716. }
  717. }
  718. .botton-content {
  719. /* position: fixed;
  720. bottom: 40rpx; */
  721. margin-top: 20rpx;
  722. padding: 30rpx 46rpx 54rpx;
  723. box-sizing: border-box;
  724. background-color: #fff;
  725. width: 700rpx;
  726. min-height: 160rpx;
  727. border-radius: 12rpx;
  728. }
  729. .btn {
  730. display: flex;
  731. justify-content: space-between;
  732. view {
  733. font-weight: 400;
  734. box-sizing: border-box;
  735. font-size: 32rpx;
  736. line-height: 45rpx;
  737. border-radius: 8rpx;
  738. height: 72rpx;
  739. width: 290rpx;
  740. display: flex;
  741. align-items: center;
  742. justify-content: center;
  743. }
  744. .cancel {
  745. border: 2rpx solid #c7c7c7;
  746. color: #111;
  747. }
  748. .confirm {
  749. background-color: #6eb657;
  750. color: #ffffff;
  751. }
  752. }
  753. :deep(.uv-form-item__body__left) {
  754. padding-left: 18rpx;
  755. }
  756. .review-form {
  757. margin-bottom: 54rpx;
  758. }
  759. .b-fixed {
  760. position: fixed;
  761. bottom: 40rpx;
  762. }
  763. </style>