增加图片上传
This commit is contained in:
parent
9f4fbf0a73
commit
b6b8b8eb2f
@ -135,7 +135,8 @@
|
||||
//运营区域下拉值 和列表
|
||||
const regindata = ref([])
|
||||
onShow(() => {
|
||||
loadMoreData(1, 5)
|
||||
loadMoreData(1, 5);
|
||||
selectedItems.value=[]
|
||||
})
|
||||
|
||||
//提交表单相关信息
|
||||
@ -256,10 +257,10 @@
|
||||
if (statusZT.value == 0) { // 下架
|
||||
handleLeaveWarehouse();
|
||||
} else { // 投放
|
||||
// handleLaunch();
|
||||
uni.navigateTo({
|
||||
url: `/pages/warehouse/vehicledispatch/vehicledispatch?orderId=274372153543897088`
|
||||
});
|
||||
handleLaunch();
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/warehouse/vehicledispatch/vehicledispatch?orderId=274372153543897088`
|
||||
// });
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('err', err);
|
||||
|
||||
@ -8,6 +8,14 @@
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
</view>
|
||||
<view class="">
|
||||
<uni-section title="上传图片" type="line">
|
||||
<view class="example-body">
|
||||
<uni-file-picker limit="9" @select="selectImg" @delete="delChangeImg"
|
||||
:value="fileLists"></uni-file-picker>
|
||||
</view>
|
||||
</uni-section>
|
||||
</view>
|
||||
<view class="button-container">
|
||||
<view class="button-group flex justify-between padding">
|
||||
<button class="cu-btn bg-blue margin-tb-sm lg" @click="unlockHandler">开锁</button>
|
||||
@ -62,6 +70,7 @@
|
||||
} from '@/utils/tools.js';
|
||||
|
||||
const orderId = ref("");
|
||||
const fileLists = ref([]);
|
||||
|
||||
const newbikeCode = ref("");
|
||||
|
||||
@ -90,7 +99,25 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const delChangeImg = (res) => {
|
||||
const fileUniqueKey = fileLists.value[res.index].fileUniqueKey;
|
||||
fileLists.value.splice(res.index, 1);
|
||||
api.callEbikeInfo("deletedFile?fileUniqueKey=" + fileUniqueKey, {}, "get");
|
||||
};
|
||||
const selectImg = (data) => {
|
||||
const file = data.tempFiles[0];
|
||||
api.fileUpload(file).then(res => {
|
||||
if (res.code == 200) {
|
||||
fileLists.value.push(res.data)
|
||||
} else {
|
||||
if (fileLists.value.length > 0) {
|
||||
fileLists.value.pop();
|
||||
} else {
|
||||
fileLists.value = [];
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
const deleteDispatchRecord = (recordId, index) => {
|
||||
if (dispatchRecords.value.length == 1) {
|
||||
uni.showModal({
|
||||
@ -175,7 +202,8 @@
|
||||
if (index == 0) //完成投放
|
||||
{
|
||||
const params = {
|
||||
"orderId": orderId.value
|
||||
"orderId": orderId.value,
|
||||
"fileLists":fileLists.value
|
||||
}
|
||||
api.callEbikeInfo("completeDeployment", params).then(res => {
|
||||
if (res.code == 200) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user