|
@@ -1,30 +1,29 @@
|
|
|
<template>
|
|
|
<view class="warp">
|
|
|
<view class="transaction">
|
|
|
- <u-form :model="purchaseOrder" ref="uForm" class="uForm">
|
|
|
- <u-form-item label="合同编号" prop="receivingAddress" label-width="140">
|
|
|
- <u-input v-model="purchaseOrder.receivingAddress" input-align="right" placeholder="" disabled/>
|
|
|
+ <u-form :model="list" ref="uForm" class="uForm">
|
|
|
+ <u-form-item label="合同编号" prop="contractNo" label-width="140">
|
|
|
+ <u-input v-model="list.contractNo" input-align="right" placeholder="" disabled />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="任务编号" prop="receivingAddress" label-width="140">
|
|
|
- <u-input v-model="purchaseOrder.receivingAddress" input-align="right" placeholder="" disabled/>
|
|
|
+ <u-form-item label="任务编号" prop="processNo" label-width="140">
|
|
|
+ <u-input v-model="list.processNo" input-align="right" placeholder="" disabled />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="货名" prop="receivingAddress" label-width="140">
|
|
|
- <u-input v-model="purchaseOrder.receivingAddress" input-align="right" placeholder="" disabled/>
|
|
|
+ <u-form-item label="货名" prop="goodsName" label-width="140">
|
|
|
+ <u-input v-model="list.goodsName" input-align="right" placeholder="" disabled />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="发货地址" prop="receivingAddress" label-width="140" label-position='top'>
|
|
|
- <u-input v-model="purchaseOrder.receivingAddress" input-align="left" placeholder="" disabled/>
|
|
|
+ <u-form-item label="发货地址" prop="sendDetailedAddress" label-width="140" label-position='top'>
|
|
|
+ <u-input v-model="list.sendDetailedAddress" input-align="left" placeholder="" disabled />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="收货地址" prop="receivingAddress" label-width="140" label-position='top'>
|
|
|
- <u-input v-model="purchaseOrder.receivingAddress" input-align="left" placeholder="请输入收货地址" disabled/>
|
|
|
+ <u-form-item label="收货地址" prop="receiveDetailedAddress" label-width="140" label-position='top'>
|
|
|
+ <u-input v-model="list.receiveDetailedAddress" input-align="left" placeholder="请输入收货地址" disabled />
|
|
|
</u-form-item>
|
|
|
- <u-form-item label="运费(元/吨)" prop="freightUnitPrice" label-width="250">
|
|
|
- <u-input v-model="purchaseOrder.freightUnitPrice" input-align="right" placeholder="请输入运费单价" />
|
|
|
+ <u-form-item label="运费(元/吨)" prop="tranPrice" label-width="250">
|
|
|
+ <u-input v-model="list.tranPriceIng" input-align="right" placeholder="请输入运费单价" />
|
|
|
</u-form-item>
|
|
|
</u-form>
|
|
|
</view>
|
|
|
<u-toast ref="uToast" />
|
|
|
<view class="bottom-btn">
|
|
|
- <u-button type="primary" class="submit" hover-class="none" @click="rejectSubmit()">驳回</u-button>
|
|
|
<u-button type="primary" class="submit" hover-class="none" @click="passSubmit()">通过</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -35,73 +34,30 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- purchaseOrder: {
|
|
|
- freightUnitPrice: "123",
|
|
|
- receivingAddress:'444'
|
|
|
- },
|
|
|
- rules: {
|
|
|
- freightUnitPrice: [{
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- return !this.$u.test.isEmpty(value)
|
|
|
- },
|
|
|
- message: '运费不能为空',
|
|
|
- trigger: ['change', 'blur']
|
|
|
- },
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- return this.$u.test.amount(value)
|
|
|
- },
|
|
|
- message: '数值类型,最多保留两位小数',
|
|
|
- trigger: ['change', 'blur'],
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ list: {},
|
|
|
+ id: "",
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
+ this.id = options.id
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
- getList(){
|
|
|
-
|
|
|
+ getList() {
|
|
|
+ this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
|
|
|
+ id: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.list = res.data.data
|
|
|
+ })
|
|
|
},
|
|
|
- passSubmit(){
|
|
|
- this.$refs.uForm.validate(valid => {
|
|
|
- if (valid) {
|
|
|
- uni.showLoading({
|
|
|
- title: '正在加载',
|
|
|
- mask: true
|
|
|
- })
|
|
|
- console.log('验证通过');
|
|
|
- this.$api.doRequest('post',
|
|
|
- '/freightReceivingDispatching/api/insertFreightReceivingDispatching',
|
|
|
- this
|
|
|
- .purchaseOrder).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- uni.showToast({
|
|
|
- title: '提交成功',
|
|
|
- icon: 'none',
|
|
|
- duration: 2000,
|
|
|
- success: function() {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pageA/freightTransport/index`
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }).catch(res => {
|
|
|
- // uni.showToast({
|
|
|
- // title: res.data.message,
|
|
|
- // icon: 'none',
|
|
|
- // duration: 2000
|
|
|
- // })
|
|
|
- })
|
|
|
- } else {
|
|
|
- console.log('验证失败');
|
|
|
- }
|
|
|
- });
|
|
|
+ passSubmit() {
|
|
|
+ var tranProcessInfo = {}
|
|
|
+ tranProcessInfo.id = this.list.id
|
|
|
+ tranProcessInfo.flag = "1"
|
|
|
+ tranProcessInfo.tranPriceIng = this.list.tranPriceIng
|
|
|
+ this.$api.doRequest('post', '/tranProcessInfo/api/setUpTranPrice', tranProcessInfo).then(res => {
|
|
|
+ this.$message.success('审核通过成功')
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -114,12 +70,15 @@
|
|
|
padding-bottom: 10rpx;
|
|
|
border-radius: 20rpx;
|
|
|
}
|
|
|
+
|
|
|
.uForm {
|
|
|
padding: 0 40rpx;
|
|
|
}
|
|
|
- .u-form-item{
|
|
|
+
|
|
|
+ .u-form-item {
|
|
|
padding: 0;
|
|
|
}
|
|
|
+
|
|
|
.bottom-btn {
|
|
|
width: 100%;
|
|
|
position: fixed;
|
|
@@ -127,6 +86,7 @@
|
|
|
display: flex;
|
|
|
z-index: 2;
|
|
|
}
|
|
|
+
|
|
|
.submit {
|
|
|
width: 40%;
|
|
|
background: #22C572;
|