123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <template>
- <view class="warp">
- <view class='content1'>
- <view class="title">基本信息</view>
- <view class='row'>
- <view class="left">仓库</view>
- <view class="right">{{list.warehouseName}}</view>
- </view>
- <view class='row'>
- <view class="left">货名</view>
- <view class="right">{{list.goodsName}}</view>
- </view>
- <view class='row'>
- <view class="left">基准水分(%)</view>
- <view class="right">{{list.waterBase}}</view>
- </view>
- <view class='row'>
- <view class="left">干粮水分(%)</view>
- <view class="right">{{list.waterMin}}</view>
- </view>
- <view class='row'>
- <view class="left">水分上限(%)</view>
- <view class="right">{{list.waterMax}}</view>
- </view>
- <view class='row'>
- <view class="left">扣重比</view>
- <view class="right">{{list.warehouseName}}</view>
- </view>
- <view class='row'>
- <view class="left">干粮收购价格(元/公斤)</view>
- <view class="right">{{list.warehouseName}}</view>
- </view>
- <view class='row'>
- <view class="left">销售上限</view>
- <view class="right">{{list.warehouseName}}</view>
- </view>
- </view>
- <view class="content2">
- <view class="title">粮价设置</view>
- <view v-for="(item,index) in 4" :key="index">
- <view class="row">
- <view class="left">等级</view>
- <view class="right">一等、二等</view>
- </view>
- <view class="row">
- <view class="left">基准单价(元/公斤)</view>
- <view class="right">2.2</view>
- </view>
- <view class="row" v-for="(item1,index1) in 10" :key="index1">
- <view class="left">15-23降幅(元/0.1%)</view>
- <view class="right">0.001</view>
- </view>
- </view>
- </view>
- <u-toast ref="uToast" />
- <view style='padding:10px;' class='flex'>
- <u-button v-if='list.status=="未审核"' @click='reject' type="error">驳回</u-button>
- <u-button v-if='list.status=="未审核"' @click='audit' type="success">通过</u-button>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- name: "task",
- data() {
- return {
- show: false,
- id: 0,
- list: {},
- form: {
- name: '',
- intro: '',
- sex: ''
- },
- radio: '',
- pcUserInfo: uni.getStorageSync('pcUserInfo'),
- switchVal: false,
- contractNoList: []
- };
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo'])
- },
- onLoad(options) {
- console.log(options)
- this.id = options.id
- },
- onShow() {
- var that = this
- this.$nextTick(function() {
- that.getData()
- })
- // this.userInfo = uni.getStorageSync("userInfo")
- },
- methods: {
- getData() {
- var data = []
- this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
- id: this.id
- }).then(res => {
- if (res.data.code == 200) {
- this.list = res.data.data
- console.log(this.list)
- }
- })
- },
- confirm(item) {
- this.list.contractNo = item[0].value
- },
- audit() {
- var that = this
- uni.showModal({
- content: "是否确定通过审核?",
- showCancel: true,
- confirmText: '提交',
- success: function(res) {
- if (res.confirm) {
- that.$api.doRequest('post', '/workflow/api/handle', {
- taskId: that.list.taskId,
- approved: true,
- auditMind: '34',
- needReapply: false,
- }).then(res1 => {
- if (res1.data.code == 200) {
- that.$api.msg('审核成功');
- that.$nextTick(function() {
- uni.navigateBack()
- })
- } else {
- that.$api.msg('系统异常,请联系管理员');
- }
- })
- }
- }
- })
- },
- reject() {
- var that = this
- uni.showModal({
- content: "是否确定驳回?",
- showCancel: true,
- confirmText: '提交',
- success: function(res) {
- if (res.confirm) {
- that.$api.doRequest('post', '/workflow/api/handle', {
- taskId: that.list.taskId,
- approved: false,
- auditMind: '已驳回',
- needReapply: true,
- }).then(res1 => {
- if (res1.data.code == 200) {
- that.$api.msg('驳回成功');
- that.$nextTick(function() {
- uni.navigateBack()
- })
- } else {
- that.$api.msg(res1.data.message);
- }
- }).catch()
- }
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .warp {
- margin: 10rpx;
- padding: 20rpx 20rpx 140rpx 20rpx;
- }
- .content1,
- .content2 {
- border-radius: 20rpx;
- background: white;
- padding: 20rpx;
- .title {
- font-size: 28rpx;
- font-weight: 600;
- color: #333333;
- text-align: center;
- }
- .row {
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- padding: 21rpx 0;
- .right,
- input {
- font-size: 28rpx;
- color: #333333;
- }
- }
- }
- .content2 {
- margin-top: 20rpx;
- }
- .bottom-btn {
- width: 92%;
- position: fixed;
- bottom: 40rpx;
- display: flex;
- z-index: 2;
- }
- .submit {
- width: 40%;
- background: #22C572;
- border-radius: 10rpx;
- }
- </style>
|