|
|
@@ -28,9 +28,29 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="margin-top: 20rpx;padding-bottom: 20rpx;" class="space_between frame">
|
|
|
- <view class="title_code_a">钢瓶编号</view>
|
|
|
- <view class="num_code">总数: {{userList.innerCodeList.length}}</view>
|
|
|
+ <view class="title_code_a">单位内编号</view>
|
|
|
+ <view class="num_code">总数: {{innerCodeData.length}}</view>
|
|
|
</view>
|
|
|
+<<<<<<< HEAD
|
|
|
+ <u-checkbox-group v-model="checkedList" v-if="userList.status == 1 && type == 1" @change="checkboxChange">
|
|
|
+ <view style="display: flex;flex-direction: column;width: 100%;">
|
|
|
+ <view class="item_card_tran frame" v-for="(item,index) in innerCodeData">
|
|
|
+ <u-checkbox :name="item.inner_code" :checked="item.checked"></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>
|
|
|
+ </u-checkbox-group>
|
|
|
+ <view style="display: flex;flex-direction: column;width: 100%;" v-else>
|
|
|
+ <view class="item_card_tran frame space_between" v-for="(item,index) in innerCodeData">
|
|
|
+ <view style="display: flex;align-items: center;">
|
|
|
+ <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">
|
|
|
+ <view class="color_blue" v-if="item.flag">已接收</view>
|
|
|
+ <view class="color_red" v-else>未接收</view>
|
|
|
+=======
|
|
|
<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">
|
|
|
@@ -44,12 +64,19 @@
|
|
|
<span class="blue_title" v-if="item.flag">已接收</span>
|
|
|
<span class="red_title" v-else>未接收</span>
|
|
|
</view>
|
|
|
+>>>>>>> ec9bba9783fc5bf29c8b3276224b1ab4fab155dc
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-checkbox-group>
|
|
|
</view>
|
|
|
<view style="width: 100%;height: 120rpx;"></view>
|
|
|
<view class="btn_transfer_details" v-if="type == 1 && userList.status == 1">
|
|
|
+<<<<<<< HEAD
|
|
|
+ <!-- <view style="flex: 1;">
|
|
|
+ <u-button style="width: 90%;" type="error" @click="cancelAllocation">取消</u-button>
|
|
|
+ </view> -->
|
|
|
+=======
|
|
|
+>>>>>>> ec9bba9783fc5bf29c8b3276224b1ab4fab155dc
|
|
|
<view style="flex: 1;">
|
|
|
<u-button style="width: 90%;" type="primary" @click="submit">确定</u-button>
|
|
|
</view>
|
|
|
@@ -103,12 +130,49 @@
|
|
|
})
|
|
|
console.log(this.innerCodeData, userArr, 6767)
|
|
|
this.userList = userArr
|
|
|
+ // console.log(this.userList,25)
|
|
|
+ const bmList = this.regroup(userArr.innerCodeList, true)
|
|
|
+ const allList = this.regroup(userArr.acceptInnerCodeList)
|
|
|
+ if (userArr.acceptInnerCodeList) {
|
|
|
+ for (let i = 0; i < bmList.length; i++) {
|
|
|
+ for (let v = 0; v < allList.length; v++) {
|
|
|
+ if (bmList[i].inner_code == allList[v].inner_code) {
|
|
|
+ bmList[i]['flag'] = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.innerCodeData = bmList
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- cancelAllocation() {
|
|
|
- this.$api.post('/api/gas-cylinder-allot/cancel', {
|
|
|
+ // 单位内编号数组重组
|
|
|
+ regroup(arr, flag) {
|
|
|
+ if (arr) {
|
|
|
+ let innerCodeArr = []
|
|
|
+ arr.forEach((item, index) => {
|
|
|
+ let arr = {
|
|
|
+ inner_code: item,
|
|
|
+ checked: true,
|
|
|
+ flag: false,
|
|
|
+ }
|
|
|
+ innerCodeArr.push(arr)
|
|
|
+ if (flag) {
|
|
|
+ this.checkedList.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return innerCodeArr
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submit() {
|
|
|
+ this.$api.post('/api/gas-cylinder-allot/submit', {
|
|
|
id: this.userList.id,
|
|
|
+ optType: this.userList.optType,
|
|
|
+ allotUserId: this.userList.allotUserId,
|
|
|
+ acceptUserId: this.userList.acceptUserId,
|
|
|
+ allotCompanyId: this.userList.allotCompanyId,
|
|
|
+ acceptCompanyId: this.userList.acceptCompanyId,
|
|
|
+ innerCodeList: this.checkedList,
|
|
|
}).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
uni.navigateBack({
|
|
|
@@ -119,6 +183,14 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+<<<<<<< HEAD
|
|
|
+ // 选择钢瓶编号
|
|
|
+ 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
|
|
|
+=======
|
|
|
submit() {
|
|
|
this.$api.post('/api/gas-cylinder-allot/submit', {
|
|
|
id: this.userList.id,
|
|
|
@@ -133,9 +205,14 @@
|
|
|
uni.navigateBack({
|
|
|
delta: 1
|
|
|
});
|
|
|
+>>>>>>> ec9bba9783fc5bf29c8b3276224b1ab4fab155dc
|
|
|
} else {
|
|
|
- uni.$u.toast(res.data.msg)
|
|
|
+ this.innerCodeData[i].checked = false
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
+ }
|
|
|
+ this.checkedList = value
|
|
|
+=======
|
|
|
})
|
|
|
},
|
|
|
// 选择钢瓶
|
|
|
@@ -149,6 +226,7 @@
|
|
|
}
|
|
|
}
|
|
|
this.checkedList = this.checkedList.concat(value);
|
|
|
+>>>>>>> ec9bba9783fc5bf29c8b3276224b1ab4fab155dc
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -219,6 +297,16 @@
|
|
|
border-top: 1rpx solid #f4f4f5;
|
|
|
}
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
+ .color_blue {
|
|
|
+ color: #19be6b;
|
|
|
+ font-size: 26rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .color_red {
|
|
|
+ color: #fa3534;
|
|
|
+ font-size: 26rpx;
|
|
|
+=======
|
|
|
.blue_title {
|
|
|
color: #53c21d;
|
|
|
font-size: 28rpx;
|
|
|
@@ -227,5 +315,6 @@
|
|
|
.red_title {
|
|
|
color: red;
|
|
|
font-size: 28rpx;
|
|
|
+>>>>>>> ec9bba9783fc5bf29c8b3276224b1ab4fab155dc
|
|
|
}
|
|
|
</style>
|