| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785 |
- <!--
- * @Author: liuzhenlin 461480418@qq.ocm
- * @Date: 2023-01-12 11:57:48
- * @LastEditors: liuzhenlin
- * @LastEditTime: 2023-05-08 10:24:04
- * @Description: file content
- * @FilePath: \oms\pages\project\upgrade.vue
- -->
- <template>
- <view class="home">
- <view class="nav">
- <view :style="{ paddingTop }">
- <view class="title" :style="[{ height }, { lineHeight: height }]">
- <view class="back" @click="goBack()">
- <u-icon name="arrow-left" color="#ffffff" size="22"></u-icon>
- </view>
- <text>项目升级</text>
- </view>
- </view>
- </view>
- <view class="main">
- <u-form :model="addForm" :rules="rules" ref="addForm" label-width="0">
- <!-- 项目级别 -->
- <u-form-item prop="nboType" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 项目级别
- </view>
- <u-radio-group v-model="addForm.nboType" placement="row" @change="changeLevel">
- <u-radio
- customStyle="margin-right:40rpx"
- :disabled="projectDetails.nboType === '10'"
- label="A"
- name="10"></u-radio>
- <u-radio
- customStyle="margin-right:40rpx"
- :disabled="projectDetails.nboType === '20'"
- label="B"
- name="20"></u-radio>
- <u-radio
- :disabled="['10', '20', '30'].includes(projectDetails.nboType)"
- customStyle="margin-right:40rpx"
- label="C"
- name="30"></u-radio>
- <!-- <u-radio v-if="projectDetails.nboType === '10'" label="储备" name="50"></u-radio> -->
- </u-radio-group>
- </u-form-item>
- <!-- A/B -->
- <view v-if="addForm.nboType !== '30'">
- <u-form-item prop="nboBudget" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 项目预算
- </view>
- <u-input
- placeholder="输入项目预算"
- v-model.number="addForm.nboBudget"
- border="none"
- type="number"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item
- prop="distributorName"
- borderBottom
- customStyle="padding:40rpx 0 30rpx"
- @click="$refs.dealer.open()">
- <view class="form-label flex_l">经销商/代理商</view>
- <u-input
- :readonly="true"
- placeholder="请选择经销商/代理商"
- v-model="addForm.distributorName"
- border="none"
- suffixIcon="arrow-down"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item prop="parentReceiver" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">总部对接人</view>
- <u-input
- placeholder="输入总部对接人"
- v-model="addForm.parentReceiver"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item prop="technicalSupportName" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 技术支持人员
- </view>
- <u-input
- placeholder="输入技术支持人员"
- v-model="addForm.technicalSupportName"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item prop="technicalSupportContent" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 技术支持内容
- </view>
- <u-input
- placeholder="输入技术支持内容"
- v-model="addForm.technicalSupportContent"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showSupportDate = true">
- <view class="form-label flex_l">技术支持时间</view>
- <u-input
- :readonly="true"
- placeholder="请选择技术支持时间"
- v-model="addForm.technicalSupportTime"
- border="none"
- suffixIcon="arrow-down"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="showBudgetDate = true">
- <view class="form-label flex_l">项目预算期限</view>
- <u-input
- :readonly="true"
- placeholder="请选择项目预算期限"
- v-model="addForm.nboBudgetTime"
- border="none"
- suffixIcon="arrow-down"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">资金来源</view>
- <u-input
- placeholder="输入资金来源"
- v-model="addForm.capitalSource"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">产品/方案满足情况</view>
- <u-input
- placeholder="输入产品/方案满足情况"
- v-model="addForm.productSatisfaction"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <!-- 上传报价单文件 -->
- <u-form-item prop="quotationFile" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 报价单
- </view>
- <uni-file-picker
- file-mediatype="all"
- mode="grid"
- @select="chooseFile($event, 'baojia')"
- @delete="delQuotationFile"
- ref="upload"
- limit="1">
- <view class="upload-btn">
- <u-icon name="plus-circle-fill" color="blue" size="28"></u-icon>
- </view>
- </uni-file-picker>
- </u-form-item>
- </view>
- <!-- A -->
- <view v-if="addForm.nboType === '10'">
- <u-form-item
- prop="purchasingWayVal"
- borderBottom
- customStyle="padding:40rpx 0 30rpx"
- @click="showChasingWay = true">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 采购方式
- </view>
- <u-input
- :readonly="true"
- placeholder="请选择采购方式"
- v-model="addForm.purchasingWayVal"
- border="none"
- suffixIcon="arrow-down"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item
- prop="purchasingTime"
- borderBottom
- customStyle="padding:40rpx 0 30rpx"
- @click="showPurchasingDate = true">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 采购时间
- </view>
- <u-input
- :readonly="true"
- placeholder="请选择采购时间"
- v-model="addForm.purchasingTime"
- border="none"
- suffixIcon="arrow-down"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx" @click="selectContact()">
- <view class="form-label flex_l">决策人员</view>
- <u-input
- :readonly="true"
- placeholder="输入决策人员"
- v-model="addForm.makerName"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">决策部门</view>
- <u-input
- :readonly="true"
- placeholder="输入决策部门"
- v-model="addForm.makerDept"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">经销商与客户历史成交信息</view>
- <u-input
- placeholder="输入经销商与客户历史成交信息"
- v-model="addForm.historicalTransactionInfo"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">经销商销售人员</view>
- <u-input
- placeholder="输入经销商销售人员"
- v-model="addForm.dealerSalesName"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">维护部门及人员</view>
- <u-input
- placeholder="输入维护部门及人员"
- v-model="addForm.accendant"
- border="none"
- suffixIconStyle="color:#CDCDCD"
- clearable
- customStyle="padding: 0 30rpx 0 12rpx"></u-input>
- </u-form-item>
- <u-form-item prop="isAdoptDashoo" borderBottom customStyle="padding:40rpx 0 30rpx">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 是否采纳大数技术参数
- </view>
- <u-radio-group v-model="addForm.isAdoptDashoo" placement="row" @change="chooseRadio">
- <u-radio customStyle="margin-right:40rpx" label="是" name="10"></u-radio>
- <u-radio customStyle="margin-right:40rpx" label="否" name="20"></u-radio>
- </u-radio-group>
- </u-form-item>
- <!-- 上传大数参数文件 -->
- <u-form-item
- prop="dashooParamFile"
- borderBottom
- customStyle="padding:40rpx 0 30rpx"
- v-if="addForm.isAdoptDashoo == '10'">
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 文件
- </view>
- <uni-file-picker
- file-mediatype="all"
- mode="grid"
- @delete="deldashooParamFile"
- @select="chooseFile($event)"
- ref="upload"
- limit="1">
- <view class="upload-btn">
- <u-icon name="plus-circle-fill" color="blue" size="28"></u-icon>
- </view>
- </uni-file-picker>
- </u-form-item>
- </view>
- <u-form-item
- prop="projConversionReason"
- customStyle="padding:40rpx 0 30rpx"
- v-if="addForm.isAdoptDashoo != '30'">
- <view class="form-label flex_l">升级原因</view>
- <u-textarea
- fontSize="26rpx"
- v-model="addForm.projConversionReason"
- placeholder="请输入升级原因"
- height="180"
- :count="true"
- maxlength="300"></u-textarea>
- </u-form-item>
- <u-form-item prop="remark" customStyle="padding:40rpx 0 30rpx" v-else>
- <view class="form-label flex_l">
- <view class="label-tag"></view>
- 转化原因
- </view>
- <u-textarea
- fontSize="26rpx"
- v-model="addForm.remark"
- placeholder="请输入转化原因"
- height="180"
- :count="true"
- maxlength="300"></u-textarea>
- </u-form-item>
- </u-form>
- <view class="save" @click="handleUpgrade">提交</view>
- </view>
- <!-- 技术支持时间 -->
- <u-datetime-picker
- v-if="showSupportDate"
- :show="showSupportDate"
- mode="date"
- v-model="addForm.technicalSupportTime"
- @cancel="showSupportDate = false"
- @confirm="pickSupportDate"></u-datetime-picker>
- <!-- 项目预算期限 -->
- <u-datetime-picker
- v-if="showBudgetDate"
- :show="showBudgetDate"
- mode="date"
- v-model="addForm.nboBudgetTime"
- @cancel="showBudgetDate = false"
- @confirm="pickBudgetDate"></u-datetime-picker>
- <!-- 采购时间 -->
- <u-datetime-picker
- v-if="showPurchasingDate"
- :show="showPurchasingDate"
- mode="date"
- v-model="addForm.purchasingTime"
- @cancel="showPurchasingDate = false"
- @confirm="pickPurchasingDate"></u-datetime-picker>
- <!-- 采购方式 -->
- <u-picker
- :show="showChasingWay"
- :columns="[purchasingWayOptions]"
- keyName="value"
- @cancel="showChasingWay = false"
- @confirm="pickModel"></u-picker>
- <!-- 选择经销商 -->
- <select-dealer ref="dealer" @close="closeDealer($event)"></select-dealer>
- <!-- 客户联系人 -->
- <customer-contact ref="contact" @close="closeContact($event)"></customer-contact>
- <u-notify ref="uNotify"></u-notify>
- <u-toast ref="uToast"></u-toast>
- <u-modal
- :show="showModal"
- content="确认进行项目升级?"
- :showCancelButton="true"
- @cancel="this.showModal = false"
- @confirm="this.handleUpgradeApi()"></u-modal>
- </view>
- </template>
- <script>
- import {
- multipartUpload as upload,
- uploadTask as task, //上传任务对象,同requestTask js_sdk\xp-multipart\xp-multipart\xp-multipart.js
- // D:\work\oms\js_sdk\xp-multipart\xp-multipart\xp-multipart.js
- } from '@/js_sdk/xp-multipart/xp-multipart/xp-multipart'
- import projectApi from '../../api/project'
- import to from 'await-to-js'
- import SelectDealer from 'components/SelectDealer'
- import CustomerContact from '../../components/CustomerContact'
- export default {
- name: 'omsIndex',
- components: { SelectDealer, CustomerContact },
- data() {
- return {
- height: '',
- paddingTop: '',
- showSupportDate: false, //技术支持时间
- showBudgetDate: false, //项目预算时间
- showPurchasingDate: false, //采购时间
- showChasingWay: false,
- purchasingWayOptions: [],
- addForm: {
- nboType: '', //项目及别
- nboBudget: 0, //项目预算
- distributorName: '', //经销商
- distributorId: '', //经销商ID
- parentReceiver: '', //项目对接人
- technicalSupportName: '', //技术支持人员
- technicalSupportContent: null, //技术支持内容
- technicalSupportTime: '', //技术支持时间
- nboBudgetTime: this.parseTime(new Date(), '{y}-{m}-{d}'), //项目预算时间
- capitalSource: '', //资金来源
- productSatisfaction: '', //产品方案满足情况
- purchasingWay: '', //采购方式id
- purchasingWayVal: '', //采购方式
- purchasingTime: this.parseTime(new Date(), '{y}-{m}-{d}'), //采购时间
- makerId: '', //决策人
- makerName: '', //决策人
- makerDept: '', //决策部门
- historicalTransactionInfo: '', //输入经销商与客户历史成交信息
- dealerSalesName: '', //经销商销售人员
- accendant: '', //维护部门及人员
- isAdoptDashoo: '', //是否采纳大数技术参数
- remark: '', //转化原因
- projConversionReason: '', //升级原因
- id: 0, //项目id
- dashooParamFile: '',
- dashooParamFilePaths: '',
- quotationFilePaths: '',
- quotationFile: '',
- },
- showModal: false,
- projectDetails: {},
- rules: {
- nboType: {
- type: 'string',
- required: true,
- message: '请选择项目级别',
- trigger: ['blur'],
- },
- technicalSupportName: {
- type: 'string',
- required: true,
- message: '请输入技术支持人员',
- trigger: ['blur'],
- },
- technicalSupportContent: {
- type: 'string',
- required: true,
- message: '请输入技术支持内容',
- trigger: ['blur'],
- },
- nboBudget: {
- type: 'number',
- required: true,
- message: '请输入项目预算',
- trigger: ['blur'],
- },
- purchasingWayVal: {
- type: 'string',
- required: true,
- message: '请输入采购方式',
- trigger: ['blur'],
- },
- technicalSupportTime: {
- type: 'string',
- required: true,
- message: '请输入采购时间',
- trigger: ['blur'],
- },
- isAdoptDashoo: {
- type: 'string',
- required: true,
- message: '请选择是否采纳大数技术参数',
- trigger: ['blur'],
- },
- dashooParamFile: {
- type: 'object',
- required: true,
- message: '请上传文件',
- trigger: ['change'],
- },
- quotationFile: {
- type: 'object',
- required: true,
- message: '请上传报价单',
- trigger: ['change'],
- },
- remark: {
- type: 'string',
- required: true,
- message: '请输入转化',
- trigger: ['blur'],
- },
- },
- }
- },
- created() {
- const navData = uni.getMenuButtonBoundingClientRect()
- this.height = navData.height + 'px'
- this.paddingTop = navData.top + 'px'
- },
- onLoad(option) {
- console.log(option.id) //打印出上个页面传递的参数。
- this.addForm.id = parseInt(option.id)
- },
- mounted() {
- this.getDetails()
- this.getOptions()
- },
- methods: {
- getOptions() {
- Promise.all([this.getDicts('proj_purchasing_way')])
- .then(([purchasing]) => {
- this.purchasingWayOptions = purchasing.data.values || []
- })
- .catch((err) => console.log(err))
- },
- async getDetails() {
- const [err, res] = await to(projectApi.getDetail({ id: this.addForm.id }))
- if (err) return
- if (res.code == 200) {
- this.projectDetails = res.data
- this.addForm = Object.assign(this.addForm, this.projectDetails)
- this.addForm.nboType = ''
- this.addForm.technicalSupportName = ''
- this.addForm.technicalSupportContent = ''
- this.addForm.technicalSupportTime = this.parseTime(new Date(), '{y}-{m}-{d}')
- this.addForm.nboBudgetTime = this.parseTime(new Date(), '{y}-{m}-{d}')
- this.addForm.projConversionReason = ''
- this.addForm.remark = ''
- }
- },
- changeLevel(e) {
- if (e == '20') {
- this.addForm.dashooParamFile = ''
- this.addForm.dashooParamFilePaths = ''
- } else if (e == '30') {
- this.addForm.dashooParamFile = ''
- this.addForm.dashooParamFilePaths = ''
- this.addForm.quotationFile = ''
- this.addForm.quotationFilePaths = ''
- }
- },
- // 选择采购方式
- pickModel(e) {
- this.addForm.purchasingWay = e.value[0].key
- this.addForm.purchasingWayVal = e.value[0].value
- this.showChasingWay = false
- },
- // 经销商
- closeDealer(dealer) {
- if (dealer) {
- this.addForm.distributorId = dealer.id
- this.addForm.distributorName = dealer.name
- }
- },
- selectContact() {
- if (!this.addForm.custId) {
- this.$refs.uNotify.show({
- top: this.height + this.paddingTop + 10,
- type: 'warning',
- message: '请先选择客户',
- duration: 1000 * 3,
- })
- return
- }
- this.$refs.contact.open(this.addForm.custId)
- },
- // 关闭选择客户联系人
- closeContact(user) {
- if (user) {
- this.addForm.makerId = user.id
- this.addForm.makerName = user.cuctName
- this.addForm.makerDept = user.dept
- // this.addForm.makerPost = user.postion
- // this.addForm.makerTelephone = user.telephone
- }
- },
- // 技术支持时间
- async pickSupportDate(e) {
- this.showSupportDate = false
- const timeFormat = uni.$u.timeFormat
- let timeValue = await timeFormat(e.value, 'yyyy-mm-dd hh:MM')
- this.addForm.technicalSupportTime = timeValue
- },
- // 项目预算时间
- async pickBudgetDate(e) {
- this.showBudgetDate = false
- const timeFormat = uni.$u.timeFormat
- let timeValue = await timeFormat(e.value, 'yyyy-mm-dd hh:MM')
- this.addForm.nboBudgetTime = timeValue
- },
- // 采购时间
- async pickPurchasingDate(e) {
- this.showPurchasingDate = false
- const timeFormat = uni.$u.timeFormat
- let timeValue = await timeFormat(e.value, 'yyyy-mm-dd hh:MM')
- this.addForm.purchasingTime = timeValue
- },
- // 选择是否采用大数参数
- chooseRadio(e) {
- if (e == '20') {
- this.addForm.dashooParamFile = ''
- this.addForm.dashooParamFilePaths = ''
- }
- },
- // // 选择上传触发函数
- chooseFile(e, type = null) {
- if (type == 'baojia') {
- this.addForm.quotationFile = e.tempFiles[0].file
- this.addForm.quotationFilePaths = e.tempFilePaths[0]
- } else {
- this.addForm.dashooParamFile = e.tempFiles[0].file
- this.addForm.dashooParamFilePaths = e.tempFilePaths[0]
- }
- },
- // 删除报价单
- delQuotationFile() {
- this.addForm.quotationFile = ''
- this.addForm.quotationFilePaths = ''
- },
- // 删除大数参数文件
- deldashooParamFile() {
- this.addForm.dashooParamFile = ''
- this.addForm.dashooParamFilePaths = ''
- },
- // 上传函数
- async upgradeAorB(data) {
- const basePath = process.uniEnv.VUE_APP_MicroSrvProxy_API + process.uniEnv.VUE_APP_ParentPath
- upload({
- url: basePath, //后端接口
- fields: data,
- files: {
- quotationFile: this.addForm.quotationFilePaths,
- dashooParamFile: this.addForm.dashooParamFilePaths,
- },
- header: {
- Tenant: process.uniEnv.VUE_APP_TENANT,
- Authorization: 'Bearer ' + uni.getStorageSync('opms_token') || '',
- 'X-RPCX-SerializeType': '1',
- 'X-RPCX-ServicePath': 'BusinessHandler',
- 'X-RPCX-ServiceMethod': 'BusinessUpgradeAorB',
- SrvEnv: 'dev',
- },
- success: (res) => {
- if (res.data.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: '提交成功',
- complete: () => {
- this.goBack()
- },
- })
- } else {
- this.$refs.uToast.show({
- type: 'warning',
- message: res.data.msg,
- })
- }
- },
- fail: (err) => {
- this.$refs.uToast.show({
- type: 'error',
- message: '提交失败',
- })
- },
- complete: (ret) => {
- this.showModal = false
- },
- })
- },
- handleUpgrade() {
- this.$refs.addForm
- .validate()
- .then(async () => {
- this.showModal = true
- })
- .catch((err) => {
- this.$refs.uNotify.show({
- top: this.height + this.paddingTop + 10,
- type: 'warning',
- message: err[0].message,
- duration: 1000 * 3,
- })
- })
- },
- async handleUpgradeApi() {
- let params = this.addForm
- params.nboBudget = Number(params.nboBudget)
- if (this.addForm.nboType === '10' || this.addForm.nboType === '20') {
- this.upgradeAorB(params)
- } else {
- const [err, res] = await to(projectApi.upgrade(params))
- this.showModal = false
- if (err) return
- if (res && res.code == 200) {
- this.$refs.uToast.show({
- type: 'success',
- message: '提交成功',
- complete: () => {
- this.goBack()
- },
- })
- }
- }
- },
- goBack() {
- uni.navigateBack({
- //关闭当前页面,返回上一页面或多级页面。
- delta: 1,
- })
- },
- },
- }
- </script>
- <style>
- page {
- background: #f2f3f5;
- }
- </style>
- <style lang="scss" scoped>
- .home {
- padding-top: 188rpx;
- .nav {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 284rpx;
- background: #3e7ef8;
- .title {
- position: relative;
- text-align: center;
- font-size: 32rpx;
- font-weight: bold;
- color: #ffffff;
- .back {
- position: absolute;
- top: 0;
- bottom: 0;
- margin: auto;
- left: 70rpx;
- display: flex;
- }
- }
- }
- .main {
- position: absolute;
- width: 100%;
- height: calc(100vh - 188rpx);
- background: #ffffff;
- box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
- border-radius: 31rpx 31rpx 0 0;
- padding: 0 32rpx;
- overflow: auto;
- padding-bottom: 64rpx;
- .form-label {
- font-size: 32rpx;
- font-weight: bold;
- color: #323232;
- padding-bottom: 18rpx;
- .label-tag {
- width: 15rpx;
- height: 15rpx;
- background: #ff4d4f;
- border-radius: 50%;
- margin-right: 10rpx;
- }
- }
- .save {
- width: 569rpx;
- height: 92rpx;
- background: #3e7ef8;
- border-radius: 31rpx;
- margin: 116rpx auto 0;
- font-size: 32rpx;
- color: #ffffff;
- text-align: center;
- line-height: 92rpx;
- }
- }
- }
- </style>
|