xingyy
xingyy 1 year ago
parent 6ff493e6e3
commit 73969a626a

@ -21,7 +21,10 @@ export default {
@import "./tm-vuetify/mian.min.css";
@import "./tm-vuetify/scss/theme.css";
@import "uview-ui/index.scss";
.u-upload__button{
width: 404rpx!important;
height: 306rpx!important;
}
.u-tabbar__content {
height: 166rpx;
}

@ -10,7 +10,15 @@
</template>
</title-block>
<div class="content2">
<image :src="info.artworkImg"></image>
<u-upload
:fileList="fileList1"
@afterRead="afterRead"
@delete="deletePic"
name="1"
multiple
:maxCount="10"
></u-upload>
<!-- <image :src="info.artworkImg"></image>-->
</div>
<tm-poup height="700" v-model="show_2" position="bottom">
<div class="poup1">
@ -174,7 +182,6 @@
</template>
<script>
import {postDataByParams} from "../../http/service";
export default {
name: "order-details",
data() {
@ -195,6 +202,7 @@ export default {
days.push(i)
}
return {
fileList1:[],
dayMoney:'',
expectedPayment:'',
warehouseID: '',
@ -239,6 +247,33 @@ export default {
this.data = [today.getFullYear(), today.getMonth() + 1, today.getDate()]
},
methods: {
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
// multiple true , file
let lists = [].concat(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
async signContract(){
const data={
@ -307,6 +342,7 @@ export default {
const res = await postDataByParams('/api/warehouse/ocr', data)
if (res.code === 200) {
this.info = res.data
this.fileList1=[this.info.artworkImg]
} else {
uni.showToast({
title: res.msg,

Loading…
Cancel
Save