Commit 1f49c7d3 by liangjianmin

fix(approve): 修正审批状态及详情页参数传递问题

- 审批弹窗中不同意选项的值由2改为-1,保持审批状态一致性
- 不同意时的审批意见提示与校验对应修改为-1状态判断
- 审批详情页新增bill_id参数,提交接口调用中传递正确的bill_id
- 审批列表页跳转审批详情时携带bill_id参数,
parent 7dfa10a7
...@@ -90,10 +90,10 @@ ...@@ -90,10 +90,10 @@
<view class="modal-body"> <view class="modal-body">
<u-radio-group v-model="modalStatus" placement="row"> <u-radio-group v-model="modalStatus" placement="row">
<u-radio :name="1" label="同意" :customStyle="{ marginRight: '60rpx' }"></u-radio> <u-radio :name="1" label="同意" :customStyle="{ marginRight: '60rpx' }"></u-radio>
<u-radio :name="2" label="不同意" activeColor="#2979ff"></u-radio> <u-radio :name="-1" label="不同意" activeColor="#2979ff"></u-radio>
</u-radio-group> </u-radio-group>
<view class="modal-textarea-wrap"> <view class="modal-textarea-wrap">
<u-textarea v-model="remark" :placeholder="modalStatus === 2 ? '不同意时,必须填写说明...' : '请输入审批意见(选填)'" :maxlength="200" height="200"></u-textarea> <u-textarea v-model="remark" :placeholder="modalStatus === -1 ? '不同意时,必须填写说明...' : '请输入审批意见(选填)'" :maxlength="200" height="200"></u-textarea>
</view> </view>
</view> </view>
<view class="modal-footer"> <view class="modal-footer">
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
data() { data() {
return { return {
id: '', id: '',
bill_id:'',
detail: {}, detail: {},
orderInfo: {}, orderInfo: {},
showModal: false, showModal: false,
...@@ -122,6 +123,7 @@ ...@@ -122,6 +123,7 @@
}, },
onLoad(options) { onLoad(options) {
this.id = options.id || ''; this.id = options.id || '';
this.bill_id = options.bill_id || '';
}, },
onShow() { onShow() {
if (this.id) { if (this.id) {
...@@ -189,13 +191,13 @@ ...@@ -189,13 +191,13 @@
* @return {void} * @return {void}
*/ */
submitApprove() { submitApprove() {
if (this.modalStatus === 2 && !this.remark.trim()) { if (this.modalStatus === -1 && !this.remark.trim()) {
uni.showToast({ title: '请输入驳回原因', icon: 'none' }); uni.showToast({ title: '请输入驳回原因', icon: 'none' });
return; return;
} }
this.submitting = true; this.submitting = true;
var params = { var params = {
bill_id: this.id, bill_id: this.bill_id,
approval_status: this.modalStatus approval_status: this.modalStatus
}; };
if (this.remark.trim()) { if (this.remark.trim()) {
......
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
*/ */
handleApprove(item) { handleApprove(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/approve/detail?id=${item.approve_id}` url: `/pages/approve/detail?id=${item.approve_id}&bill_id=${item.bill_id}`
}); });
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment