123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388 |
- <template>
- <view class="container">
- <u-form ref="uForm">
- <view class="form_item">
- <view class="title">申请信息</view>
- <!-- <u-divider ></u-divider> -->
- <u-form-item label-width='260' label="业务编号" :borderBottom="false">
- <u-input v-model="tradeList.billNo" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="名头" :borderBottom="false">
- <u-input v-model="tradeList.renown" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="仓库名称" :borderBottom="false">
- <u-input v-model="tradeList.warehouseName" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="仓位号" :borderBottom="false">
- <u-input v-model="tradeList.warehouseNo" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="仓库地址" :borderBottom="false">
- <u-input v-model="tradeList.warehouseAddress" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="货名" :borderBottom="false">
- <u-input v-model="tradeList.goodsName" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="品级" :borderBottom="false">
- <u-input v-model="tradeList.grade" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="现有储量(吨)" :borderBottom="false">
- <u-input v-model="tradeList.nowWeight" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="可用储量(吨)" :borderBottom="false">
- <u-input v-model="tradeList.useWeight" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="本单重量(吨)" :borderBottom="false">
- <u-input v-model="tradeList.weight" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="单价(元/吨)" :borderBottom="false">
- <u-input v-model="tradeList.unitPrice" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="总价值(元)" :borderBottom="false">
- <u-input v-model="tradeList.totalValue" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="申请比例(%)" :borderBottom="false">
- <u-input v-model="tradeList.applicationProportion" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="申请金额(元)" :borderBottom="false">
- <u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- </view>
- <view class="form_item">
- <view class="title">附件</view>
- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="0"
- :file-list="imgUrl" :size-type="['compressed']" @on-success="getImgUrl" :deletable="false"
- :showProgress="false" @on-uploaded="isAdd = true" :before-upload="filterFileType"
- @on-progress="onProgress"></upload>
- </view>
- <view class="form_item">
- <view class="title">外审部门</view>
- <u-form-item label-width='260' label="银行" :borderBottom="false">
- <u-input v-model="tradeList.bank" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- <u-form-item label-width='260' label="第三方" :borderBottom="false">
- <u-input v-model="tradeList.interest" input-align="right" placeholder="暂无" disabled />
- </u-form-item>
- </view>
- </u-form>
- <view class="form_item flex">
- <view class="auditInfo flex" @click="auditInfo">
- <view class="title1">审核记录</view>
- <view class="img">
- <image src="../../../static/img/myimg/gengduo1@3x.png"
- style="width: 16rpx; height: 30rpx;top: 20rpx;margin-right: 0rpx;"></image>
- </view>
- </view>
- </view>
- <view style='padding:10px;' class='flex bottom-btn'>
- <u-button @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
- <u-button @click='pass' type="success" class="btn2">通过</u-button>
- </view>
- <!-- <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
- :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
- showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal> -->
- <view v-if="show" class="shade">
- <view class="wrap">
- <view class="alert-top">
- <view class="titleAudit">
- {{title}}
- </view>
- <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
- </view>
- <view class="u-textarea-style">
- <view class="right-bottom">
- {{auditMind.length}}/100个字
- </view>
- <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
- maxlength="100" />
- </view>
- <view @click='close()' class="cancel">取消</view>
- <view @click='passSubmit()' class="confirm">确定</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import upload from '@/components/upload.vue';
- export default {
- components: {
- upload
- },
- data() {
- return {
- id: "",
- action: this.$uploadUrl,
- maxSize: 50 * 1024 * 1024, //限制文件大小 50M
- btnLoading: false, //防止重复点击
- imgUrl: [],
- tradeList: {},
- isShowAlert:false,
- show:false,
- content:"",
- title:"",
- auditMind:"",//审核意见
- }
- },
- onLoad(options) {
- this.id = options.id
- this.getList()
- },
- onshow() {
- },
- methods: {
- getList() {
- var that = this
- that.$api.doRequest('get', '/tradeWarehouseReceiptAppl/getTrageInfo', {
- id: that.id
- }).then(res => {
- that.tradeList = res.data.data
- //通过图片id找到地址
- that.$api.doRequest('get', '/appendix/query/getFileList', {
- appendixIds: that.tradeList.appendix
- }).then(res => {
- for (let i = 0; i < res.data.data.length; i++) {
- that.imgUrl.push({
- url: res.data.data[i].appendixPath
- })
- }
- }).catch(res => {
- if (res.errmsg) {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- }
- });
- })
- },
- reject(){
- this.show = true
- this.title = "驳回原因(驳回)"
- },
- pass(){
- this.show = true
- this.title = "审核意见(通过)"
- },
- close(){
- this.show = false
- },
- passSubmit(){
- if(this.title = "驳回原因(驳回)"){
- if(!this.auditMind){
- this.$api.msg('驳回意见不能为空')
- return
- }
- this.$api.doRequest('post', '/workflow/api/handle', {
- taskId: this.tradeList.taskId,
- approved: false,
- auditMind: this.auditMind,
- needReapply: true,
- }).then(res => {
- if(res.data.code == 200){
- uni.showToast({
- title: "审核成功",
- icon: 'none',
- duration: 2000
- })
- uni.navigateBack()
- }
- }).catch(res => {
- if (res.errmsg) {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- }
- });
- // }
- }else{
- this.$api.doRequest('post', '/workflow/api/handle', {
- taskId: this.tradeList.taskId,
- approved: true,
- auditMind: this.auditMind ? this.auditMind : "审核通过",
- needReapply: false,
- }).then(res => {
- if(res.data.code == 200){
- uni.showToast({
- title: "审核成功",
- icon: 'none',
- duration: 2000
- })
- uni.navigateBack()
- }
- }).catch(res => {
- if (res.errmsg) {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- }
- });
- }
-
- },
- auditInfo(){
- // uni.navigateTo({
- // url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
- // })
- },
- filterFileType(index, lists) {
- if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif' &&
- lists[index].fileType != 'jpeg') {
- lists.splice(index, 1);
- // 当前文件不支持
- uni.showModal({
- title: '暂不支持当前图片类型',
- showCancel: false
- });
- } else {
- this.isAdd = false;
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .container {
- padding: 20rpx 12rpx 250rpx 12rpx;
- }
- .title {
- font-size: 34rpx;
- font-weight: 600;
- margin-top: 20rpx;
- line-height: 70rpx;
- border-bottom: 2rpx solid #EEEEEE;
- }
- .form_item {
- background: #fff;
- margin: 10px;
- border-radius: 10px;
- padding: 20rpx 30rpx;
- // width: 100%;
- }
- .u-form-item {
- padding: 12rpx 0 !important;
- }
- .auditInfo {
- width: 100%;
- .title1 {
- width: 99%;
- font-size: 34rpx;
- font-weight: 600;
- // margin-top: 20rpx;
- line-height: 70rpx;
- }
- }
- .bottom-btn {
- width: 100%;
- position: fixed;
- bottom: 0;
- display: flex;
- z-index: 2;
- left: 0;
- background-color: #f8f8f8;
- flex-direction: column;
-
- .btn1,
- .btn2 {
- width: 100%;
- margin-bottom: 26rpx;
- border-radius: 90rpx;
- }
-
- .btn1 {
- background: white;
- color: #00C265;
- }
- }
- .shade {
- position: fixed;
- top: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background: rgba(0, 0, 0, 0.4);
- z-index: 3;
-
- .wrap {
- position: absolute;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- background: #fff;
- width: calc(100% - 198rpx);
- height: 700rpx;
- border-radius: 20rpx;
-
- .alert-top {
- padding: 33rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- position: relative;
- }
-
- .titleAudit {
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- }
-
- .close {
- position: absolute;
- right: 33rpx;
- }
- }
- }
- .cancel,
- .confirm {
- position: absolute;
- display: inline-block;
- width: 50%;
- text-align: center;
- bottom: 0;
- padding: 10px;
- border-top: 1px solid #eee;
- font-size: 34rpx;
- }
-
- .cancel {
- left: 0;
- border-right: 1px solid #eee;
- color: #AFB3BF;
- }
- .confirm {
- right: 0;
- color: #22C572;
- }
- .u-textarea-style {
- margin: 20rpx;
- background: #F9F9FA;
- border-radius: 10px;
- border: 1px solid #EEEEEE;
- padding: 10rpx 20rpx;
- position: relative;
-
- .right-bottom {
- position: absolute;
- right: 20rpx;
- bottom: 20rpx;
- color: #AFB3BF;
- }
- }
- /deep/.u-list-item {
- margin: 4rpx !important;
- }
- </style>
|