|
@@ -31,18 +31,25 @@
|
|
|
<view class="title_code_a">钢瓶编号</view>
|
|
|
<view class="num_code">总数: {{userList.innerCodeList.length}}</view>
|
|
|
</view>
|
|
|
- <view style="display: flex;flex-direction: column;">
|
|
|
- <view class="item_card_tran frame" v-for="(item,index) in userList.innerCodeList">
|
|
|
- <view style="width: 60rpx;margin-right: 10rpx;text-align: center;">{{index + 1}}</view>
|
|
|
- <span style="font-weight: 600;">{{item}}</span>
|
|
|
+ <u-checkbox-group v-model="checkedList" @change="checkboxChange">
|
|
|
+ <view style="display: flex;flex-direction: column;width: 100%;">
|
|
|
+ <view class="item_card_tran frame" v-for="(item,index) in innerCodeData">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <u-checkbox :name="item.inner_code" :checked="item.checked"
|
|
|
+ v-if="type == 1 && userList.status == 1"></u-checkbox>
|
|
|
+ <view style="width: 60rpx;margin-right: 10rpx;text-align: center;">{{index + 1}}</view>
|
|
|
+ <span style="font-weight: 600;">{{item.inner_code}}</span>
|
|
|
+ </view>
|
|
|
+ <view style="display: flex;align-items: center;" v-if="userList.status != 1">
|
|
|
+ <span class="blue_title" v-if="item.flag">已接收</span>
|
|
|
+ <span class="red_title" v-else>未接收</span>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </u-checkbox-group>
|
|
|
</view>
|
|
|
<view style="width: 100%;height: 120rpx;"></view>
|
|
|
- <view class="btn_transfer_details" v-if="type == 1">
|
|
|
- <view style="flex: 1;">
|
|
|
- <u-button style="width: 90%;" type="error" @click="cancelAllocation">取消</u-button>
|
|
|
- </view>
|
|
|
+ <view class="btn_transfer_details" v-if="type == 1 && userList.status == 1">
|
|
|
<view style="flex: 1;">
|
|
|
<u-button style="width: 90%;" type="primary" @click="submit">确定</u-button>
|
|
|
</view>
|
|
@@ -60,6 +67,8 @@
|
|
|
userList: {},
|
|
|
type: null,
|
|
|
transferTitle: '',
|
|
|
+ checkedList: [],
|
|
|
+ innerCodeData: [],
|
|
|
}
|
|
|
},
|
|
|
onLoad(value) {
|
|
@@ -74,6 +83,25 @@
|
|
|
} else {
|
|
|
this.transferTitle = '调拨详情'
|
|
|
}
|
|
|
+ this.checkedList = userArr.innerCodeList
|
|
|
+ this.innerCodeData = []
|
|
|
+ userArr.innerCodeList.forEach(item => {
|
|
|
+ let arr = {
|
|
|
+ inner_code: '',
|
|
|
+ checked: true,
|
|
|
+ }
|
|
|
+ arr.inner_code = item
|
|
|
+ if (userArr.acceptInnerCodeList == null) {
|
|
|
+ userArr.acceptInnerCodeList = []
|
|
|
+ }
|
|
|
+ if (userArr.acceptInnerCodeList.indexOf(item) > -1) {
|
|
|
+ arr.flag = true;
|
|
|
+ } else {
|
|
|
+ arr.flag = false;
|
|
|
+ }
|
|
|
+ this.innerCodeData.push(arr)
|
|
|
+ })
|
|
|
+ console.log(this.innerCodeData, userArr, 6767)
|
|
|
this.userList = userArr
|
|
|
}
|
|
|
},
|
|
@@ -99,7 +127,7 @@
|
|
|
acceptUserId: this.userList.acceptUserId,
|
|
|
allotCompanyId: this.userList.allotCompanyId,
|
|
|
acceptCompanyId: this.userList.acceptCompanyId,
|
|
|
- innerCodeList: this.userList.innerCodeList,
|
|
|
+ innerCodeList: this.checkedList,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
uni.navigateBack({
|
|
@@ -109,6 +137,18 @@
|
|
|
uni.$u.toast(res.data.msg)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 选择钢瓶
|
|
|
+ checkboxChange(value) {
|
|
|
+ for (let i = 0; i < this.innerCodeData.length; i++) {
|
|
|
+ let flag = value.includes(this.innerCodeData[i].inner_code);
|
|
|
+ if (flag) {
|
|
|
+ this.innerCodeData[i].checked = true
|
|
|
+ } else {
|
|
|
+ this.innerCodeData[i].checked = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.checkedList = this.checkedList.concat(value);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -153,6 +193,7 @@
|
|
|
.item_card_tran {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
padding: 30rpx 30rpx 30rpx 0rpx;
|
|
|
}
|
|
|
|
|
@@ -175,5 +216,16 @@
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding: 20rpx 0rpx;
|
|
|
+ border-top: 1rpx solid #f4f4f5;
|
|
|
+ }
|
|
|
+
|
|
|
+ .blue_title {
|
|
|
+ color: #53c21d;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .red_title {
|
|
|
+ color: red;
|
|
|
+ font-size: 28rpx;
|
|
|
}
|
|
|
</style>
|