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