|
@@ -12,7 +12,7 @@
|
|
|
<view class="card_title">采购商品</view>
|
|
|
<view class="card_line"></view>
|
|
|
<view class="card_store">
|
|
|
- <image class="img" :src="procurement.productImage" mode="aspectFill"></image>
|
|
|
+ <image class="img" :src="isImageUrl(procurement.productImage) ? imageUrl : procurement.productImage" mode="aspectFill"></image>
|
|
|
<view class="store_title">{{ procurement.productName }}</view>
|
|
|
</view>
|
|
|
<view class="back-filter" v-if="procurementStatus('isDelFlag', procurement.delFlag)"></view>
|
|
@@ -69,11 +69,11 @@
|
|
|
<view class="Initiator_price">
|
|
|
<view class="unit_price">
|
|
|
<view class="title">期望单价:</view>
|
|
|
- <view class="price">¥{{ procurement.price }}</view>
|
|
|
+ <view class="price">¥{{ item.price }}</view>
|
|
|
</view>
|
|
|
<view class="unit_sum">
|
|
|
<view class="title">采购数量:</view>
|
|
|
- <view class="price">{{ procurement.number }}</view>
|
|
|
+ <view class="price">{{ item.number }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -117,7 +117,7 @@
|
|
|
<view class="popup_form">
|
|
|
<view class="popup_form_item">商品图片:</view>
|
|
|
<view class="popup_img">
|
|
|
- <image style="width: 100%;height: 100%;" :src="joinData.productImage" mode="aspectFill"></image>
|
|
|
+ <image style="width: 100%;height: 100%;" :src="isImageUrl(joinData.productImage) ? imageUrl : joinData.productImage" mode="aspectFill"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="popup_form">
|
|
@@ -201,7 +201,8 @@ export default {
|
|
|
userInfo: {},
|
|
|
popupShow: false, // 底部上移栏
|
|
|
proTabId: '', // tab id
|
|
|
- detailId: '' // 详情id
|
|
|
+ detailId: '', // 详情id
|
|
|
+ refleshdata: {},
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -215,6 +216,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.skeletonShow = true
|
|
|
+ this.procurementDetail(this.detailId)
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 删除
|
|
|
procurementDelete() {
|
|
@@ -224,7 +230,7 @@ export default {
|
|
|
},
|
|
|
handleClick($event) {
|
|
|
if ($event.index === 1) {
|
|
|
- if (this.joinData.isInvolved === 1) {
|
|
|
+ if (this.procurement.isInvolved === 1) {
|
|
|
// 退出参与
|
|
|
this.procurementUpdate(1)
|
|
|
} else {
|
|
@@ -273,7 +279,7 @@ export default {
|
|
|
// 删除 退出
|
|
|
async procurementUpdate(type) {
|
|
|
const form = {
|
|
|
- id: this.detailId,
|
|
|
+ id: type === 0 ? this.detailId : this.procurement.sid,
|
|
|
userId: this.userInfo.userId,
|
|
|
procurementType: type
|
|
|
}
|
|
@@ -304,15 +310,17 @@ export default {
|
|
|
price: this.joinData.price,
|
|
|
number: this.joinData.number,
|
|
|
status: 0,
|
|
|
- id: this.joinData.id
|
|
|
+ id: this.joinData.id,
|
|
|
+ userName: this.userInfo.name
|
|
|
}
|
|
|
if (this.joinData.isInvolved === 1) {
|
|
|
- form.id = this.joinData.sid
|
|
|
+ form.id = this.joinData.id
|
|
|
form.status = 1 // 0参与 1 修改
|
|
|
}
|
|
|
try {
|
|
|
await this.ProcurementService.procurementParticipate(form)
|
|
|
this.procurementDetail(this.detailId)
|
|
|
+ this.popupShow = false
|
|
|
uni.$emit('refreshAddData') // 刷新修改的数据
|
|
|
uni.showToast({
|
|
|
title: `${this.procurement.isInvolved === 0 ? '参与' : '修改'}成功`,
|
|
@@ -330,8 +338,8 @@ export default {
|
|
|
procurementType: 0
|
|
|
}
|
|
|
try {
|
|
|
- const data = await this.ProcurementService.procurementEditData(form)
|
|
|
- this.joinData = data.data
|
|
|
+ const {data} = await this.ProcurementService.procurementEditData(form)
|
|
|
+ this.joinData = data
|
|
|
this.popupShow = true
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
@@ -345,7 +353,6 @@ export default {
|
|
|
.img {
|
|
|
width: 136rpx;
|
|
|
height: 136rpx;
|
|
|
- border: 1px dotted #E1E1E1;
|
|
|
margin-right: 24rpx;
|
|
|
}
|
|
|
.procure_info {
|
|
@@ -487,4 +494,77 @@ export default {
|
|
|
height: 100%;
|
|
|
width: 100%;
|
|
|
}
|
|
|
+.popup_content {
|
|
|
+ padding: 0 64rpx;
|
|
|
+}
|
|
|
+.pro_popup_title {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+ margin: 40rpx auto;
|
|
|
+ text-align: center;
|
|
|
+}
|
|
|
+.popup_form {
|
|
|
+ margin-bottom: 32rpx;
|
|
|
+}
|
|
|
+.popup_form .popup_form_item {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 26rpx;
|
|
|
+ margin-bottom: 16rpx;
|
|
|
+}
|
|
|
+.popup_form .popup_img {
|
|
|
+ width: 136rpx;
|
|
|
+ height: 136rpx;
|
|
|
+}
|
|
|
+.popup_form .popup_form_name {
|
|
|
+ color: #333333;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 44rpx;
|
|
|
+}
|
|
|
+.uni-form-item .title {
|
|
|
+ color: #999999;
|
|
|
+ font-size: 26rpx;
|
|
|
+ margin-bottom: 16rpx;
|
|
|
+}
|
|
|
+.input_icon {
|
|
|
+ position: absolute;
|
|
|
+ left: 15rpx;
|
|
|
+ top: 24rpx;
|
|
|
+ color: #b2b2b2;
|
|
|
+ font-size: 26rpx;
|
|
|
+}
|
|
|
+.uni-form-item .uni-input {
|
|
|
+ height: 80rpx;
|
|
|
+ border: 1px solid #b2b2b2;
|
|
|
+ border-radius: 6rpx 6rpx 6rpx 6rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ padding-left: 47rpx;
|
|
|
+ margin-bottom: 32rpx;
|
|
|
+}
|
|
|
+.submit_btn {
|
|
|
+ margin-top: 56rpx;
|
|
|
+ height: 84rpx;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 50rpx;
|
|
|
+}
|
|
|
+.submit_btn .popup_btn {
|
|
|
+ width: 280rpx;
|
|
|
+ height: 100%;
|
|
|
+ border-radius: 45rpx 45rpx 45rpx 45rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 84rpx;
|
|
|
+}
|
|
|
+::v-deep .submit_btn .cancel {
|
|
|
+ background-color: #fff4e6;
|
|
|
+ color: #f3b574;
|
|
|
+ font-size: 32rpx;
|
|
|
+}
|
|
|
+::v-deep .submit_btn .submit {
|
|
|
+ background-color: #f3b574;
|
|
|
+ color: #ffffff;
|
|
|
+ font-size: 32rpx;
|
|
|
+}
|
|
|
</style>
|